]> zackmdavis.net Git - An_Algorithmic_Lucidity.git/commitdiff
render byline on individual post pages
authorZack M. Davis <code@zackmdavis.net>
Sun, 26 Jul 2026 16:05:48 +0000 (09:05 -0700)
committerZack M. Davis <code@zackmdavis.net>
Sun, 26 Jul 2026 16:05:48 +0000 (09:05 -0700)
theme/templates/article.html
theme/templates/base.html
theme/templates/includes/post_card.html

index a6b8e021a16556fa7702e785b7e747bd1b8e64b3..3f8a889bf5b8a7c8c4a82e7e518f3a2fc5984c5b 100644 (file)
@@ -8,5 +8,5 @@
 {% endblock %}
 
 {% block content %}
-    {{ post_card.render_post(article, show_source_link=True) }}
+    {{ post_card.render_post(article, show_source_link=True, show_byline=True) }}
 {% endblock %}
index 7f8ecbfc4499899ca48a3e665a5b6403283f1bbd..43c5d2dfb26d62877b7439411037ce2ec70e2b35 100644 (file)
@@ -3,6 +3,7 @@
 <head>
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <meta name="author" content="{{ AUTHOR }}">
     <title>{% block title %}{{ SITENAME }}{% endblock %}</title>
     <link rel="icon" type="image/x-icon" href="{{ SITEURL }}/favicon.ico">
     <link rel="stylesheet" type="text/css" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/style.css">
index 812437ff46df52a28423f1ea11273b031b213cae..b360e1631f19118f5d5cdb06c4016bada0be7fb6 100644 (file)
@@ -1,9 +1,16 @@
-{% macro render_post(article, full=True, show_source_link=False) %}
+{# Only article.html passes show_byline: on a single-author blog, repeating the
+   name down an index page is noise. Visible text rather than just the
+   <meta name="author"> in base.html, since extraction pipelines keep the
+   article and drop <head> -- a scraped or quoted post should carry attribution. #}
+{% macro render_post(article, full=True, show_source_link=False, show_byline=False) %}
 <article class="post">
     <h2 class="post-title">
         <a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a>
     </h2>
     <div class="post-meta">
+        {% if show_byline %}
+            <span class="post-author">by {{ article.author }}</span> |
+        {% endif %}
         <time datetime="{{ article.date.isoformat() }}">{{ article.date.strftime('%-d %B %Y') }}</time>
         {% if article.category %}
             | <a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a>