diff --git a/source/_includes/notes/links.html.twig b/source/_includes/notes/links.html.twig
new file mode 100644
index 000000000..374fd3dc7
--- /dev/null
+++ b/source/_includes/notes/links.html.twig
@@ -0,0 +1,9 @@
+{% if links is not empty %}
+
Links
+
+
+ {% for url in links %}
+ - {{ url }}
+ {% endfor %}
+
+{% endif %}
diff --git a/source/_includes/notes/related.html.twig b/source/_includes/notes/related.html.twig
new file mode 100644
index 000000000..0caea6051
--- /dev/null
+++ b/source/_includes/notes/related.html.twig
@@ -0,0 +1,13 @@
+{% if related and notes %}
+
+ Related
+
+
+ {% for note in notes if related|filter((title) => title == note.title) %}
+ -
+ {{ note.title }}
+
+ {% endfor %}
+
+
+{% endif %}
diff --git a/source/_includes/notes/tags.html.twig b/source/_includes/notes/tags.html.twig
new file mode 100644
index 000000000..3cefffa5e
--- /dev/null
+++ b/source/_includes/notes/tags.html.twig
@@ -0,0 +1,10 @@
+{% if tags is not empty %}
+ Tags
+
+
+ {% for tag in tags|sort %}
+ - {{ tag }}
+ {% endfor %}
+
+{% endif %}
+
diff --git a/source/_layouts/note.html.twig b/source/_layouts/note.html.twig
index dfac32b82..bf7ac5d79 100644
--- a/source/_layouts/note.html.twig
+++ b/source/_layouts/note.html.twig
@@ -13,37 +13,13 @@
{% block content %}{% endblock %}
- {% if page.links is not empty %}
- Links
+ {% include "notes/links" with { links: page.links } %}
-
- {% for url in page.links %}
- - {{ url }}
- {% endfor %}
-
- {% endif %}
+ {% include "notes/related" with {
+ notes: data.notes,
+ related: page.related,
+ } %}
- {% if page.tags is not empty %}
- Tags
+{% include "notes/tags" with { tags: page.tags } %}
-
- {% for tag in page.tags|sort %}
- - {{ tag }}
- {% endfor %}
-
- {% endif %}
-
- {% if page.related and data.notes %}
-
- Related
-
-
- {% for note in data.notes if page.related|filter((title) => title == note.title) %}
- -
- {{ note.title }}
-
- {% endfor %}
-
-
- {% endif %}
{% endblock %}