gemini-specific atom feed, fix vimeo in md
This commit is contained in:
parent
f661c06e30
commit
56034e3d04
13
config.toml
13
config.toml
|
@ -94,6 +94,8 @@ enableGitInfo = true
|
|||
[mediaTypes]
|
||||
[mediaTypes."text/gemini"]
|
||||
suffixes = ["gmi"]
|
||||
[mediaTypes."application/atom"]
|
||||
suffixes = ["xml"]
|
||||
|
||||
[outputFormats]
|
||||
[outputFormats.GEMINI]
|
||||
|
@ -104,7 +106,16 @@ enableGitInfo = true
|
|||
protocol = "gemini://"
|
||||
permalinkable = true
|
||||
path = "gemini/"
|
||||
[outputFormats.ATOM]
|
||||
name = "ATOM"
|
||||
isPlainText = false
|
||||
isHTML = true
|
||||
protocol = "gemini://"
|
||||
path = "gemini/"
|
||||
permalinkable = true
|
||||
mediaType = "application/atom"
|
||||
baseName = "atom"
|
||||
|
||||
[outputs]
|
||||
home = ["HTML", "RSS", "GEMINI"]
|
||||
home = ["HTML", "RSS", "ATOM", "GEMINI"]
|
||||
page = ["HTML", "GEMINI"]
|
||||
|
|
|
@ -9,7 +9,8 @@
|
|||
{{ $content := $content | replaceRE `\sgemini://(\S*)` " [gemini://$1](gemini://$1)" -}}
|
||||
{{ $content := $content | replaceRE `{{< audio "(.+?)" >}}` "=> https://brainbaking.com/$1 Embedded Audio link - $1" -}}
|
||||
{{ $content := $content | replaceRE `{{< video "(.+?)" >}}` "=> https://brainbaking.com/$1 Embedded Video link - $1" -}}
|
||||
{{ $content := $content | replaceRE `{{< youtube (.+?) >}}` "=> https://www.youtube.com/watch?v=$1 YouTube link to $1" -}}
|
||||
{{ $content := $content | replaceRE `{{< youtube (.+?) >}}` "=> https://www.youtube.com/watch?v=$1 YouTube Video link to $1" -}}
|
||||
{{ $content := $content | replaceRE `{{< vimeo (.+?) >}}` "=> https://vimeo.com/$1 Vimeo Video link to $1" -}}
|
||||
{{ $content := $content | replaceRE "([^`])<.*?>([^`])" "$1$2" -}}
|
||||
{{ $content := $content | replaceRE `\n\n!\[.*\]\((.+?) \"(.+?)\"\)` "\n\n=> $1 Image: $2" -}}
|
||||
{{ $content := $content | replaceRE `\n\n!\[.*]\((.+?)\)` "\n\n=> $1 Embedded Image: $1" -}}
|
||||
|
|
|
@ -28,9 +28,9 @@ If you found my bakings amusing and/or helpful, you can buy me a coffee - if you
|
|||
|
||||
## Freshly Baked Thoughts: The Gemlog
|
||||
|
||||
Behold my freshly baked thoughts for you to enjoy. If you'd like, you can subscribe to the RSS feeds. I hear they're lovely in your favorite RSS client.
|
||||
Behold my freshly baked thoughts for you to enjoy. If you'd like, you can subscribe to the Atom feeds. I hear they're lovely in your favorite Gemini client.
|
||||
|
||||
=> https://brainbaking.com/post/index.xml RSS Feeds (HTTPS)
|
||||
=> /atom.xml Gemini Atom Feed
|
||||
{{ range (where (where (where .Site.Pages "Section" "in" (slice "post")) ".Params.type" "ne" "archive") ".Params.concept" "ne" "true").GroupByDate "2006" "desc" }}{{ $year := .Key -}}
|
||||
{{ range .Pages.GroupByDate "January" }}
|
||||
### {{ .Key }} {{ $year }}
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
{{- $allowedRssSections := (slice "post" "notes") -}}
|
||||
{{- $baseurl := .Site.BaseURL -}}
|
||||
{{- $pctx := . -}}
|
||||
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
|
||||
{{- $pages := slice -}}
|
||||
{{- if or $.IsHome $.IsSection -}}
|
||||
{{- $pages = $pctx.RegularPages -}}
|
||||
{{- else -}}
|
||||
{{- $pages = $pctx.Pages -}}
|
||||
{{- end -}}
|
||||
{{- $limit := .Site.Config.Services.RSS.Limit -}}
|
||||
{{- if ge $limit 1 -}}
|
||||
{{- $pages = $pages | first $limit -}}
|
||||
{{- end -}}
|
||||
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
|
||||
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
|
||||
<title>{{ .Site.Title }}</title>
|
||||
<link rel="self" type="application/atom+xml" href="{{ .Permalink }}"/>
|
||||
<link rel="alternate" type="text/html" href="{{ .Site.BaseURL | replaceRE `https?://(.+?)` "gemini://$1" }}"/>
|
||||
<updated>{{ .Date.Format "2006-01-02T15:04:05-0700" | safeHTML }}</updated>
|
||||
<author>
|
||||
<name>{{ .Site.Author.name }}</name>
|
||||
<uri>{{ .Site.BaseURL | replaceRE `https?://(.+?)` "gemini://$1" }}</uri>
|
||||
</author>
|
||||
<id>{{ .Permalink }}</id>
|
||||
{{ range $pages }}
|
||||
{{ if in $allowedRssSections .Section }}
|
||||
<entry>
|
||||
<title>{{ .Title }}</title>
|
||||
<link rel="alternate" href="{{ .Permalink }}"/>
|
||||
<id>{{ .Permalink | replaceRE `https?://(.+?)` "gemini://$1" }}</id>
|
||||
<published>{{ .Date.Format "2006-01-02T15:04:05-0700" | safeHTML }}</published>
|
||||
<updated>{{ .Lastmod.Format "2006-01-02T15:04:05-0700" | safeHTML }}</updated>
|
||||
<summary>{{ if isset .Params "subtitle" }}{{ .Params.subtitle }}{{ else }}{{ .Summary | html }}{{ end }}</summary>
|
||||
</entry>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</feed>
|
Loading…
Reference in New Issue