diff options
| author | Jan Tuomi <jan@jantuomi.fi> | 2026-01-02 14:51:46 +0200 |
|---|---|---|
| committer | Jan Tuomi <jan@jantuomi.fi> | 2026-01-02 16:21:05 +0200 |
| commit | 0e0701cb3baf603e1773194031ab37ec779dd8ff (patch) | |
| tree | 1e289a76f7f5f4788769d1ba6dc2e74decb0f9af /templates | |
| parent | 25cf78720efb544c0c2516d1a4137035878b6a2e (diff) | |
Improvements
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/base.html | 22 | ||||
| -rw-r--r-- | templates/page.html | 3 |
2 files changed, 18 insertions, 7 deletions
diff --git a/templates/base.html b/templates/base.html index de01e9c..82f185e 100644 --- a/templates/base.html +++ b/templates/base.html @@ -12,25 +12,37 @@ name="author" content="{{ page.author | default(value=config.author) }}" /> + {% if page.date %} <meta name="dcterms.date" content="{{ page.date }}" /> - {% endif %} {% if page.extra.keywords %} + {% endif %} + + {% if page.extra.keywords %} <meta name="keywords" content="{{ page.extra.keywords | join(sep=', ') }}" /> - {% endif %} {% block title %} {% if page.title %} + {% endif %} + + {% block title %} + {% if page.title %} <title>{{ page.title }} — {{ config.title }}</title> + {% elif section.title %} + <title>{{ section.title }} — {{ config.title }}</title> {% else %} <title>{{ config.title }}</title> - {% endif %} {% endblock %} {% block description %} {% if - page.description %} + {% endif %} + {% endblock %} + + {% block description %} + {% if page.description %} <meta name="description" content="{{ page.description }}" /> {% elif page.summary %} <meta name="description" content="{{ page.summary | striptags }}" /> {% else %} <meta name="description" content="{{ config.description }}" /> - {% endif %} {% endblock %} + {% endif %} + {% endblock %} <style> @font-face { diff --git a/templates/page.html b/templates/page.html index c6be731..6c288d1 100644 --- a/templates/page.html +++ b/templates/page.html @@ -10,8 +10,7 @@ <small>[{{ page.extra.kind }}]</small> </h1> -{{ page.content | replace(from="<!-- toc -->", to=macros::toc(page=page)) | safe -}} +{{ page.content | replace(from="<!-- toc -->", to=macros::toc(page=page)) | safe }} <nav class="post-nav" aria-label="Post navigation"> {% if page.higher %} |
