Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ public
.*.swp

.DS_Store

__pycache__
__pycache__/
*.py[cod]
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

13 changes: 11 additions & 2 deletions config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
disableKinds:
- taxonomy
theme:
- scientific-python-hugo-theme/themes/hugo-atom-feed
params:
colorScheme: auto # can be auto (browser setting), light, or dark
images:
Expand All @@ -11,3 +9,14 @@ params:
plausible:
dataDomain: null
javaScript: "https://views.scientific-python.org/js/script.js"

mediaTypes:
application/atom+xml:
suffixes:
- xml

outputFormats:
atom:
baseName: atom
mediaType: application/atom+xml
noUgly: true
3 changes: 3 additions & 0 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
{{ with .Params.canonicalURL -}}
<link rel="canonical" href="{{ . }}">
{{- end }}
{{- range .AlternativeOutputFormats }}
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink }}">
{{- end }}
<title>{{ block "title" . }}{{ .Site.Title }}{{ if not (eq .Site.Title .Title) }} - {{ .Title }}{{end}}{{ end }}</title>

<!-- Render theme css -->
Expand Down
47 changes: 47 additions & 0 deletions layouts/list.atom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{{ printf `<?xml version="1.0" encoding="utf-8"?>` | safeHTML }}
<feed xmlns="http://www.w3.org/2005/Atom" {{- with site.Language.Locale }} xml:lang="{{ . }}"{{ end }}>
<generator uri="https://gohugo.io/" version="{{ hugo.Version }}">Hugo</generator>
<title>{{ .Title }}</title>
{{- with site.Params.description }}
<subtitle>{{ . }}</subtitle>
{{- end }}
<id>{{ .Permalink }}</id>
{{- $entries := .RegularPagesRecursive.ByDate.Reverse -}}
{{- $limit := site.Config.Services.RSS.Limit -}}
{{- if ge $limit 1 -}}
{{- $entries = first $limit $entries -}}
{{- end -}}
{{- $updated := .Lastmod -}}
{{- with $entries.ByLastmod.Reverse -}}
{{- $updated = (index . 0).Lastmod -}}
{{- end }}
<updated>{{ $updated.Format "2006-01-02T15:04:05Z07:00" }}</updated>
<author>
<name>{{ site.Params.author.name | default site.Title }}</name>
{{- with site.Params.author.email }}
<email>{{ . }}</email>
{{- end }}
</author>
{{- with .OutputFormats.Get "atom" }}
<link rel="self" href="{{ .Permalink }}" type="{{ .MediaType.Type }}" />
{{- end }}
{{- with .OutputFormats.Get "html" }}
<link rel="alternate" href="{{ .Permalink }}" type="{{ .MediaType.Type }}" />
{{- end }}

{{- range $entries }}
<entry>
<title>{{ .Title }}</title>
<id>{{ .Permalink }}</id>
<updated>{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}</updated>
<published>{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}</published>
{{- with .OutputFormats.Get "html" }}
<link rel="alternate" href="{{ .Permalink }}" type="{{ .MediaType.Type }}" />
{{- end }}
<content type="html" xml:base="{{ .Permalink }}">{{ printf "%s" .Content }}</content>
{{- range .GetTerms "tags" }}
<category term="{{ .LinkTitle }}" scheme="{{ site.Home.Permalink }}tags/" label="{{ .LinkTitle }}" />
{{- end }}
</entry>
{{- end }}
</feed>
Loading