diff --git a/config/_default/config.toml b/config/_default/config.toml index 76f878e..80e016b 100644 --- a/config/_default/config.toml +++ b/config/_default/config.toml @@ -118,7 +118,7 @@ notAlternative = true [outputs] home = [ "HTML", "gopher", "gemini", "ATOM", "JSON", "HumansTXT", "Tootpick"] -section = [ "HTML", "gopher" ] +section = [ "HTML" ] page = [ "HTML", "gopher", "gemini" ] taxonomy = [ "HTML", "gopher" ] #taxonomyTerm = [ "HTML" ] diff --git a/layouts/_default/single.gmi b/layouts/_default/single.gmi index 4701912..c107d0f 100644 --- a/layouts/_default/single.gmi +++ b/layouts/_default/single.gmi @@ -1,15 +1,13 @@ # {{ .Title }} -{{ .RawContent }} +{{ $content := .RawContent -}} +{{ $content := $content | replaceRE `{{<\s*(?:rel)?ref\s+"([^"]+)"\s*>}}` "$1" -}} +{{ $content := $content | replaceRE `{{<\s*figure\s*(?:.*)?src="([^"]+)"(?:.*)?caption="([^"]+)"(?:.*)?>}}` "![$2]($1)" -}} +{{ $content := $content | replaceRE `{{<\s*image\s*.*?src="([^"]+)".*?>}}` "![]($1)" -}} +{{ $content := $content | replaceRE `\!\[(.+?)\]\((.+?)\)` "=> $2 Image: $1" -}} -{{- $content := .RawContent -}} -{{- $content = $content | replaceRE `\!\[(.+?)\]\((.+?)\)` "=> $2 Image: $1" }} {{ $content }} -{{- range findRE `\[.+?\]\(.+?\)` $content }} - {{- $content = $content | replaceRE `\[(.+?)\]\((.+?)\)(.+)` "$1$3\n\n=> $2 $1 " }} -{{- end }} - {{ if .Next }}=> {{ .Next.RelPermalink }} ← Newer: {{ .Next.Title }}{{ end }} {{ if .Prev -}}=> {{ .Prev.RelPermalink }} → Older: {{ .Prev.Title }}{{- end }} diff --git a/layouts/index.gmi b/layouts/index.gmi index 8a8fd40..c37255d 100644 --- a/layouts/index.gmi +++ b/layouts/index.gmi @@ -1,14 +1,36 @@ -## List of posts +# oe7drt.com -{{ range .RegularPages }} +Welcome to my personal Gemini space! + +This is my personal space on the internet that I use mainly to keep track on +different topics mainly on tech stuff like amateur radio or general computer +related topics with some flavour of Linux and networking (and a bit of *BSD) + +I will probably also publish more non-tech stuff within the Outdoor and DIY +categories on the equipment page. + +=> gopher://oe7drt.com/ View via Gopher +=> https://oe7drt.com/ View via HTTPS +=> http://5uxkejb6la7olhncaotybxrscmdlbxwy64ucuyrum4tsgfuoxbyav2qd.onion/ View via Tor Hidden Service + +=> /about/ About this Gemini capsule +=> /archives/ Archives + +## Pages + +{{ range (where .RegularPages "Params.gemini" "ne" "false") }} => {{ .RelPermalink }} {{ .Title }} {{- end }} -## Posts grouped by year +## Notes -{{ range .RegularPages.GroupByDate "2006" }} -### {{ .Key }} -{{ range .Pages.ByDate.Reverse }} +{{ range (where (where .Site.RegularPages.ByDate.Reverse "Section" "in" (slice "notes")) ".Params.gemini" "ne" "false") }} => {{ .RelPermalink }} {{ .Title }} {{- end }} -{{ end }} + +## Equipment + +{{ range (where (where .Site.RegularPages.ByDate.Reverse "Section" "in" (slice "equipment")) ".Params.gemini" "ne" "false") }} +=> {{ .RelPermalink }} {{ .Title }} +{{- end }} +