mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-10 00:12:09 +00:00
Add combined Atom feed
This commit is contained in:
parent
1782aeeda6
commit
13a2595482
3 changed files with 21 additions and 11 deletions
|
@ -2,6 +2,7 @@
|
||||||
outputs:
|
outputs:
|
||||||
- html
|
- html
|
||||||
- gemtext
|
- gemtext
|
||||||
|
- atom
|
||||||
title: Seirdy's Home
|
title: Seirdy's Home
|
||||||
description: "Seirdy's Home: personal website and blog for Rohan Kumar, A.K.A. Seirdy. I write about and develop software to promote user autonomy."
|
description: "Seirdy's Home: personal website and blog for Rohan Kumar, A.K.A. Seirdy. I write about and develop software to promote user autonomy."
|
||||||
sitemap:
|
sitemap:
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
{{- $pages := (where site.RegularPages "Section" .Section) -}}
|
{{- $pages := (where site.RegularPages "Section" .Section) -}}
|
||||||
{{- if .IsHome }}
|
|
||||||
{{- $pages = .Site.RegularPages -}}
|
|
||||||
{{ end -}}
|
|
||||||
{{- $type := "article" -}}
|
|
||||||
{{- $period := "daily" -}}
|
{{- $period := "daily" -}}
|
||||||
|
{{- $title := .Section | humanize -}}
|
||||||
|
{{- if .IsHome }}
|
||||||
|
{{- $title = "All content" -}}
|
||||||
|
{{- $pages = .Site.RegularPages -}}
|
||||||
|
{{- $period = "hourly" -}}
|
||||||
|
{{ end -}}
|
||||||
{{- if eq .Section "notes" -}}
|
{{- if eq .Section "notes" -}}
|
||||||
{{- $type = "note" -}}
|
|
||||||
{{- $period = "hourly" -}}
|
{{- $period = "hourly" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- $icon_svg := resources.Get "/favicon.svg" | resources.Fingerprint "md5" -}}
|
{{- $icon_svg := resources.Get "/favicon.svg" | resources.Fingerprint "md5" -}}
|
||||||
|
@ -20,7 +21,7 @@
|
||||||
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
|
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
|
||||||
xmlns:thr="http://purl.org/syndication/thread/1.0"
|
xmlns:thr="http://purl.org/syndication/thread/1.0"
|
||||||
xml:lang="{{ .Site.LanguageCode }}">
|
xml:lang="{{ .Site.LanguageCode }}">
|
||||||
<title>{{ .Section | humanize}} on {{ .Site.Title }}</title>
|
<title>{{ $title }} on {{ .Site.Title }}</title>
|
||||||
<link rel="self" type="application/atom+xml" href="{{ .Permalink }}atom.xml" />
|
<link rel="self" type="application/atom+xml" href="{{ .Permalink }}atom.xml" />
|
||||||
<logo>{{ $icon_png.Permalink }}</logo>
|
<logo>{{ $icon_png.Permalink }}</logo>
|
||||||
<icon>{{ .Site.Params.icon | absURL }}</icon>
|
<icon>{{ .Site.Params.icon | absURL }}</icon>
|
||||||
|
@ -62,6 +63,10 @@
|
||||||
{{ partial "processed-content.html" . | replaceRE `(?: )?(?:item(type|scope|prop|id|ref)="[^"]*"|class="language-figure")` "" | safeHTML }}
|
{{ partial "processed-content.html" . | replaceRE `(?: )?(?:item(type|scope|prop|id|ref)="[^"]*"|class="language-figure")` "" | safeHTML }}
|
||||||
</div>
|
</div>
|
||||||
</content>
|
</content>
|
||||||
|
{{- $type := "article" -}}
|
||||||
|
{{- if eq .Section "notes" -}}
|
||||||
|
{{- $type = "note" -}}
|
||||||
|
{{- end -}}
|
||||||
<activity:object-type>http://activitystrea.ms/schema/1.0/{{ $type }}</activity:object-type>
|
<activity:object-type>http://activitystrea.ms/schema/1.0/{{ $type }}</activity:object-type>
|
||||||
<activity:verb>http://activitystrea.ms/schema/1.0/post</activity:verb>
|
<activity:verb>http://activitystrea.ms/schema/1.0/post</activity:verb>
|
||||||
</entry>
|
</entry>
|
||||||
|
|
|
@ -21,14 +21,18 @@
|
||||||
{{ $webmanifest := resources.Get "/manifest.webmanifest" | resources.ExecuteAsTemplate "manifest.webmanifest" . | resources.Minify | resources.Fingerprint "md5" -}}
|
{{ $webmanifest := resources.Get "/manifest.webmanifest" | resources.ExecuteAsTemplate "manifest.webmanifest" . | resources.Minify | resources.Fingerprint "md5" -}}
|
||||||
{{- printf `<link href="%s" rel="manifest" />` $webmanifest.RelPermalink | safeHTML -}}
|
{{- printf `<link href="%s" rel="manifest" />` $webmanifest.RelPermalink | safeHTML -}}
|
||||||
<!--Feeds for both notes and posts; posts come first unless we're in the notes section.-->
|
<!--Feeds for both notes and posts; posts come first unless we're in the notes section.-->
|
||||||
{{- $isNotes := false -}}
|
|
||||||
{{- if or (eq .Section "notes") (eq .Title "Notes") -}}
|
{{- if or (eq .Section "notes") (eq .Title "Notes") -}}
|
||||||
{{- $isNotes = true -}}
|
|
||||||
<link rel="alternate" type="application/atom+xml" href="{{ site.BaseURL }}notes/atom.xml" title="Notes" />
|
<link rel="alternate" type="application/atom+xml" href="{{ site.BaseURL }}notes/atom.xml" title="Notes" />
|
||||||
{{- end }}
|
<link rel="alternate" type="application/atom+xml" href="{{ site.BaseURL }}atom.xml" title="All content" />
|
||||||
<link rel="alternate" type="application/atom+xml" href="{{ site.BaseURL }}posts/atom.xml" title="Posts" />
|
<link rel="alternate" type="application/atom+xml" href="{{ site.BaseURL }}posts/atom.xml" title="Posts" />
|
||||||
{{ if not $isNotes -}}
|
{{- else if or (eq .Section "posts") (eq .Title "Posts") -}}
|
||||||
<link rel="alternate" type="application/atom+xml" href="{{ site.BaseURL }}/notes/atom.xml" title="Notes" />
|
<link rel="alternate" type="application/atom+xml" href="{{ site.BaseURL }}posts/atom.xml" title="Posts" />
|
||||||
|
<link rel="alternate" type="application/atom+xml" href="{{ site.BaseURL }}atom.xml" title="All content" />
|
||||||
|
<link rel="alternate" type="application/atom+xml" href="{{ site.BaseURL }}notes/atom.xml" title="Notes" />
|
||||||
|
{{- else -}}
|
||||||
|
<link rel="alternate" type="application/atom+xml" href="{{ site.BaseURL }}atom.xml" title="All content" />
|
||||||
|
<link rel="alternate" type="application/atom+xml" href="{{ site.BaseURL }}posts/atom.xml" title="Posts" />
|
||||||
|
<link rel="alternate" type="application/atom+xml" href="{{ site.BaseURL }}notes/atom.xml" title="Notes" />
|
||||||
{{- end }}
|
{{- end }}
|
||||||
<title>{{ .Title }}{{ if and (lt (len .Title) 54) (ne $canonicalRelPermalink "/") }} - Seirdy{{ end }}</title>
|
<title>{{ .Title }}{{ if and (lt (len .Title) 54) (ne $canonicalRelPermalink "/") }} - Seirdy{{ end }}</title>
|
||||||
{{ $description := .Site.Params.Description -}}
|
{{ $description := .Site.Params.Description -}}
|
||||||
|
|
Loading…
Reference in a new issue