diff --git a/config/_default/config.toml b/config/_default/config.toml index c53c5f3..9f0125b 100644 --- a/config/_default/config.toml +++ b/config/_default/config.toml @@ -68,6 +68,12 @@ disableKinds = ["RSS"] # kick out RSS baseName = "index" NoUgly = true +[outputFormats.gopher] +MediaType = "text/plain" +BaseName = "gophermap" +isPlainText = true +Protocol = "gopher://" +noUgly = false [outputFormats.ATOM] MediaType = "application/atom+xml" @@ -101,10 +107,10 @@ isHTML = true notAlternative = true [outputs] -home = [ "HTML", "ATOM", "JSON", "HumansTXT", "Tootpick"] -section = [ "HTML", ] -page = [ "HTML" ] -taxonomy = [ "HTML" ] +home = [ "HTML", "gopher", "ATOM", "JSON", "HumansTXT", "Tootpick"] +section = [ "HTML", "gopher" ] +page = [ "HTML", "gopher" ] +taxonomy = [ "HTML", "gopher" ] #taxonomyTerm = [ "HTML" ] [related] diff --git a/layouts/_default/list.gopher.txt b/layouts/_default/list.gopher.txt new file mode 100644 index 0000000..ebbce75 --- /dev/null +++ b/layouts/_default/list.gopher.txt @@ -0,0 +1,7 @@ +!{{ .Title }} + +{{ .RawContent }} + +{{ range .Pages.ByPublishDate.Reverse }} +0{{ .Title }} {{ with .OutputFormats.Get "gopher" -}}{{ .RelPermalink }} {{ $.Site.Params.hostname}} 70 {{ end }} +{{ end }} diff --git a/layouts/_default/single.gopher.txt b/layouts/_default/single.gopher.txt new file mode 100644 index 0000000..30eca04 --- /dev/null +++ b/layouts/_default/single.gopher.txt @@ -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 }} diff --git a/layouts/index.gopher.txt b/layouts/index.gopher.txt new file mode 100644 index 0000000..6475ded --- /dev/null +++ b/layouts/index.gopher.txt @@ -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 }} diff --git a/layouts/partials/related.html b/layouts/partials/related.html index 9465ba4..38a5107 100644 --- a/layouts/partials/related.html +++ b/layouts/partials/related.html @@ -3,7 +3,7 @@ "indices" (slice "tags") }} {{ $related := .Site.RegularPages.Related . | first 5 }} {{ with $related }} -

Related Posts

+

Related Posts