aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorMitja Felicijan <mitja.felicijan@gmail.com>2024-06-22 19:30:56 +0200
committerMitja Felicijan <mitja.felicijan@gmail.com>2024-06-22 19:30:56 +0200
commit5269ad50ddb0b641aa96dac7c8f49b156646d4c4 (patch)
tree281934bf6cbece774b18d1fbda4d8fe764c93ae2 /templates
parent4dccae11c13ccefbafb4e58bcbaf4166900d6e94 (diff)
downloadmitjafelicijan.com-5269ad50ddb0b641aa96dac7c8f49b156646d4c4.tar.gz
Better filtering
Diffstat (limited to 'templates')
-rw-r--r--templates/note.html4
-rw-r--r--templates/post.html11
2 files changed, 11 insertions, 4 deletions
diff --git a/templates/note.html b/templates/note.html
index 5f3f928..c543773 100644
--- a/templates/note.html
+++ b/templates/note.html
@@ -17,8 +17,8 @@
17 <p><big><strong>Other notes</strong></big></p> 17 <p><big><strong>Other notes</strong></big></p>
18 <ul itemscope itemtype="https://schema.org/SiteNavigationElement" role="list" aria-label="Other notes"> 18 <ul itemscope itemtype="https://schema.org/SiteNavigationElement" role="list" aria-label="Other notes">
19 <meta itemprop="name" content="Other notes"> 19 <meta itemprop="name" content="Other notes">
20 {{ range random 20 .Pages }} 20 {{ range .Pages | filterbytype "note" | random 15 }}
21 {{ if and (eq .Type "note") (not .Draft) }} 21 {{ if not .Draft }}
22 <li> 22 <li>
23 {{ range .Meta.tags }} 23 {{ range .Meta.tags }}
24 <mark>{{ . }}</mark> 24 <mark>{{ . }}</mark>
diff --git a/templates/post.html b/templates/post.html
index c8925fa..1fbdd04 100644
--- a/templates/post.html
+++ b/templates/post.html
@@ -4,6 +4,13 @@
4{{ define "description" }}{{ .Page.Summary }}{{ end }} 4{{ define "description" }}{{ .Page.Summary }}{{ end }}
5 5
6{{ define "content" }} 6{{ define "content" }}
7
8<ul>
9 {{ range .Pages | filterbytype "post" | random 10 }}
10 <li><a href="{{ .RelPermalink }}">{{ .Type }} - {{ .Title }}</a></li>
11 {{ end }}
12</ul>
13
7<section> 14<section>
8 <h1>{{ .Page.Title }}</h1> 15 <h1>{{ .Page.Title }}</h1>
9 <p><cap>{{ .Page.Type }}</cap>, {{ .Page.Created.Format "Jan 2, 2006" }}, on <a href="{{ .Config.BaseURL }}">{{ .Config.Title }}'s blog</a></p> 16 <p><cap>{{ .Page.Type }}</cap>, {{ .Page.Created.Format "Jan 2, 2006" }}, on <a href="{{ .Config.BaseURL }}">{{ .Config.Title }}'s blog</a></p>
@@ -17,8 +24,8 @@
17 <p><big><strong>Other posts</strong></big></p> 24 <p><big><strong>Other posts</strong></big></p>
18 <ul itemscope itemtype="https://schema.org/SiteNavigationElement" role="list" aria-label="Other posts"> 25 <ul itemscope itemtype="https://schema.org/SiteNavigationElement" role="list" aria-label="Other posts">
19 <meta itemprop="name" content="Other post"> 26 <meta itemprop="name" content="Other post">
20 {{ range random 20 .Pages }} 27 {{ range .Pages | filterbytype "post" | random 15 }}
21 {{ if and (eq .Type "post") (not .Draft) }} 28 {{ if not .Draft }}
22 <li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li> 29 <li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
23 {{ end }} 30 {{ end }}
24 {{ end }} 31 {{ end }}