]> git.zndr.dk Git - zndr-11ty.git/commitdiff
Align page layouts
authorJannik ZANDER <jzander@grundfos.com>
Wed, 10 Sep 2025 03:55:58 +0000 (05:55 +0200)
committerJannik ZANDER <jzander@grundfos.com>
Wed, 10 Sep 2025 03:55:58 +0000 (05:55 +0200)
site/_includes/layouts/blog.njk
site/_includes/layouts/page.njk [new file with mode: 0644]
site/about.md
site/blog/index.njk

index e0c8adcc1e0b3088f09180805f15eb193db6367a..a9b6632af24ef9edcf08af3ec918b1b8b8806360 100644 (file)
@@ -1,10 +1,9 @@
-{# site/_includes/layouts/blog.njk #}
 {% extends "layouts/base.njk" %}
 
 {% block content %}
-  <!-- USING layouts/blog.njk -->
   <article class="post">
-    <h1>{{ title or page.fileSlug | title }}</h1>
+    <h1>{{ title or page.fileSlug | capitalize }}</h1>
+
     {% if page.date %}
       <p class="post-meta">Published {{ page.date | ymd }}</p>
     {% endif %}
diff --git a/site/_includes/layouts/page.njk b/site/_includes/layouts/page.njk
new file mode 100644 (file)
index 0000000..b617c8a
--- /dev/null
@@ -0,0 +1,10 @@
+{% extends "layouts/base.njk" %}
+
+{% block content %}
+    {% if title %}<h1>{{ title }}</h1>{% endif %}
+
+    <div class="post-body">
+      {{ content | safe }}
+    </div>
+{% endblock %}
+
index 19becc094936c17f8345256b1f680fe56ddeede7..3aec1848e7056ea9cc666699948a8ea66d227a7a 100644 (file)
@@ -1,10 +1,8 @@
 ---
-layout: layouts/base.njk
-title: About — zndr.dk
+title: About
+layout: layouts/page.njk
 ---
 
-# About
-
 Tiny landing page for links to self‑hosted services. Reach me at [jannik@zndr.dk](mailto:jannik@zndr.dk).
 
 **Jannik Zander**  
index 623d340f174e30616cea510b86e949035fa3f90e..c0733101b0872d141396443c53c8ff58d40aebea 100644 (file)
@@ -1,14 +1,17 @@
 ---
-layout: layouts/base.njk
-title: Blog — zndr.dk
+title: Blog
+layout: layouts/page.njk
 permalink: /blog/
 ---
 
 <ul>
   {% for post in collections.blog %}
     <li>
-      <a href="{{ post.url }}">{{ post.data.title }}</a>
+      <a href="{{ post.url }}">
+        {{ post.data.title or post.fileSlug | capitalize }}
+      </a>
       <small> — {{ post.date | ymd }}</small>
     </li>
   {% endfor %}
 </ul>
+