Add the backlink and the note layout
This commit is contained in:
@@ -12,3 +12,9 @@ collections:
|
|||||||
notes:
|
notes:
|
||||||
output: true
|
output: true
|
||||||
permalink: /:slug/
|
permalink: /:slug/
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
- scope:
|
||||||
|
path: "_notes/**/*.md"
|
||||||
|
values:
|
||||||
|
layout: "note"
|
||||||
|
|||||||
18
_layouts/note.html
Normal file
18
_layouts/note.html
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
---
|
||||||
|
layout: default
|
||||||
|
---
|
||||||
|
|
||||||
|
{{ content }}
|
||||||
|
|
||||||
|
<div>
|
||||||
|
{% if page.backlinks.size > 0 %}
|
||||||
|
<h3>Notes mentioning this note</h3>
|
||||||
|
<div>
|
||||||
|
{% for backlink in page.backlinks %}
|
||||||
|
<div class="backlink-box">
|
||||||
|
<a class="internal-link" href="{{ site.baseurl }}{{ backlink.url }}{%- if site.use_html_extension -%}.html{%- endif -%}">{{ backlink.title }}</a><br>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
5
_notes/test-2.md
Normal file
5
_notes/test-2.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
title: "Another note"
|
||||||
|
---
|
||||||
|
|
||||||
|
[[test]]
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
---
|
---
|
||||||
title: "Hello World"
|
title: "Hello World"
|
||||||
layout: default
|
|
||||||
---
|
---
|
||||||
|
|
||||||
Hello World
|
Hello World
|
||||||
|
|||||||
Reference in New Issue
Block a user