add rss-only posts

This commit is contained in:
Amolith 2023-05-21 01:57:58 -04:00
parent 35ae60f85e
commit d8c9cd1e84
Signed by: Amolith
GPG Key ID: 8AE30347CE28D101
3 changed files with 9 additions and 0 deletions

View File

@ -2,5 +2,6 @@
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
draft: true
rss_only: true
cover: ./cover.png
---

View File

@ -26,6 +26,8 @@
<div class="posts">
<ul class="posts-list">
{{- range .Pages }}
{{- if .Params.rss_only }}
{{- else }}
<li class="posts-item">
<a href="{{.Permalink}}">
<span class="posts-title">{{.Title}}</span>
@ -39,6 +41,7 @@
</p>
</li>
{{- end }}
{{- end }}
</ul>
</div>
</div>

View File

@ -15,6 +15,11 @@
</aside>
{{- end }}
<div class="content">
{{- if .Params.rss_only }}
<aside class="admonition note">
<p><strong>Note:</strong> this is an RSS-only post; it's exclusively publicised through <a href="/posts/index.xml">my RSS feed.</a> Read about <a href="https://daverupert.com/2018/01/welcome-to-rss-club/">RSS Club</a> for more information.</p>
</aside>
{{- end }}
{{ .Content | replaceRE "(<h[1-6] id=\"(.+)\".*>)(.*)(</h[1-6]>)" `${1}${3} <a class="anchor-tag" ariaLabel="Anchor" href="#${2}"></a>${4}` | safeHTML }}
</div>
<hr/>