├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── something-else.md ├── dependabot.yml └── workflows │ └── jekyll.yml ├── .gitignore ├── .ruby-version ├── 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 ├── _notes ├── accents.md ├── animals │ ├── cats.md │ └── tigers.md ├── consistency.md ├── move your body every day.md ├── your-first-note.md └── 안녕하세요.md ├── _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 ├── assets ├── image.jpg └── jazzyfrenchy.mp3 ├── netlify.toml └── styles.scss /.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 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for all configuration options: 4 | # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates 5 | 6 | version: 2 7 | updates: 8 | - package-ecosystem: bundler 9 | directory: "/" # Location of package manifests 10 | schedule: 11 | interval: "weekly" 12 | -------------------------------------------------------------------------------- /.github/workflows/jekyll.yml: -------------------------------------------------------------------------------- 1 | # This workflow uses actions that are not certified by GitHub. 2 | # They are provided by a third-party and are governed by 3 | # separate terms of service, privacy policy, and support 4 | # documentation. 5 | 6 | # Sample workflow for building and deploying a Jekyll site to GitHub Pages 7 | name: Deploy Jekyll site to Pages 8 | 9 | on: 10 | # Runs on pushes targeting the default branch 11 | push: 12 | branches: ["main"] 13 | 14 | # Allows you to run this workflow manually from the Actions tab 15 | workflow_dispatch: 16 | 17 | # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages 18 | permissions: 19 | contents: read 20 | pages: write 21 | id-token: write 22 | 23 | # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. 24 | # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. 25 | concurrency: 26 | group: "pages" 27 | cancel-in-progress: false 28 | 29 | jobs: 30 | # Build job 31 | build: 32 | runs-on: ubuntu-latest 33 | steps: 34 | - name: Checkout 35 | uses: actions/checkout@v3 36 | - name: Setup Ruby 37 | uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0 38 | with: 39 | # ruby-version: '3.1' # Not needed with a .ruby-version file 40 | bundler-cache: true # runs 'bundle install' and caches installed gems automatically 41 | cache-version: 0 # Increment this number if you need to re-download cached gems 42 | - name: Setup Pages 43 | id: pages 44 | uses: actions/configure-pages@v3 45 | - name: Build with Jekyll 46 | # Outputs to the './_site' directory by default 47 | run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}" 48 | env: 49 | JEKYLL_ENV: production 50 | - name: Upload artifact 51 | # Automatically uploads an artifact from the './_site' directory by default 52 | uses: actions/upload-pages-artifact@v2 53 | 54 | # Deployment job 55 | deploy: 56 | environment: 57 | name: github-pages 58 | url: ${{ steps.deployment.outputs.page_url }} 59 | runs-on: ubuntu-latest 60 | needs: build 61 | steps: 62 | - name: Deploy to GitHub Pages 63 | id: deployment 64 | uses: actions/deploy-pages@v2 65 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /.ruby-version: -------------------------------------------------------------------------------- 1 | 3.2.1 2 | -------------------------------------------------------------------------------- /404.html: -------------------------------------------------------------------------------- 1 | --- 2 | permalink: 404.html 3 | layout: default 4 | title: "404" 5 | id: "not-found" 6 | --- 7 | 8 |
9 |

Oops, that's a 404. 🙈

10 |

Looks like this page doesn't exist. Return home to get a fresh start.

11 |
12 | -------------------------------------------------------------------------------- /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.4" 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.9" 10 | gem "nokogiri" 11 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GIT 2 | remote: https://github.com/maximevaillancourt/jekyll-last-modified-at 3 | revision: b7f1164861ba589660af3dc096dcbdff75d67145 4 | branch: add-support-for-files-in-git-submodules 5 | specs: 6 | jekyll-last-modified-at (1.3.2) 7 | jekyll (>= 3.7, < 5.0) 8 | 9 | GEM 10 | remote: https://rubygems.org/ 11 | specs: 12 | addressable (2.8.7) 13 | public_suffix (>= 2.0.2, < 7.0) 14 | base64 (0.2.0) 15 | bigdecimal (3.1.9) 16 | colorator (1.1.0) 17 | concurrent-ruby (1.3.5) 18 | csv (3.3.2) 19 | em-websocket (0.5.3) 20 | eventmachine (>= 0.12.9) 21 | http_parser.rb (~> 0) 22 | eventmachine (1.2.7) 23 | ffi (1.17.1) 24 | forwardable-extended (2.6.0) 25 | google-protobuf (4.29.3) 26 | bigdecimal 27 | rake (>= 13) 28 | http_parser.rb (0.8.0) 29 | i18n (1.14.7) 30 | concurrent-ruby (~> 1.0) 31 | jekyll (4.4.1) 32 | addressable (~> 2.4) 33 | base64 (~> 0.2) 34 | colorator (~> 1.0) 35 | csv (~> 3.0) 36 | em-websocket (~> 0.5) 37 | i18n (~> 1.0) 38 | jekyll-sass-converter (>= 2.0, < 4.0) 39 | jekyll-watch (~> 2.0) 40 | json (~> 2.6) 41 | kramdown (~> 2.3, >= 2.3.1) 42 | kramdown-parser-gfm (~> 1.0) 43 | liquid (~> 4.0) 44 | mercenary (~> 0.3, >= 0.3.6) 45 | pathutil (~> 0.9) 46 | rouge (>= 3.0, < 5.0) 47 | safe_yaml (~> 1.0) 48 | terminal-table (>= 1.8, < 4.0) 49 | webrick (~> 1.7) 50 | jekyll-sass-converter (3.1.0) 51 | sass-embedded (~> 1.75) 52 | jekyll-watch (2.2.1) 53 | listen (~> 3.0) 54 | json (2.9.1) 55 | kramdown (2.5.1) 56 | rexml (>= 3.3.9) 57 | kramdown-parser-gfm (1.1.0) 58 | kramdown (~> 2.0) 59 | liquid (4.0.4) 60 | listen (3.9.0) 61 | rb-fsevent (~> 0.10, >= 0.10.3) 62 | rb-inotify (~> 0.9, >= 0.9.10) 63 | mercenary (0.4.0) 64 | mini_portile2 (2.8.8) 65 | nokogiri (1.18.8) 66 | mini_portile2 (~> 2.8.2) 67 | racc (~> 1.4) 68 | pathutil (0.16.2) 69 | forwardable-extended (~> 2.6) 70 | public_suffix (6.0.1) 71 | racc (1.8.1) 72 | rake (13.2.1) 73 | rb-fsevent (0.11.2) 74 | rb-inotify (0.11.1) 75 | ffi (~> 1.0) 76 | rexml (3.4.0) 77 | rouge (4.5.1) 78 | safe_yaml (1.0.5) 79 | sass-embedded (1.83.4) 80 | google-protobuf (~> 4.29) 81 | rake (>= 13) 82 | terminal-table (3.0.2) 83 | unicode-display_width (>= 1.1.1, < 3) 84 | unicode-display_width (2.6.0) 85 | webrick (1.9.1) 86 | 87 | PLATFORMS 88 | ruby 89 | 90 | DEPENDENCIES 91 | jekyll (~> 4.4) 92 | jekyll-last-modified-at! 93 | nokogiri 94 | webrick (~> 1.9) 95 | 96 | BUNDLED WITH 97 | 2.2.3 98 | -------------------------------------------------------------------------------- /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 | ## A note about GitHub Pages 22 | > [!NOTE] 23 | > **Update (January 2023)**: it seems that GitHub Pages supports custom plugins now, thanks to GitHub Actions ([view relevant discussion](https://github.com/maximevaillancourt/digital-garden-jekyll-template/discussions/144)). 24 | 25 | GitHub Pages only partially supports this template: to power the interactive notes graph, this template uses a custom Jekyll plugin to generate the graph data in [`notes_graph.json`](https://github.com/maximevaillancourt/digital-garden-jekyll-template/blob/7ac331a4113bac77c993856562acc2bfbde9f2f7/_plugins/bidirectional_links_generator.rb#L102), and [GitHub Pages doesn't support custom Jekyll plugins](https://docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll/about-github-pages-and-jekyll#plugins). 26 | 27 | If you want to use the graph with GitHub Pages, you may try building your garden locally using Jekyll then pushing the result to GitHub Pages. 28 | 29 | Alternatively, you may deploy your garden to Netlify and it'll work out of the box. [I wrote a guide explaining how to set this up](https://maximevaillancourt.com/blog/setting-up-your-own-digital-garden-with-jekyll). 30 | 31 | If you don't care about the graph, you can simply remove it from this layout, [as explained here](https://github.com/maximevaillancourt/digital-garden-jekyll-template/discussions/132#discussioncomment-3625772). 32 | 33 | ## License 34 | 35 | Source code is available under the [MIT license](LICENSE.md). 36 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | title: My digital garden 2 | include: ['_pages'] 3 | exclude: ['_includes/notes_graph.json'] 4 | # You may need to change the base URL depending on your deploy configuration. 5 | baseurl: '' 6 | 7 | # If you are using a host that cannot resolve URLs that do 8 | # not end with .html (such as Neocities), set this to 'true'. 9 | use_html_extension: false 10 | 11 | # Set to `true` to open non-internal links in new tabs, or 12 | # set to `false` to open non-internal links in current tab. 13 | open_external_links_in_new_tab: true 14 | 15 | # Set to `true` to replace tweet URLs with Twitter embeds. 16 | # Note that doing so will negatively the reader's privacy 17 | # as their browser will communicate with Twitter's servers. 18 | embed_tweets: false 19 | 20 | permalink: pretty 21 | relative_permalinks: false 22 | 23 | plugins: 24 | - jekyll-last-modified-at 25 | 26 | sass: 27 | sass_dir: _sass 28 | style: :compressed 29 | 30 | collections: 31 | notes: 32 | output: true 33 | permalink: /:slug 34 | 35 | defaults: 36 | - scope: 37 | path: "**/*" 38 | values: 39 | layout: "default" 40 | - scope: 41 | path: "_notes/**/*.md" 42 | values: 43 | layout: "note" 44 | -------------------------------------------------------------------------------- /_includes/footer.html: -------------------------------------------------------------------------------- 1 | This is the footer. Include anything you'd like here, like a link to an About page. 2 | -------------------------------------------------------------------------------- /_includes/head.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | {% if page.excerpt %} 17 | 18 | {% else %} 19 | 20 | {% endif %} 21 | 22 | {% if page.title %} 23 | 24 | 25 | {% else %} 26 | 27 | 28 | {% endif %} 29 | 30 | {% if page.date %} 31 | 32 | 33 | {% endif %} 34 | 35 | 36 | 37 | {% if page.image %} 38 | 39 | {% endif %} 40 | 41 | 42 | {% if page.id == "home" %} 43 | {{ site.title }} 44 | {% else %} 45 | {{ page.title }} — {{ site.title }} 46 | {% endif %} 47 | 48 | 49 | -------------------------------------------------------------------------------- /_includes/link-previews.html: -------------------------------------------------------------------------------- 1 | 2 | 35 | 36 | 40 | 41 | 43 | 44 | 141 | -------------------------------------------------------------------------------- /_includes/nav.html: -------------------------------------------------------------------------------- 1 |
2 | {{ site.title }} 3 |
4 | -------------------------------------------------------------------------------- /_includes/notes_graph.html: -------------------------------------------------------------------------------- 1 | 41 | 42 |
43 | 311 |
312 | -------------------------------------------------------------------------------- /_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 | 12 |
13 | 14 |
15 | 16 | {{ content }} 17 |

This line appears after every note.

18 |
19 | 20 | 21 |

Notes mentioning this note

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 |

Here are all the notes in this garden, along with their links, visualized as a graph.

46 | 47 | {% include notes_graph.html %} 48 | -------------------------------------------------------------------------------- /_layouts/page.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | 5 | 6 | {{ content }} 7 | 8 | -------------------------------------------------------------------------------- /_notes/accents.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Bon appétit! 3 | --- 4 | 5 | Page titles with accents are supported. 6 | -------------------------------------------------------------------------------- /_notes/animals/cats.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: A note about cats 3 | --- 4 | 5 | This is a second note with a poem with cats. 6 | 7 | Here's a link to a note that explains why it's important to [[move your body every day]]. 8 | 9 | > I like my pillow, my fancy bed, 10 | > 11 | > My cat tree and the bathroom sink. 12 | > 13 | > Each has its time and fills a need, 14 | > 15 | > but a box is best when I want to think. 16 | 17 | You can create as many notes as you want. 18 | 19 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur et risus at ipsum pharetra pellentesque vel in massa. Nam ornare, velit sed pulvinar gravida, justo ipsum eleifend augue, id porta velit eros vestibulum odio. Vestibulum dignissim malesuada sapien, eu volutpat lacus pellentesque et. Curabitur dui nisi, sagittis ut tempor ac, scelerisque in diam. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Vestibulum vitae euismod ex. Morbi lacinia iaculis tempor. 20 | 21 | Nunc porttitor lacus ullamcorper mauris porttitor feugiat. Vestibulum condimentum lacus vitae orci lobortis pellentesque in ac dolor. Nullam libero justo, suscipit id suscipit vel, tincidunt vitae lectus. Phasellus gravida iaculis ligula, at pharetra urna. Nunc vel tellus eleifend, aliquet magna non, condimentum est. Pellentesque vulputate posuere felis eget sodales. Cras finibus tortor porta libero bibendum, vel bibendum orci luctus. Donec ac eros vitae erat malesuada imperdiet at tempor turpis. -------------------------------------------------------------------------------- /_notes/animals/tigers.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Tigers 3 | --- 4 | 5 | This is yet another note, this one about tigers. 6 | -------------------------------------------------------------------------------- /_notes/consistency.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Consistency is key 3 | --- 4 | 5 | Show up. Do the work. Be consistent. 6 | 7 | Then go take a look at the [[Your first note|first note]]. 8 | -------------------------------------------------------------------------------- /_notes/move your body every day.md: -------------------------------------------------------------------------------- 1 | --- 2 | --- 3 | 4 | Move your body every day. Benefits include: 5 | 6 | - Improved sleep quality 7 | - Less risk of chronic disease 8 | - Increased productivity 9 | - Reduced anxiety 10 | 11 | The "every day" part is important, because [[consistency]] is key to most things worth doing. -------------------------------------------------------------------------------- /_notes/your-first-note.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Your first seed 3 | --- 4 | 5 | ### Welcome! 6 | 7 | This is your first note. You'll find it in the [`notes/`](https://github.com/maximevaillancourt/digital-garden-jekyll-template/tree/master/_notes) directory. 8 | 9 | ### Link syntax 10 | 11 | To link to another note, you can use multiple syntaxes. The following four use the "double-bracket" notation ([view the Markdown source file](https://github.com/maximevaillancourt/digital-garden-jekyll-template/blob/master/_notes/your-first-note.md#link-syntax) to see the underlying syntax). 12 | 13 | - Using the note title: [[a note about cats]] 14 | - Using the note's filename: [[cats]] 15 | - Using the note's title, with a label: [[A note about cats|link to the note about cats using the note title]] 16 | - Using the note's filename, with a label: [[cats|link to the note about cats using the note's filename]] 17 | 18 | You can organize notes in subdirectories and link them normally. For example, the links above all point to the `_notes/animals/cats.md` file. Here's another example: [[tigers]]. 19 | 20 | Non-latin languages are supported: [[안녕하세요]]; so are accents/diacritics: [[bon appétit!]] 21 | 22 | Dashes and underscores in file names are supported, and may be omitted in the bracket link syntax. As an example, the `your-first-note.md` file can be linked to with [[your first note]] or [[your-first-note]], or even [[yOuR-FiRsT Note]]. 23 | 24 | In all cases, if the double-bracket link does not point to a valid note, the double brackets will still be shown, like this: [[there is no note that matches this link]]. 25 | 26 | Alternatively, you can use regular [Markdown syntax](https://www.markdownguide.org/getting-started/) for links, with a relative link to the other note, like this: [this is a Markdown link to the note about cats](/cats){: .internal-link}. Don't forget to use the `.internal-link` class to make sure the link is styled as an internal link (without the little arrow). 27 | 28 | Since the Web is all about HTML, you can always use plain HTML if you want, like this: This is a link to the note about cats with HTML. 29 | 30 | Of course, you can also link to external websites, like this: [this is a link to Wikipedia](https://wikipedia.org/). Again, you can use plain HTML if you prefer. Footnotes are also supported and will be treated like internal links.[^1] You can point to other notes in your footnotes.[^2] 31 | 32 | [^1]: This is a footnote. For more information about using footnotes, check out the [Markdown Guide](https://www.markdownguide.org/extended-syntax/#footnotes). 33 | [^2]: This is another footnote that links to the note about [[cats]]. You may also point to [[notes that do not exist]] if you wish. 34 | 35 | ### Tweet embedding 36 | 37 | Note: This behavior is disabled by default for privacy reasons. See "Site configuration" section below to enable it. 38 | 39 | You may include a tweet URL on its own line (like below), and it would be replaced with an official Twitter embed if the site configuration demands it. 40 | 41 | https://twitter.com/jack/status/20 42 | 43 | ### Media embedding 44 | 45 | You may embed media files within a note using HTML5 media tags. Here's an example for an audio file: 46 | 47 | "Jazzy Frenchy" by Benjamin Tissot from bensound.com 48 | 52 | 53 | ### Site configuration 54 | 55 | Some behavior is configurable by tweaking the `_config.yml` file. 56 | 57 | **`use_html_extension`**: if you use a static host that doesn't support URLs that don't end with `.html` (such as Neocities), try changing the `use_html_extension` value to `true` in the `_config.yml` file and restart the Jekyll server (or re-build the site). This adds a `.html` extension to note URLs and may resolve issues with links. If you're still having trouble, I recommend using Netlify to host your digital garden: it's free, easy to use, and fully supports this template's features out of the box. 58 | 59 | **`open_external_links_in_new_tab`**: when set to `true`, this makes external links open in new tabs. Set to `false` to open all links in the current tab. 60 | 61 | **`embed_tweets`**: when set to `true`, tweet URLs on their own lines will be replaced with a Twitter embed. Default value is `false`. 62 | 63 | ### Automatic bi-directional links 64 | 65 | Notice in the "Notes mentioning this note" section that there is another note linking to this note. This is a bi-directional link, and those are automatically created when you create links to other notes. 66 | 67 | ### Link previews 68 | 69 | If you're on a device with mouse support, try hovering your mouse on internal links to preview the notes: [[a note about cats]]. 70 | 71 | Links that have been previewed will be cached to avoid redundant requests. 72 | 73 | ### Images and other Markdown goodies 74 | 75 | Finally, because you have the full power of Markdown in this template, you can use regular Markdown syntax for various formatting options. 76 | 77 | Lists work as expected: 78 | 79 | - List element A 80 | - List element B 81 | - List element C 82 | 83 | 1. List element 84 | 2. List element 85 | 3. List element 86 | 87 | If you'd like to quote other people, consider using quote blocks: 88 | 89 | > Lorem ipsum dolor sit amet 90 | 91 | And of course, images look great: 92 | 93 | 94 | 95 | You can also ==highlight some content== by wrapping it with `==`. 96 | 97 | Non-latin languages are supported too: ==你好==, ==안녕하세요==, ==こんにちは==. 98 | 99 | ### Code syntax highlighting 100 | 101 | You can add code blocks with full syntax color highlighting by wrapping code snippet in triple backticks and specifying the type of the code (`js`, `rb`, `sh`, etc.): 102 | 103 | ```js 104 | // Here's a bit of JavaScript: 105 | if (a === b || c == d) 106 | console.log('hello!') 107 | ``` 108 | 109 | ```rb 110 | # And now some Ruby 111 | def foo(bar) 112 | "baz" 113 | end 114 | ``` 115 | 116 | ```sh 117 | $ cat /dev/urandom | grep "the answer to life" # shell scripts look nice too 118 | ``` 119 | 120 | 121 | ### Next steps 122 | 123 | This digital garden template is free, open-source, and [available on GitHub here](https://github.com/maximevaillancourt/digital-garden-jekyll-template). 124 | 125 | The easiest way to build your own digital garden based on this template is to read this [step-by-step guide explaining how to set this up from scratch](https://maximevaillancourt.com/blog/setting-up-your-own-digital-garden-with-jekyll). 126 | 127 | Go forth, have fun, and learn new something every day! ✌️ 128 | -------------------------------------------------------------------------------- /_notes/안녕하세요.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 안녕하세요 3 | --- 4 | 5 | This template supports any language. Come as you are! :) 6 | 7 | -------------------------------------------------------------------------------- /_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 | layout: page 3 | title: Home 4 | id: home 5 | permalink: / 6 | --- 7 | 8 | # Welcome! 🌱 9 | 10 |

11 | Take a look at [[Your first note]] to get started on your exploration. 12 |

13 | 14 | This digital garden template is free, open-source, and [available on GitHub here](https://github.com/maximevaillancourt/digital-garden-jekyll-template). 15 | 16 | The easiest way to get started is to read this [step-by-step guide explaining how to set this up from scratch](https://maximevaillancourt.com/blog/setting-up-your-own-digital-garden-with-jekyll). 17 | 18 | Recently updated notes 19 | 20 | 28 | 29 | 34 | -------------------------------------------------------------------------------- /_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.url != current_note.url && 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 | 93 | # Edges: Graph 94 | notes_linking_to_current_note.each do |n| 95 | graph_edges << { 96 | source: note_id_from_note(n), 97 | target: note_id_from_note(current_note), 98 | } 99 | end 100 | end 101 | 102 | File.write('_includes/notes_graph.json', JSON.dump({ 103 | edges: graph_edges, 104 | nodes: graph_nodes, 105 | })) 106 | end 107 | 108 | def note_id_from_note(note) 109 | note.data['title'].bytes.join 110 | end 111 | end 112 | -------------------------------------------------------------------------------- /_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], :pre_render do |doc| 6 | replace(doc) 7 | end 8 | 9 | Jekyll::Hooks.register [:pages], :pre_render 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::DocumentFragment.parse(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 .dl { color: #d14 } /* Literal.String.Delimiter */ 72 | .highlight .ss { color: #990073 } /* Literal.String.Symbol */ 73 | .highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */ 74 | .highlight .vc { color: #008080 } /* Name.Variable.Class */ 75 | .highlight .vg { color: #008080 } /* Name.Variable.Global */ 76 | .highlight .vi { color: #008080 } /* Name.Variable.Instance */ 77 | .highlight .il { color: #009999 } /* Literal.Number.Integer.Long */ 78 | -------------------------------------------------------------------------------- /_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 | -------------------------------------------------------------------------------- /assets/image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximevaillancourt/digital-garden-jekyll-template/8a4491e32c1b67fa47c1845c691b7772fb593fe3/assets/image.jpg -------------------------------------------------------------------------------- /assets/jazzyfrenchy.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximevaillancourt/digital-garden-jekyll-template/8a4491e32c1b67fa47c1845c691b7772fb593fe3/assets/jazzyfrenchy.mp3 -------------------------------------------------------------------------------- /netlify.toml: -------------------------------------------------------------------------------- 1 | [build] 2 | command = "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 | --------------------------------------------------------------------------------