diff --git a/_config.yml b/_config.yml index 3e19981..655501c 100644 --- a/_config.yml +++ b/_config.yml @@ -12,3 +12,9 @@ collections: notes: output: true permalink: /:slug/ + +defaults: + - scope: + path: "_notes/**/*.md" + values: + layout: "note" diff --git a/_layouts/note.html b/_layouts/note.html new file mode 100644 index 0000000..5b1d317 --- /dev/null +++ b/_layouts/note.html @@ -0,0 +1,18 @@ +--- +layout: default +--- + +{{ content }} + +
+ {% if page.backlinks.size > 0 %} +

Notes mentioning this note

+
+ {% for backlink in page.backlinks %} + + {% endfor %} +
+ {% endif %} +
diff --git a/_notes/test-2.md b/_notes/test-2.md new file mode 100644 index 0000000..a422a48 --- /dev/null +++ b/_notes/test-2.md @@ -0,0 +1,5 @@ +--- +title: "Another note" +--- + +[[test]] \ No newline at end of file diff --git a/_notes/test.md b/_notes/test.md index d1e1dd7..d3081cd 100644 --- a/_notes/test.md +++ b/_notes/test.md @@ -1,6 +1,5 @@ --- title: "Hello World" -layout: default --- Hello World