blog.hugopoi.net/v2/add-legacy-urls-to-posts-list.patch

29 lines
743 B
Diff

--- themes/cupper-hugo-theme/layouts/_default/list.html 2022-12-05 19:56:43.667815118 +0100
+++ themes/cupper-hugo-theme/layouts/_default/list.html 2022-12-18 17:11:11.846547314 +0100
@@ -27,6 +27,25 @@
</h2>
</li>
{{ end }}
+ {{ if (eq .Type "post") }}
+ {{ range $.Site.Data.LegacyBlogUrls }}
+ <li>
+ <h2>
+ <a href="{{ .url }}">
+ <svg
+ class="bookmark"
+ aria-hidden="true"
+ viewBox="0 0 40 50"
+ focusable="false"
+ >
+ <use href="#bookmark"></use>
+ </svg>
+ {{ .metas.title }}
+ </a>
+ </h2>
+ </li>
+ {{ end }}
+ {{ end }}
</ul>
</main>
{{ end }}