Skip to content

Commit 144e32d

Browse files
Initial commit
0 parents  commit 144e32d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1909
-0
lines changed

.github/FUNDING.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: maximevaillancourt

.github/ISSUE_TEMPLATE/bug_report.md

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
name: Bug report
3+
about: Something's broken with the template
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
<!-- If you're requesting a new feature or suggesting an idea, please use the "Discussions" tab instead of opening a new issue. Thank you! -->
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]
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
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+
<!-- If you're requesting a new feature or suggesting an idea, please use the "Discussions" tab instead of opening a new issue. Thank you! -->

.github/dependabot.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
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"

.github/workflows/jekyll.yml

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
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

.gitignore

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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/

.ruby-version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.2.1

404.html

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
permalink: 404.html
3+
layout: default
4+
title: "404"
5+
id: "not-found"
6+
---
7+
8+
<div>
9+
<h1>Oops, that's a 404. 🙈</h1>
10+
<p>Looks like this page doesn't exist. <a href="{{ site.baseurl }}/">Return home</a> to get a fresh start.</p>
11+
</div>

Gemfile

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
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.3"
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.8"
10+
gem "nokogiri"

Gemfile.lock

+90
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
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.6)
14+
public_suffix (>= 2.0.2, < 6.0)
15+
colorator (1.1.0)
16+
concurrent-ruby (1.2.2)
17+
em-websocket (0.5.3)
18+
eventmachine (>= 0.12.9)
19+
http_parser.rb (~> 0)
20+
eventmachine (1.2.7)
21+
ffi (1.16.3)
22+
forwardable-extended (2.6.0)
23+
google-protobuf (3.25.1)
24+
http_parser.rb (0.8.0)
25+
i18n (1.14.1)
26+
concurrent-ruby (~> 1.0)
27+
jekyll (4.3.3)
28+
addressable (~> 2.4)
29+
colorator (~> 1.0)
30+
em-websocket (~> 0.5)
31+
i18n (~> 1.0)
32+
jekyll-sass-converter (>= 2.0, < 4.0)
33+
jekyll-watch (~> 2.0)
34+
kramdown (~> 2.3, >= 2.3.1)
35+
kramdown-parser-gfm (~> 1.0)
36+
liquid (~> 4.0)
37+
mercenary (>= 0.3.6, < 0.5)
38+
pathutil (~> 0.9)
39+
rouge (>= 3.0, < 5.0)
40+
safe_yaml (~> 1.0)
41+
terminal-table (>= 1.8, < 4.0)
42+
webrick (~> 1.7)
43+
jekyll-sass-converter (3.0.0)
44+
sass-embedded (~> 1.54)
45+
jekyll-watch (2.2.1)
46+
listen (~> 3.0)
47+
kramdown (2.4.0)
48+
rexml
49+
kramdown-parser-gfm (1.1.0)
50+
kramdown (~> 2.0)
51+
liquid (4.0.4)
52+
listen (3.8.0)
53+
rb-fsevent (~> 0.10, >= 0.10.3)
54+
rb-inotify (~> 0.9, >= 0.9.10)
55+
mercenary (0.4.0)
56+
mini_portile2 (2.8.5)
57+
nokogiri (1.16.2)
58+
mini_portile2 (~> 2.8.2)
59+
racc (~> 1.4)
60+
pathutil (0.16.2)
61+
forwardable-extended (~> 2.6)
62+
posix-spawn (0.3.15)
63+
public_suffix (5.0.4)
64+
racc (1.7.3)
65+
rake (13.1.0)
66+
rb-fsevent (0.11.2)
67+
rb-inotify (0.10.1)
68+
ffi (~> 1.0)
69+
rexml (3.2.6)
70+
rouge (4.2.0)
71+
safe_yaml (1.0.5)
72+
sass-embedded (1.69.6)
73+
google-protobuf (~> 3.25)
74+
rake (>= 13.0.0)
75+
terminal-table (3.0.2)
76+
unicode-display_width (>= 1.1.1, < 3)
77+
unicode-display_width (2.5.0)
78+
webrick (1.8.1)
79+
80+
PLATFORMS
81+
ruby
82+
83+
DEPENDENCIES
84+
jekyll (~> 4.3)
85+
jekyll-last-modified-at!
86+
nokogiri
87+
webrick (~> 1.8)
88+
89+
BUNDLED WITH
90+
2.2.3

LICENSE

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
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

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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+
<img width="1522" alt="Screen Shot 2020-05-19 at 23 05 46" src="https://user-images.githubusercontent.com/8457808/82400515-7d026d80-9a25-11ea-83f1-3b9cb8347e07.png">
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).

_config.yml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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"

_includes/footer.html

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This is the footer. Include anything you'd like here, like a link to an <a class="internal-link" href="{{ site.baseurl }}/about">About</a> page.

_includes/head.html

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<head>
2+
<meta charset="UTF-8">
3+
4+
<link rel="canonical" href="{{ site.url }}{{ page.url }}" />
5+
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
8+
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.title }}{% endif %}">
9+
10+
<meta property="og:site_name" content="{{ site.title }}">
11+
12+
<link rel="icon" type="image/png" href="data:image/png;base64,iVBORw0KGgo=">
13+
14+
<link rel="stylesheet" href="{{ site.baseurl }}/styles.css">
15+
16+
{% if page.excerpt %}
17+
<meta property="og:description" content="{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}"/>
18+
{% else %}
19+
<meta property="og:description" content="{{ site.title | strip_html | strip_newlines | truncate: 160 }}"/>
20+
{% endif %}
21+
22+
{% if page.title %}
23+
<meta property="og:title" content="{{ page.title }}">
24+
<meta property="og:type" content="article">
25+
{% else %}
26+
<meta property="og:title" content="{{ site.title }}">
27+
<meta property="og:type" content="website">
28+
{% endif %}
29+
30+
{% if page.date %}
31+
<meta property="article:published_time" content="{{ page.date | date_to_xmlschema }}">
32+
<meta property="article:author" content="{{ site.url }}/">
33+
{% endif %}
34+
35+
<meta property="og:url" content="{{ site.url }}{{ page.url }}" />
36+
37+
{% if page.image %}
38+
<meta property="og:image" content="{{ site.url }}{{ page.image }}">
39+
{% endif %}
40+
41+
<title>
42+
{% if page.id == "home" %}
43+
{{ site.title }}
44+
{% else %}
45+
{{ page.title }} &mdash; {{ site.title }}
46+
{% endif %}
47+
</title>
48+
</head>

0 commit comments

Comments
 (0)