Add gopher pages
This commit is contained in:
parent
8632656034
commit
24868e6a39
5 changed files with 39 additions and 5 deletions
|
@ -68,6 +68,12 @@ disableKinds = ["RSS"] # kick out RSS
|
||||||
baseName = "index"
|
baseName = "index"
|
||||||
NoUgly = true
|
NoUgly = true
|
||||||
|
|
||||||
|
[outputFormats.gopher]
|
||||||
|
MediaType = "text/plain"
|
||||||
|
BaseName = "gophermap"
|
||||||
|
isPlainText = true
|
||||||
|
Protocol = "gopher://"
|
||||||
|
noUgly = false
|
||||||
|
|
||||||
[outputFormats.ATOM]
|
[outputFormats.ATOM]
|
||||||
MediaType = "application/atom+xml"
|
MediaType = "application/atom+xml"
|
||||||
|
@ -101,10 +107,10 @@ isHTML = true
|
||||||
notAlternative = true
|
notAlternative = true
|
||||||
|
|
||||||
[outputs]
|
[outputs]
|
||||||
home = [ "HTML", "ATOM", "JSON", "HumansTXT", "Tootpick"]
|
home = [ "HTML", "gopher", "ATOM", "JSON", "HumansTXT", "Tootpick"]
|
||||||
section = [ "HTML", ]
|
section = [ "HTML", "gopher" ]
|
||||||
page = [ "HTML" ]
|
page = [ "HTML", "gopher" ]
|
||||||
taxonomy = [ "HTML" ]
|
taxonomy = [ "HTML", "gopher" ]
|
||||||
#taxonomyTerm = [ "HTML" ]
|
#taxonomyTerm = [ "HTML" ]
|
||||||
|
|
||||||
[related]
|
[related]
|
||||||
|
|
7
layouts/_default/list.gopher.txt
Normal file
7
layouts/_default/list.gopher.txt
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
!{{ .Title }}
|
||||||
|
|
||||||
|
{{ .RawContent }}
|
||||||
|
|
||||||
|
{{ range .Pages.ByPublishDate.Reverse }}
|
||||||
|
0{{ .Title }} {{ with .OutputFormats.Get "gopher" -}}{{ .RelPermalink }} {{ $.Site.Params.hostname}} 70 {{ end }}
|
||||||
|
{{ end }}
|
8
layouts/_default/single.gopher.txt
Normal file
8
layouts/_default/single.gopher.txt
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
# {{ .Title }}
|
||||||
|
|
||||||
|
{{ .Date.Format (.Site.Params.dateform | default "January 2006") }} · {{ .ReadingTime }} minute read
|
||||||
|
{{ if .Params.tags }}
|
||||||
|
Posted in: {{ range .Params.tags }}{{ . }} {{ end }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ .RawContent }}
|
13
layouts/index.gopher.txt
Normal file
13
layouts/index.gopher.txt
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
!{{ .Title }}
|
||||||
|
|
||||||
|
{{ .RawContent }}
|
||||||
|
|
||||||
|
Site sections:
|
||||||
|
{{ range .Site.Menus.main }}
|
||||||
|
1{{ .Name }} {{ .Identifier }} {{ $.Site.Params.hostname }} 70
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
Most recent articles
|
||||||
|
{{ range first 3 .Pages.ByPublishDate.Reverse }}
|
||||||
|
0{{ .Title }} {{ with .OutputFormats.Get "gopher" -}}{{ .RelPermalink }} {{ $.Site.Params.hostname }} 70 {{ end }}
|
||||||
|
{{ end }}
|
|
@ -3,7 +3,7 @@
|
||||||
"indices" (slice "tags")
|
"indices" (slice "tags")
|
||||||
}}
|
}}
|
||||||
{{ $related := .Site.RegularPages.Related . | first 5 }} {{ with $related }}
|
{{ $related := .Site.RegularPages.Related . | first 5 }} {{ with $related }}
|
||||||
<h3>Related Posts</h3>
|
<h2>Related Posts</h2>
|
||||||
<ul>
|
<ul>
|
||||||
{{ range . }}
|
{{ range . }}
|
||||||
{{ if and (eq .Section "posts") .IsPage }}
|
{{ if and (eq .Section "posts") .IsPage }}
|
||||||
|
|
Loading…
Add table
Reference in a new issue