├── .DS_Store ├── .github ├── FUNDING.yml └── ISSUE_TEMPLATE │ ├── bug_report.md │ └── something-else.md ├── .gitignore ├── .gitmodules ├── .vscode └── settings.json ├── 404.html ├── Gemfile ├── Gemfile.lock ├── LICENSE ├── README.md ├── _config.yml ├── _includes ├── footer.html ├── head.html ├── link-previews.html ├── nav.html └── notes_graph.html ├── _layouts ├── default.html ├── note.html └── page.html ├── _pages ├── about.md └── index.md ├── _plugins ├── bidirectional_links_generator.rb ├── embed_tweets.rb ├── empty_front_matter_note_injector.rb ├── last_modified_at_generator.rb ├── markdown-highlighter.rb └── open_external_links_in_new_tab.rb ├── _sass ├── _code.scss ├── _normalize.scss └── _style.scss ├── favicon.ico ├── netlify.toml └── styles.scss /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oldwinter/dg/92c0c483c99c221b72ff33acebe39c285060300a/.DS_Store -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: maximevaillancourt 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Something's broken with the template 4 | title: '' 5 | labels: bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | 11 | 12 | **Describe the bug** 13 | A clear and concise description of what the bug is. 14 | 15 | **To reproduce** 16 | Steps to reproduce the behavior: 17 | 1. Go to '...' 18 | 2. Click on '....' 19 | 3. Scroll down to '....' 20 | 4. See error 21 | 22 | **Expected behavior** 23 | A clear and concise description of what you expected to happen. 24 | 25 | **Screenshots** 26 | If applicable, add screenshots to help explain your problem. 27 | 28 | **Desktop (please complete the following information):** 29 | - Operating system: [e.g. macOS 11.4] 30 | - Ruby version: [e.g. Ruby 2.7.1] 31 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/something-else.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Something else 3 | about: Something's wrong, but it's not a bug with the template 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Generated website directory 2 | _site/ 3 | 4 | # Sass cache 5 | .sass-cache/ 6 | 7 | # Jekyll cache & metadata 8 | .jekyll-cache/ 9 | .jekyll-metadata 10 | 11 | # Notes graph metadata 12 | _includes/notes_graph.json 13 | 14 | # Obsidian config 15 | .obsidian/ 16 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "_notes"] 2 | path = _notes 3 | url = https://github.com/oldwinter/knowledge-garden.git 4 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "liveServer.settings.port": 5501 3 | } -------------------------------------------------------------------------------- /404.html: -------------------------------------------------------------------------------- 1 | --- 2 | permalink: 404.html 3 | layout: default 4 | title: "404" 5 | id: "not-found" 6 | --- 7 | 8 |
9 |

你到达了一个不存在的界面,施主请回🙏

10 |
11 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | source "https://rubygems.org" 4 | 5 | git_source(:github) {|repo_name| "https://github.com/#{repo_name}" } 6 | 7 | gem "jekyll", "~> 4.0" 8 | gem "jekyll-last-modified-at", git: "https://github.com/maximevaillancourt/jekyll-last-modified-at", branch: "add-support-for-files-in-git-submodules" 9 | gem "webrick", "~> 1.7" 10 | gem "nokogiri" 11 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GIT 2 | remote: https://github.com/maximevaillancourt/jekyll-last-modified-at 3 | revision: e0c918691db625401ef5850a030da59d0124d356 4 | branch: add-support-for-files-in-git-submodules 5 | specs: 6 | jekyll-last-modified-at (1.3.0) 7 | jekyll (>= 3.7, < 5.0) 8 | posix-spawn (~> 0.3.9) 9 | 10 | GEM 11 | remote: https://rubygems.org/ 12 | specs: 13 | addressable (2.8.0) 14 | public_suffix (>= 2.0.2, < 5.0) 15 | colorator (1.1.0) 16 | concurrent-ruby (1.1.7) 17 | em-websocket (0.5.2) 18 | eventmachine (>= 0.12.9) 19 | http_parser.rb (~> 0.6.0) 20 | eventmachine (1.2.7) 21 | ffi (1.14.2) 22 | forwardable-extended (2.6.0) 23 | http_parser.rb (0.6.0) 24 | i18n (1.8.5) 25 | concurrent-ruby (~> 1.0) 26 | jekyll (4.2.0) 27 | addressable (~> 2.4) 28 | colorator (~> 1.0) 29 | em-websocket (~> 0.5) 30 | i18n (~> 1.0) 31 | jekyll-sass-converter (~> 2.0) 32 | jekyll-watch (~> 2.0) 33 | kramdown (~> 2.3) 34 | kramdown-parser-gfm (~> 1.0) 35 | liquid (~> 4.0) 36 | mercenary (~> 0.4.0) 37 | pathutil (~> 0.9) 38 | rouge (~> 3.0) 39 | safe_yaml (~> 1.0) 40 | terminal-table (~> 2.0) 41 | jekyll-sass-converter (2.1.0) 42 | sassc (> 2.0.1, < 3.0) 43 | jekyll-watch (2.2.1) 44 | listen (~> 3.0) 45 | kramdown (2.3.1) 46 | rexml 47 | kramdown-parser-gfm (1.1.0) 48 | kramdown (~> 2.0) 49 | liquid (4.0.3) 50 | listen (3.3.3) 51 | rb-fsevent (~> 0.10, >= 0.10.3) 52 | rb-inotify (~> 0.9, >= 0.9.10) 53 | mercenary (0.4.0) 54 | mini_portile2 (2.8.0) 55 | nokogiri (1.13.6) 56 | mini_portile2 (~> 2.8.0) 57 | racc (~> 1.4) 58 | pathutil (0.16.2) 59 | forwardable-extended (~> 2.6) 60 | posix-spawn (0.3.15) 61 | public_suffix (4.0.6) 62 | racc (1.6.0) 63 | rb-fsevent (0.10.4) 64 | rb-inotify (0.10.1) 65 | ffi (~> 1.0) 66 | rexml (3.2.5) 67 | rouge (3.26.0) 68 | safe_yaml (1.0.5) 69 | sassc (2.4.0) 70 | ffi (~> 1.9) 71 | terminal-table (2.0.0) 72 | unicode-display_width (~> 1.1, >= 1.1.1) 73 | unicode-display_width (1.7.0) 74 | webrick (1.7.0) 75 | 76 | PLATFORMS 77 | ruby 78 | 79 | DEPENDENCIES 80 | jekyll (~> 4.0) 81 | jekyll-last-modified-at! 82 | nokogiri 83 | webrick (~> 1.7) 84 | 85 | BUNDLED WITH 86 | 2.2.3 87 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | # Released under MIT License 2 | 3 | Copyright (c) 2020 Maxime Vaillancourt. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Netlify Status](https://api.netlify.com/api/v1/badges/8cfa8785-8df8-4aad-ad35-8f1c790b8baf/deploy-status)](https://app.netlify.com/sites/digital-garden-jekyll-template/deploys) 2 | 3 | # Digital garden Jekyll template 4 | 5 | Use this template repository to get started with your own digital garden. 6 | 7 | **I wrote a tutorial explaining how to set it up: [Setting up your own digital garden with Jekyll](https://maximevaillancourt.com/blog/setting-up-your-own-digital-garden-with-jekyll)** 8 | 9 | Preview the template here: https://digital-garden-jekyll-template.netlify.app/ 10 | 11 | - Based on Jekyll, a static website generator 12 | - Supports Roam-style double bracket link syntax to other notes 13 | - Creates backlinks to other notes automatically 14 | - Features link previews on hover 15 | - Includes graph visualization of the notes and their links 16 | - Features a simple and responsive design 17 | - Supports Markdown or HTML notes 18 | 19 | Screen Shot 2020-05-19 at 23 05 46 20 | 21 | ## License 22 | 23 | Source code is available under the [MIT license](LICENSE.md). 24 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | title: 🌱 oldwinterの数字花园 2 | include: ['_pages'] 3 | exclude: ['_includes/notes_graph.json', '_notes/.github','_notes/.obsidian'] 4 | # You may need to change the base URL depending on your deploy configuration. 5 | # Specifically, when using GitHub Pages, the baseurl should point to where GitHub 6 | # Pages deploys your repository (which is usually the repository name). 7 | baseurl: '' 8 | 9 | # If you are using a host that cannot resolve URLs that do 10 | # not end with .html (such as Neocities), set this to 'true'. 11 | use_html_extension: false 12 | 13 | # Set to `true` to open non-internal links in new tabs, or 14 | # set to `false` to open non-internal links in current tab. 15 | open_external_links_in_new_tab: true 16 | 17 | # Set to `true` to replace tweet URLs with Twitter embeds. 18 | # Note that doing so will negatively the reader's privacy 19 | # as their browser will communicate with Twitter's servers. 20 | embed_tweets: false 21 | 22 | permalink: pretty 23 | relative_permalinks: false 24 | 25 | plugins: 26 | - jekyll-last-modified-at 27 | 28 | sass: 29 | sass_dir: _sass 30 | style: :compressed 31 | 32 | collections: 33 | notes: 34 | output: true 35 | permalink: /:slug 36 | 37 | defaults: 38 | - scope: 39 | path: "**/*" 40 | values: 41 | layout: "default" 42 | - scope: 43 | path: "_notes/**/*.md" 44 | values: 45 | layout: "note" 46 | -------------------------------------------------------------------------------- /_includes/footer.html: -------------------------------------------------------------------------------- 1 | 17 | 18 | {{/* 嵌入waline匿名评论系统 */}} 19 | -------------------------------------------------------------------------------- /_includes/head.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 20 | {{/* 加入waline匿名评论系统 */}} 21 | 28 | 29 | {{/* 加入umami访问统计 */}} 30 | 31 | 32 | {{/* 加入浩克访问统计 */}} 33 | 34 | 47 | 48 | {{/* 加入微软clarity访问统计 */}} 49 | 56 | 57 | 58 | 59 | 60 | 61 | {% if page.excerpt %} 62 | 63 | {% else %} 64 | 65 | {% endif %} 66 | 67 | {% if page.title %} 68 | 69 | 70 | {% else %} 71 | 72 | 73 | {% endif %} 74 | 75 | {% if page.date %} 76 | 77 | 78 | {% endif %} 79 | 80 | 81 | 82 | {% if page.image %} 83 | 84 | {% endif %} 85 | 86 | 87 | {% if page.id == "home" %} 88 | {{ site.title }} 89 | {% else %} 90 | {{ page.title }} — {{ site.title }} 91 | {% endif %} 92 | 93 | 94 | -------------------------------------------------------------------------------- /_includes/link-previews.html: -------------------------------------------------------------------------------- 1 | 2 | 35 | 36 | 40 | 41 | 43 | 44 | 129 | -------------------------------------------------------------------------------- /_includes/nav.html: -------------------------------------------------------------------------------- 1 |
2 | {{ site.title }} 3 |
4 | -------------------------------------------------------------------------------- /_includes/notes_graph.html: -------------------------------------------------------------------------------- 1 | 36 | 37 | 40 | 41 |
42 | 298 |
299 | -------------------------------------------------------------------------------- /_layouts/default.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {% include head.html %} 4 | 5 | 6 |
7 |
{{ content }}
8 | 9 |
10 | 11 | {% include link-previews.html wrapperQuerySelector="content" %} 12 | 13 | 14 | -------------------------------------------------------------------------------- /_layouts/note.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | 5 |
6 |
7 |

{{ page.title }}

8 | 9 | 13 |
14 | 15 |
16 | 17 | {{ content }} 18 | 19 | 20 | 21 |

反向链接:

22 | {% if page.backlinks.size > 0 %} 23 |
24 | {% for backlink in page.backlinks %} 25 | 29 | {% endfor %} 30 |
31 | {% else %} 32 | 33 |
34 |

35 | There are no notes linking to this note. 36 |

37 |
38 | {% endif %} 39 |
40 |
41 |
42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /_layouts/page.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | 5 | 6 | {{ content }} 7 | 8 | -------------------------------------------------------------------------------- /_pages/about.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: About 4 | permalink: /about 5 | --- 6 | 7 | *This is an about page.* 8 | 9 | Feel free to tell the world about what you love! 😍 10 | -------------------------------------------------------------------------------- /_pages/index.md: -------------------------------------------------------------------------------- 1 | 2 | --- 3 | 4 | 🆕 最近创建: 5 | 13 | 14 | 15 | ⏰ 最近更新: 16 | 17 | 25 | -------------------------------------------------------------------------------- /_plugins/bidirectional_links_generator.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | class BidirectionalLinksGenerator < Jekyll::Generator 3 | def generate(site) 4 | graph_nodes = [] 5 | graph_edges = [] 6 | 7 | all_notes = site.collections['notes'].docs 8 | all_pages = site.pages 9 | 10 | all_docs = all_notes + all_pages 11 | 12 | link_extension = !!site.config["use_html_extension"] ? '.html' : '' 13 | 14 | # Convert all Wiki/Roam-style double-bracket link syntax to plain HTML 15 | # anchor tag elements () with "internal-link" CSS class 16 | all_docs.each do |current_note| 17 | all_docs.each do |note_potentially_linked_to| 18 | note_title_regexp_pattern = Regexp.escape( 19 | File.basename( 20 | note_potentially_linked_to.basename, 21 | File.extname(note_potentially_linked_to.basename) 22 | ) 23 | ).gsub('\_', '[ _]').gsub('\-', '[ -]').capitalize 24 | 25 | # title_from_data = note_potentially_linked_to.data['title'] 26 | # if title_from_data 27 | # title_from_data = Regexp.escape(title_from_data) 28 | # end 29 | 30 | new_href = "#{site.baseurl}#{note_potentially_linked_to.url}#{link_extension}" 31 | anchor_tag = "\\1" 32 | 33 | # Replace double-bracketed links with label using note title 34 | # [[A note about cats|this is a link to the note about cats]] 35 | current_note.content.gsub!( 36 | /\[\[#{note_title_regexp_pattern}\|(.+?)(?=\])\]\]/i, 37 | anchor_tag 38 | ) 39 | 40 | # Replace double-bracketed links with label using note filename 41 | # [[cats|this is a link to the note about cats]] 42 | # current_note.content.gsub!( 43 | # /\[\[#{title_from_data}\|(.+?)(?=\])\]\]/i, 44 | # anchor_tag 45 | # ) 46 | 47 | # Replace double-bracketed links using note title 48 | # [[a note about cats]] 49 | # current_note.content.gsub!( 50 | # /\[\[(#{title_from_data})\]\]/i, 51 | # anchor_tag 52 | # ) 53 | 54 | # Replace double-bracketed links using note filename 55 | # [[cats]] 56 | current_note.content.gsub!( 57 | /\[\[(#{note_title_regexp_pattern})\]\]/i, 58 | anchor_tag 59 | ) 60 | end 61 | 62 | # At this point, all remaining double-bracket-wrapped words are 63 | # pointing to non-existing pages, so let's turn them into disabled 64 | # links by greying them out and changing the cursor 65 | current_note.content = current_note.content.gsub( 66 | /\[\[([^\]]+)\]\]/i, # match on the remaining double-bracket links 67 | <<~HTML.delete("\n") # replace with this HTML (\\1 is what was inside the brackets) 68 | 69 | [[ 70 | \\1 71 | ]] 72 | HTML 73 | ) 74 | end 75 | 76 | # Identify note backlinks and add them to each note 77 | all_notes.each do |current_note| 78 | # Nodes: Jekyll 79 | notes_linking_to_current_note = all_notes.filter do |e| 80 | e.content.include?(current_note.url) 81 | end 82 | 83 | # Nodes: Graph 84 | # graph_nodes << { 85 | # id: note_id_from_note(current_note), 86 | # path: "#{site.baseurl}#{current_note.url}#{link_extension}", 87 | # label: current_note.data['title'], 88 | # } unless current_note.path.include?('_notes/index.html') 89 | 90 | # Edges: Jekyll 91 | current_note.data['backlinks'] = notes_linking_to_current_note 92 | # Edges: Graph 93 | # notes_linking_to_current_note.each do |n| 94 | # graph_edges << { 95 | # source: note_id_from_note(n), 96 | # target: note_id_from_note(current_note), 97 | # } 98 | # end 99 | end 100 | 101 | File.write('_includes/notes_graph.json', JSON.dump({ 102 | edges: graph_edges, 103 | nodes: graph_nodes, 104 | })) 105 | end 106 | 107 | # def note_id_from_note(note) 108 | # note.data['title'].bytes.join 109 | # end 110 | end 111 | -------------------------------------------------------------------------------- /_plugins/embed_tweets.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | class TweetEmbedGenerator < Jekyll::Generator 3 | def generate(site) 4 | return if !site.config["embed_tweets"] 5 | 6 | all_notes = site.collections['notes'].docs 7 | all_pages = site.pages 8 | all_docs = all_notes + all_pages 9 | 10 | all_docs.each do |current_note| 11 | current_note.content.gsub!( 12 | /^https?:\/\/twitter\.com\/(?:#!\/)?(\w+)\/status(es)?\/(\d+)$/i, 13 | <<~HTML 14 |
15 | This tweet could not be embedded. View it on Twitter instead. 16 |
17 | 18 | HTML 19 | ) 20 | end 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /_plugins/empty_front_matter_note_injector.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | EMPTY_FRONT_MATTER = <<~JEKYLL 4 | --- 5 | --- 6 | 7 | JEKYLL 8 | 9 | # Inject empty front matter in notes that don't have any 10 | Jekyll::Hooks.register :site, :after_init do |site| 11 | Dir.glob(site.collections['notes'].relative_directory + '/**/*.md').each do |filename| 12 | raw_note_content = File.read(filename) 13 | unless raw_note_content.start_with?('---') 14 | raw_note_content.prepend(EMPTY_FRONT_MATTER) 15 | File.write(filename, raw_note_content) 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /_plugins/last_modified_at_generator.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'fileutils' 4 | require 'pathname' 5 | require 'jekyll-last-modified-at' 6 | 7 | module Recents 8 | # Generate change information for all markdown pages 9 | class Generator < Jekyll::Generator 10 | def generate(site) 11 | items = site.collections['notes'].docs 12 | items.each do |page| 13 | timestamp = Jekyll::LastModifiedAt::Determinator.new(site.source, page.path, '%FT%T%:z').to_s 14 | page.data['last_modified_at_timestamp'] = timestamp 15 | end 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /_plugins/markdown-highlighter.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # Turns ==something== in Markdown to something in output HTML 4 | 5 | Jekyll::Hooks.register [:notes], :post_convert do |doc| 6 | replace(doc) 7 | end 8 | 9 | Jekyll::Hooks.register [:pages], :post_convert do |doc| 10 | # jekyll considers anything at the root as a page, 11 | # we only want to consider actual pages 12 | next unless doc.path.start_with?('_pages/') 13 | replace(doc) 14 | end 15 | 16 | def replace(doc) 17 | doc.content.gsub!(/==+([^ ](.*?)?[^ .=]?)==+/, "\\1") 18 | end 19 | -------------------------------------------------------------------------------- /_plugins/open_external_links_in_new_tab.rb: -------------------------------------------------------------------------------- 1 | # If the configuration sets `open_external_links_in_new_tab` to a truthy value, 2 | # add 'target=_blank' to anchor tags that don't have `internal-link` class 3 | 4 | # frozen_string_literal: true 5 | require 'nokogiri' 6 | 7 | Jekyll::Hooks.register [:notes], :post_convert do |doc| 8 | convert_links(doc) 9 | end 10 | 11 | Jekyll::Hooks.register [:pages], :post_convert do |doc| 12 | # jekyll considers anything at the root as a page, 13 | # we only want to consider actual pages 14 | next unless doc.path.start_with?('_pages/') 15 | convert_links(doc) 16 | end 17 | 18 | def convert_links(doc) 19 | open_external_links_in_new_tab = !!doc.site.config["open_external_links_in_new_tab"] 20 | 21 | if open_external_links_in_new_tab 22 | parsed_doc = Nokogiri::HTML(doc.content) 23 | parsed_doc.css("a:not(.internal-link):not(.footnote):not(.reversefootnote)").each do |link| 24 | link.set_attribute('target', '_blank') 25 | end 26 | doc.content = parsed_doc.inner_html 27 | end 28 | end 29 | -------------------------------------------------------------------------------- /_sass/_code.scss: -------------------------------------------------------------------------------- 1 | .highlight { 2 | background: #f8f8f8; 3 | padding: 1px 1em; 4 | border-radius: 3px; 5 | font-size: 1em; 6 | font-size: 0.9em; 7 | overflow: auto; 8 | margin: 1em -1em; 9 | code{ 10 | padding: 0; 11 | } 12 | } 13 | 14 | div.highlight { 15 | display: grid; 16 | } 17 | 18 | .highlight .c { color: #999988; font-style: italic } /* Comment */ 19 | .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ 20 | .highlight .k { font-weight: bold } /* Keyword */ 21 | .highlight .o { font-weight: bold } /* Operator */ 22 | .highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */ 23 | .highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */ 24 | .highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */ 25 | .highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */ 26 | .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ 27 | .highlight .gd .x { color: #000000; background-color: #ffaaaa } /* Generic.Deleted.Specific */ 28 | .highlight .ge { font-style: italic } /* Generic.Emph */ 29 | .highlight .gr { color: #aa0000 } /* Generic.Error */ 30 | .highlight .gh { color: #999999 } /* Generic.Heading */ 31 | .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ 32 | .highlight .gi .x { color: #000000; background-color: #aaffaa } /* Generic.Inserted.Specific */ 33 | .highlight .go { color: #888888 } /* Generic.Output */ 34 | .highlight .gp { color: #555555 } /* Generic.Prompt */ 35 | .highlight .gs { font-weight: bold } /* Generic.Strong */ 36 | .highlight .gu { color: #aaaaaa } /* Generic.Subheading */ 37 | .highlight .gt { color: #aa0000 } /* Generic.Traceback */ 38 | .highlight .kc { font-weight: bold } /* Keyword.Constant */ 39 | .highlight .kd { font-weight: bold } /* Keyword.Declaration */ 40 | .highlight .kp { font-weight: bold } /* Keyword.Pseudo */ 41 | .highlight .kr { font-weight: bold } /* Keyword.Reserved */ 42 | .highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */ 43 | .highlight .m { color: #009999 } /* Literal.Number */ 44 | .highlight .s { color: #d14 } /* Literal.String */ 45 | .highlight .na { color: #008080 } /* Name.Attribute */ 46 | .highlight .nb { color: #0086B3 } /* Name.Builtin */ 47 | .highlight .nc { color: #445588; font-weight: bold } /* Name.Class */ 48 | .highlight .no { color: #008080 } /* Name.Constant */ 49 | .highlight .ni { color: #800080 } /* Name.Entity */ 50 | .highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */ 51 | .highlight .nf { color: #990000; font-weight: bold } /* Name.Function */ 52 | .highlight .nn { color: #555555 } /* Name.Namespace */ 53 | .highlight .nt { color: #000080 } /* Name.Tag */ 54 | .highlight .nv { color: #008080 } /* Name.Variable */ 55 | .highlight .ow { font-weight: bold } /* Operator.Word */ 56 | .highlight .w { color: #bbbbbb } /* Text.Whitespace */ 57 | .highlight .mf { color: #009999 } /* Literal.Number.Float */ 58 | .highlight .mh { color: #009999 } /* Literal.Number.Hex */ 59 | .highlight .mi { color: #009999 } /* Literal.Number.Integer */ 60 | .highlight .mo { color: #009999 } /* Literal.Number.Oct */ 61 | .highlight .sb { color: #d14 } /* Literal.String.Backtick */ 62 | .highlight .sc { color: #d14 } /* Literal.String.Char */ 63 | .highlight .sd { color: #d14 } /* Literal.String.Doc */ 64 | .highlight .s2 { color: #d14 } /* Literal.String.Double */ 65 | .highlight .se { color: #d14 } /* Literal.String.Escape */ 66 | .highlight .sh { color: #d14 } /* Literal.String.Heredoc */ 67 | .highlight .si { color: #d14 } /* Literal.String.Interpol */ 68 | .highlight .sx { color: #d14 } /* Literal.String.Other */ 69 | .highlight .sr { color: #009926 } /* Literal.String.Regex */ 70 | .highlight .s1 { color: #d14 } /* Literal.String.Single */ 71 | .highlight .ss { color: #990073 } /* Literal.String.Symbol */ 72 | .highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */ 73 | .highlight .vc { color: #008080 } /* Name.Variable.Class */ 74 | .highlight .vg { color: #008080 } /* Name.Variable.Global */ 75 | .highlight .vi { color: #008080 } /* Name.Variable.Instance */ 76 | .highlight .il { color: #009999 } /* Literal.Number.Integer.Long */ 77 | -------------------------------------------------------------------------------- /_sass/_normalize.scss: -------------------------------------------------------------------------------- 1 | /*! normalize.css v8.0.0 | MIT License | github.com/necolas/normalize.css */ 2 | 3 | /* Document 4 | ========================================================================== */ 5 | 6 | /** 7 | * 1. Correct the line height in all browsers. 8 | * 2. Prevent adjustments of font size after orientation changes in iOS. 9 | */ 10 | 11 | html { 12 | line-height: 1.15; /* 1 */ 13 | -webkit-text-size-adjust: 100%; /* 2 */ 14 | } 15 | 16 | /* Sections 17 | ========================================================================== */ 18 | 19 | /** 20 | * Remove the margin in all browsers. 21 | */ 22 | 23 | body { 24 | margin: 0; 25 | } 26 | 27 | /** 28 | * Correct the font size and margin on `h1` elements within `section` and 29 | * `article` contexts in Chrome, Firefox, and Safari. 30 | */ 31 | 32 | h1 { 33 | font-size: 2em; 34 | margin: 0.67em 0; 35 | } 36 | 37 | /* Grouping content 38 | ========================================================================== */ 39 | 40 | /** 41 | * 1. Add the correct box sizing in Firefox. 42 | * 2. Show the overflow in Edge and IE. 43 | */ 44 | 45 | hr { 46 | box-sizing: content-box; /* 1 */ 47 | height: 0; /* 1 */ 48 | overflow: visible; /* 2 */ 49 | } 50 | 51 | /** 52 | * 1. Correct the inheritance and scaling of font size in all browsers. 53 | * 2. Correct the odd `em` font sizing in all browsers. 54 | */ 55 | 56 | pre { 57 | font-size: 1em; /* 2 */ 58 | } 59 | 60 | /* Text-level semantics 61 | ========================================================================== */ 62 | 63 | /** 64 | * Remove the gray background on active links in IE 10. 65 | */ 66 | 67 | a { 68 | background-color: transparent; 69 | } 70 | 71 | /** 72 | * 1. Remove the bottom border in Chrome 57- 73 | * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. 74 | */ 75 | 76 | abbr[title] { 77 | border-bottom: none; /* 1 */ 78 | text-decoration: underline; /* 2 */ 79 | text-decoration: underline dotted; /* 2 */ 80 | } 81 | 82 | /** 83 | * Add the correct font weight in Chrome, Edge, and Safari. 84 | */ 85 | 86 | b, 87 | strong { 88 | font-weight: bolder; 89 | } 90 | 91 | /** 92 | * 1. Correct the inheritance and scaling of font size in all browsers. 93 | * 2. Correct the odd `em` font sizing in all browsers. 94 | */ 95 | 96 | code, 97 | kbd, 98 | samp { 99 | font-size: 1em; /* 2 */ 100 | } 101 | 102 | /** 103 | * Add the correct font size in all browsers. 104 | */ 105 | 106 | small { 107 | font-size: 80%; 108 | } 109 | 110 | /** 111 | * Prevent `sub` and `sup` elements from affecting the line height in 112 | * all browsers. 113 | */ 114 | 115 | sub, 116 | sup { 117 | font-size: 75%; 118 | line-height: 0; 119 | position: relative; 120 | vertical-align: baseline; 121 | } 122 | 123 | sub { 124 | bottom: -0.25em; 125 | } 126 | 127 | sup { 128 | top: -0.5em; 129 | } 130 | 131 | /* Embedded content 132 | ========================================================================== */ 133 | 134 | /** 135 | * Remove the border on images inside links in IE 10. 136 | */ 137 | 138 | img { 139 | border-style: none; 140 | } 141 | 142 | /* Forms 143 | ========================================================================== */ 144 | 145 | /** 146 | * 1. Change the font styles in all browsers. 147 | * 2. Remove the margin in Firefox and Safari. 148 | */ 149 | 150 | button, 151 | input, 152 | optgroup, 153 | select, 154 | textarea { 155 | font-size: 100%; /* 1 */ 156 | line-height: 1.15; /* 1 */ 157 | margin: 0; /* 2 */ 158 | } 159 | 160 | /** 161 | * Show the overflow in IE. 162 | * 1. Show the overflow in Edge. 163 | */ 164 | 165 | button, 166 | input { /* 1 */ 167 | overflow: visible; 168 | } 169 | 170 | /** 171 | * Remove the inheritance of text transform in Edge, Firefox, and IE. 172 | * 1. Remove the inheritance of text transform in Firefox. 173 | */ 174 | 175 | button, 176 | select { /* 1 */ 177 | text-transform: none; 178 | } 179 | 180 | /** 181 | * Correct the inability to style clickable types in iOS and Safari. 182 | */ 183 | 184 | button, 185 | [type="button"], 186 | [type="reset"], 187 | [type="submit"] { 188 | -webkit-appearance: button; 189 | } 190 | 191 | /** 192 | * Remove the inner border and padding in Firefox. 193 | */ 194 | 195 | button::-moz-focus-inner, 196 | [type="button"]::-moz-focus-inner, 197 | [type="reset"]::-moz-focus-inner, 198 | [type="submit"]::-moz-focus-inner { 199 | border-style: none; 200 | padding: 0; 201 | } 202 | 203 | /** 204 | * Restore the focus styles unset by the previous rule. 205 | */ 206 | 207 | button:-moz-focusring, 208 | [type="button"]:-moz-focusring, 209 | [type="reset"]:-moz-focusring, 210 | [type="submit"]:-moz-focusring { 211 | outline: 1px dotted ButtonText; 212 | } 213 | 214 | /** 215 | * Correct the padding in Firefox. 216 | */ 217 | 218 | fieldset { 219 | padding: 0.35em 0.75em 0.625em; 220 | } 221 | 222 | /** 223 | * 1. Correct the text wrapping in Edge and IE. 224 | * 2. Correct the color inheritance from `fieldset` elements in IE. 225 | * 3. Remove the padding so developers are not caught out when they zero out 226 | * `fieldset` elements in all browsers. 227 | */ 228 | 229 | legend { 230 | box-sizing: border-box; /* 1 */ 231 | color: inherit; /* 2 */ 232 | display: table; /* 1 */ 233 | max-width: 100%; /* 1 */ 234 | padding: 0; /* 3 */ 235 | white-space: normal; /* 1 */ 236 | } 237 | 238 | /** 239 | * Add the correct vertical alignment in Chrome, Firefox, and Opera. 240 | */ 241 | 242 | progress { 243 | vertical-align: baseline; 244 | } 245 | 246 | /** 247 | * Remove the default vertical scrollbar in IE 10+. 248 | */ 249 | 250 | textarea { 251 | overflow: auto; 252 | } 253 | 254 | /** 255 | * 1. Add the correct box sizing in IE 10. 256 | * 2. Remove the padding in IE 10. 257 | */ 258 | 259 | [type="checkbox"], 260 | [type="radio"] { 261 | box-sizing: border-box; /* 1 */ 262 | padding: 0; /* 2 */ 263 | } 264 | 265 | /** 266 | * Correct the cursor style of increment and decrement buttons in Chrome. 267 | */ 268 | 269 | [type="number"]::-webkit-inner-spin-button, 270 | [type="number"]::-webkit-outer-spin-button { 271 | height: auto; 272 | } 273 | 274 | /** 275 | * 1. Correct the odd appearance in Chrome and Safari. 276 | * 2. Correct the outline style in Safari. 277 | */ 278 | 279 | [type="search"] { 280 | -webkit-appearance: textfield; /* 1 */ 281 | outline-offset: -2px; /* 2 */ 282 | } 283 | 284 | /** 285 | * Remove the inner padding in Chrome and Safari on macOS. 286 | */ 287 | 288 | [type="search"]::-webkit-search-decoration { 289 | -webkit-appearance: none; 290 | } 291 | 292 | /** 293 | * 1. Correct the inability to style clickable types in iOS and Safari. 294 | * 2. Change font properties to `inherit` in Safari. 295 | */ 296 | 297 | ::-webkit-file-upload-button { 298 | -webkit-appearance: button; /* 1 */ 299 | font: inherit; /* 2 */ 300 | } 301 | 302 | /* Interactive 303 | ========================================================================== */ 304 | 305 | /* 306 | * Add the correct display in Edge, IE 10+, and Firefox. 307 | */ 308 | 309 | details { 310 | display: block; 311 | } 312 | 313 | /* 314 | * Add the correct display in all browsers. 315 | */ 316 | 317 | summary { 318 | display: list-item; 319 | } 320 | 321 | /* Misc 322 | ========================================================================== */ 323 | 324 | /** 325 | * Add the correct display in IE 10+. 326 | */ 327 | 328 | template { 329 | display: none; 330 | } 331 | 332 | /** 333 | * Add the correct display in IE 10. 334 | */ 335 | 336 | [hidden] { 337 | display: none; 338 | } 339 | -------------------------------------------------------------------------------- /_sass/_style.scss: -------------------------------------------------------------------------------- 1 | $color-primary: hsl(0, 0%, 10%); 2 | $color-text: hsl(0, 0%, 20%); 3 | $color-subtext: hsl(0, 0%, 30%); 4 | $color-border: hsl(0, 0%, 85%); 5 | $color-box-background: mix($color-primary, white, 4%); 6 | $border-radius: 4px; 7 | $font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, 8 | sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol; 9 | 10 | body { 11 | box-sizing: content-box; 12 | font-family: $font-family; 13 | margin: 0 auto; 14 | line-height: 1.7; 15 | padding: 4vh 6vw; 16 | overflow-x: hidden; 17 | color: $color-text; 18 | font-size: 1rem; 19 | max-width: 63em; 20 | 21 | @media (min-width: 820px) { 22 | font-size: 1.2rem; 23 | } 24 | } 25 | 26 | time { 27 | display: block; 28 | color: $color-subtext; 29 | margin: 0.5em 0 1em; 30 | } 31 | 32 | footer { 33 | margin: 2em 0; 34 | font-size: 0.8em; 35 | color: mix($color-text, white, 80%); 36 | padding-top: 1em; 37 | } 38 | 39 | img { 40 | max-width: 100%; 41 | display: block; 42 | margin: 0 auto; 43 | max-height: 75vh; 44 | border-radius: $border-radius; 45 | } 46 | 47 | blockquote { 48 | padding: 1.5em; 49 | margin: 0; 50 | font-size: 0.88em; 51 | background: $color-box-background; 52 | border-radius: $border-radius; 53 | 54 | p { 55 | margin: 0; 56 | } 57 | } 58 | 59 | hr { 60 | width: 100%; 61 | border: 0; 62 | height: 1px; 63 | margin: 1.5em 0; 64 | background: $color-border; 65 | } 66 | 67 | h1, 68 | h2, 69 | h3, 70 | h4, 71 | h5, 72 | h6 { 73 | line-height: 1.3; 74 | margin-bottom: 0; 75 | padding-bottom: 0; 76 | } 77 | 78 | a { 79 | transition: background 300ms; 80 | padding: 0 0.1em; 81 | text-decoration: none; 82 | border-bottom: 1px solid $color-border; 83 | color: $color-primary; 84 | &:hover { 85 | color: black !important; 86 | background: #fffaf1; 87 | } 88 | &:after { 89 | position: relative; 90 | top: -0.5em; 91 | font-size: 0.7em; 92 | content: "↗"; 93 | color: #aaaaaa; 94 | } 95 | &.internal-link:after, 96 | &.footnote:after, 97 | &.reversefootnote:after { 98 | content: ""; 99 | } 100 | } 101 | 102 | *:focus { 103 | background: #ffe8bc !important; 104 | color: black !important; 105 | } 106 | 107 | nav { 108 | margin: 1em 0 3em; 109 | } 110 | 111 | #notes-entry-container { 112 | display: grid; 113 | grid-gap: 2em; 114 | grid-template-areas: 115 | "content" 116 | "side"; 117 | 118 | @media (min-width: 700px) { 119 | grid-template-columns: 3fr 1fr; 120 | grid-template-areas: "content side"; 121 | } 122 | } 123 | 124 | .backlink-box { 125 | background: $color-box-background; 126 | padding: 1em; 127 | border-radius: $border-radius; 128 | } 129 | 130 | code { 131 | background: #f5f5f5; 132 | padding: 0.1em 0.2em; 133 | border-radius: 4px; 134 | } 135 | 136 | .invalid-link { 137 | color: #444444; 138 | cursor: help; 139 | background: #fafafa; 140 | padding: 0 0.1em; 141 | } 142 | 143 | .invalid-link-brackets { 144 | color: #ccc; 145 | cursor: help; 146 | } 147 | -------------------------------------------------------------------------------- /favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oldwinter/dg/92c0c483c99c221b72ff33acebe39c285060300a/favicon.ico -------------------------------------------------------------------------------- /netlify.toml: -------------------------------------------------------------------------------- 1 | [build] 2 | command = "cat _pages/index.md >> _notes/AboutTheGarden.md && jekyll build --trace" 3 | publish = "_site" 4 | -------------------------------------------------------------------------------- /styles.scss: -------------------------------------------------------------------------------- 1 | --- 2 | --- 3 | 4 | @import "../_sass/normalize"; 5 | @import "../_sass/code"; 6 | @import "../_sass/style"; 7 | --------------------------------------------------------------------------------