Add webrings and place posts list in any position for index pages

This commit is contained in:
hedy 2024-04-11 10:09:11 +08:00
parent 346cc5bb85
commit b2e1d87b21
Signed by: hedy
GPG Key ID: B51B5A8D1B176372
7 changed files with 30 additions and 5 deletions

View File

@ -44,6 +44,24 @@ All public projects:
=> https://sr.ht/~hedy
=> https://github.com/hedyhli
{{< posts-list >}}
## Orbits (webrings)
=> gemini://raek.se/orbits/space-elevator/ The Space Elevator
=> gemini://raek.se/orbits/space-elevator/prev?home.hedy.dev Previous
=> gemini://raek.se/orbits/space-elevator/random?home.hedy.dev Random
=> gemini://raek.se/orbits/space-elevator/next?home.hedy.dev Next
=> gemini://tilde.team/~khuxkm/leo/ LEO Orbit
=> gemini://tilde.team/~khuxkm/leo/prev.cgi?home.hedy.dev Previous
=> gemini://tilde.team/~khuxkm/leo/rand.cgi?home.hedy.dev Random
=> gemini://tilde.team/~khuxkm/leo/next.cgi?home.hedy.dev Next
=> gemini://fediring.net/ Fediring
=> gemini://fediring.net/previous/@hedy@tilde.zone Previous
=> gemini://fediring.net/random Random
=> gemini://fediring.net/next/@hedy@tilde.zone Next
## Useful links to outer space

View File

@ -27,3 +27,11 @@ Alternate versions of this site are available on
[gemini://](https://gemini.circumlunar.space) (linked at the footer),
[spartan://](https://portal.mozz.us/gemini/spartan.mozz.us), and gopher.
{{% posts-list %}}
## Webrings
[Fediring](https://fediring.net) ·
[[← Prev](https://fediring.net/previous?host=home.hedy.dev)]
[[Random](https://fediring.net/random)]
[[Next →](https://fediring.net/next?host=home.hedy.dev)]

View File

@ -1,7 +1,5 @@
{{ define "content" -}}
{{ readFile (replace (replace $.File.Path ".md" ".gmi") ".html" ".gmi") | safeHTML }}
{{ partial "posts.gmi" . }}
{{ partial "processed-content.gmi" . }}
--
{{- end }}

View File

@ -1,4 +1,3 @@
{{ define "main" }}
{{ .Content }}
{{ partial "posts.html" . }}
{{ end }}

View File

@ -12,4 +12,4 @@
{{- if .OutputFormats.Get "gemtext" }}
=> {{replace (replace .RelPermalink "/gemini" "" 1) "/index.gmi" ".gmi" 1}} {{ .Date.Format "2006-01-02" }} · {{.Title | safeHTML}}{{ end }}
{{ .Description }}
{{ end }}
{{ end -}}

View File

@ -0,0 +1 @@
{{ partial "posts.gmi" .Page }}

View File

@ -0,0 +1 @@
{{ partial "posts.html" .Page }}