Skip to content

Commit

Permalink
v3
Browse files Browse the repository at this point in the history
  • Loading branch information
nntrn committed Apr 11, 2024
1 parent c56822a commit b03b7dd
Show file tree
Hide file tree
Showing 11 changed files with 215 additions and 286 deletions.
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source 'https://rubygems.org'

gem 'jekyll'
85 changes: 19 additions & 66 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,84 +3,33 @@ description: snippets for working with jq
baseurl: "/jq-recipes"
url: "https://nntrn.github.io"
repository: nntrn/jq-recipes
recipes_file: recipes.jq

remote_theme: just-the-docs/[email protected]
heading_anchors: false
color_scheme: custom
markdown: kramdown
permalink: pretty
enable_copy_code_button: true

favicon_ico: "/assets/favicon.ico"

search_enabled: true
search:
# Maximum amount of previews per search result
previews: 3
# Maximum amount of words to display before a matched word in the preview
preview_words_before: 3
# Maximum amount of words to display after a matched word in the preview
preview_words_after: 3
tokenizer_separator: /[^a-zA-Z0-9]+/
rel_url: false
button: false

nav_sort: case_sensitive

kramdown:
toc_levels: 2..2
smart_quotes: ["apos", "apos", "quot", "quot"]

github_username: nntrn

stylesheets:
- styles/highlight.css

defaults:
- scope:
path: "./functions/*.md"
path: "_functions"
values:
parent: "Functions"
layout: minimal
- scope:
path: "./general/*.md"
path: "_general"
values:
parent: "General"
- scope:
path: "**index.html"
values:
has_children: true
layout: "default"
- scope:
path: "recipes.jq"
values:
output: true

plugins:
- jekyll-remote-theme

gh_edit_link: true
gh_edit_link_text: "Edit this page on GitHub"
gh_edit_repository: "https://github.com/nntrn/jq-recipes"
gh_edit_branch: "staging"
# gh_edit_source: docs # the source that your files originate from
gh_edit_view_mode: "tree"

callouts_level: quiet
callouts:
highlight:
color: yellow
source:
title: Source
color: green
data:
title: Data
color: yellow
note:
title: Read more
color: blue
layout: minimal

custom_css: "/assets/custom/style.css"
collections:
general:
output: true
functions:
output: true

sass:
style: compact
sidebar: ["functions", "general"]

compress_html:
clippings: [div, p, ul, td, h1, h2]
Expand All @@ -90,4 +39,8 @@ compress_html:
blanklines: true
profile: false

exclude: [readme.md]
exclude:
- readme.md
- Gemfile.lock
- _config.old.yml
- scripts
15 changes: 15 additions & 0 deletions _includes/sidebar.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<aside class="sidebar flex gap">
{% for label in site.sidebar %}
{%- assign list = site[label] %}
<div>
<h4>{{label|upcase}}</h4>
<ul>
{%- for p in list %}
{%- if label != p.title %}
<li><a href="{{p.url|relative_url}}">{{p.title}}</a></li>
{%- endif -%}
{%- endfor %}
</ul>
</div>
{%- endfor %}
</aside>
67 changes: 67 additions & 0 deletions _includes/styles/highlight.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
div.highlight code,pre>code{padding:1rem;display:block}
.highlight,pre.highlight{background:#f9f9f9;color:#383942}
.highlight pre{background:#f9f9f9}
.highlight .hll{background:#f9f9f9}
.highlight .c{color:#9fa0a6;font-style:italic}
.highlight .err{color:#fff;background-color:#e05151}
.highlight .k{color:#a625a4}
.highlight .l{color:#50a04f}
.highlight .n{color:#383942}
.highlight .o{color:#383942}
.highlight .p{color:#383942}
.highlight .cm{color:#9fa0a6;font-style:italic}
.highlight .cp{color:#9fa0a6;font-style:italic}
.highlight .c1{color:#9fa0a6;font-style:italic}
.highlight .cs{color:#9fa0a6;font-style:italic}
.highlight .ge{font-style:italic}
.highlight .gs{font-weight:700}
.highlight .kc{color:#a625a4}
.highlight .kd{color:#a625a4}
.highlight .kn{color:#a625a4}
.highlight .kp{color:#a625a4}
.highlight .kr{color:#a625a4}
.highlight .kt{color:#a625a4}
.highlight .ld{color:#50a04f}
.highlight .m{color:#b66a00}
.highlight .s{color:#50a04f}
.highlight .na{color:#b66a00}
.highlight .nb{color:#ca7601}
.highlight .nc{color:#ca7601}
.highlight .no{color:#ca7601}
.highlight .nd{color:#ca7601}
.highlight .ni{color:#ca7601}
.highlight .ne{color:#ca7601}
.highlight .nf{color:#383942}
.highlight .nl{color:#ca7601}
.highlight .nn{color:#383942}
.highlight .nx{color:#383942}
.highlight .py{color:#ca7601}
.highlight .nt{color:#e35549}
.highlight .nv{color:#ca7601}
.highlight .ow{font-weight:700}
.highlight .w{color:#f8f8f2}
.highlight .mf{color:#b66a00}
.highlight .mh{color:#b66a00}
.highlight .mi{color:#b66a00}
.highlight .mo{color:#b66a00}
.highlight .sb{color:#50a04f}
.highlight .sc{color:#50a04f}
.highlight .sd{color:#50a04f}
.highlight .s2{color:#50a04f}
.highlight .se{color:#50a04f}
.highlight .sh{color:#50a04f}
.highlight .si{color:#50a04f}
.highlight .sx{color:#50a04f}
.highlight .sr{color:#0083bb}
.highlight .s1{color:#50a04f}
.highlight .ss{color:#0083bb}
.highlight .bp{color:#ca7601}
.highlight .vc{color:#ca7601}
.highlight .vg{color:#ca7601}
.highlight .vi{color:#e35549}
.highlight .il{color:#b66a00}
.highlight .gu{color:#75715e}
.highlight .gd{color:#e05151}
.highlight .gi{color:#43d089}
.highlight .language-json .w+.s2{color:#e35549}
.highlight .language-json .kc{color:#0083bb}
31 changes: 31 additions & 0 deletions _layouts/default.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% if page.title != 'Home' %}{{page.title|default:page.name}} | {%-endif %} {{site.title}}</title>
<meta name="description" content="{{site.description}}" />
<meta name="author" content="{{site.github_username}}">
<meta name="robots" content="index, follow">
<link rel="canonical" href="https://nntrn.github.io{{ page.url | relative_url }}" />
<link rel="icon" href="{{site.favicon_ico|relative_url}}" type="image/x-icon">
<link rel="stylesheet" href="{{'/assets/style.css'|relative_url}}" />
<style>
{%- for css in site.stylesheets -%}
{% include {{css}} %}
{% endfor -%}
</style>
</head>
<body>
<header>
<h1><a href="{{ '/' | relative_url }}">{{site.title}}</a></h1>
</header>
<main>
{{ content }}
</main>
<footer>
<p>Created by <a href="https://github.com/{{site.repository}}">@{{site.github_username}}</a></p>
</footer>
</body>
</html>
13 changes: 13 additions & 0 deletions _layouts/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
layout: default
---

{%- assign list = site[page.title] %}
<h4>{{page.title|upcase}}</h4>
<ul>
{%- for p in list %}
{%- if p.slug != page.slug %}
<li><a href="{{p.url|relative_url}}">{{p.title}}</a></li>
{%- endif -%}
{%- endfor %}
</ul>
9 changes: 9 additions & 0 deletions _layouts/minimal.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
layout: default
---
<div class="container">
{% include sidebar.html %}
<article class="content">
{{content}}
</article>
</div>
16 changes: 0 additions & 16 deletions _sass/color_schemes/custom.scss

This file was deleted.

36 changes: 36 additions & 0 deletions assets/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
:root{--px-size:2.5%;--sans-serif:Helvetica Neue,Helvetica,Arial,sans-serif;--bull-margin:4px;--bull-symbol:"•";--underline-rgb:53,224,71;--underline-color:rgb(var(--underline-rgb));--meta-rgb:134,25,143;--body-rgb:34,34,34;--link-rgb:51,102,203;--meta-color:rgb(var(--meta-rgb));--body-color:rgb(var(--body-rgb));--h:126;--s:73.4%;--l:54%;--hsl:var(--h),var(--s),var(--l);--accent-color:hsl(var(--h), var(--s), var(--l));--gray:hsl(0, 0%, var(--l, 80%))}
*{box-sizing:border-box}
.hidden,[hidden]{display:none}
html{font-size:13px}
body{font-variant:proportional-width;scrollbar-width:thin;padding:0 0;margin:auto;font-family:var(--sans-serif);font-size:inherit;line-height:1.3;text-rendering:optimizeLegibility;font-variant:proportional-width}
a,u{text-underline-offset:1px;text-decoration-skip-ink:all;text-decoration-thickness:2px;text-decoration-skip-ink:none}
u{text-decoration-color:hsl(var(--h),var(--s),var(--l));text-decoration-skip-ink:all}
a:empty{text-decoration:none;color:inherit}
a:empty:after{content:attr(href)}
a:hover{text-decoration-color:currentColor}
a{color:inherit;text-decoration-color:hsl(var(--h),var(--s),var(--l))}
h1,h2,h3,h4,ul{margin:0 0}
h1,h2,h4{line-height:1}
.container{display:flex;gap:1rem;padding:1rem 0;width:100%}
footer,header,main{padding:0 1rem}
header{padding-top:1rem;padding-bottom:1rem}
footer{background:#222;min-height:100px;padding:1rem;color:#fff}
.container .sidebar{flex:1}
.container .content > *:first-child{padding:0 0;margin:0 0;margin-bottom:1rem}
.container .content{flex:3;width:100%;overflow-x:hidden}
.content h1{font-size:2rem;margin-bottom:1rem}
body{overflow-x:hidden}
pre{font-size:.9rem;max-width:100%}
pre code{white-space:pre;display:block;overflow-x:scroll}
button{position:fixed;z-index:1000;right:0}
.hidden,hidden{display:none!important}
.sidebar{flex-direction:column;background:#fff;color:#222}
.sidebar ul{padding:.5rem 2rem}
.flex{display:flex}
.gap{gap:var(--gap,1rem)}
.container{position:relative}
@media (max-width:600px){
.container{flex-direction:column-reverse}
.sidebar{flex-direction:row;border-top:1px solid #222;padding-top:1rem}
.sidebar>div{flex:1;flex-wrap:wrap}
}
Loading

0 comments on commit b03b7dd

Please sign in to comment.