Compare commits

...

4 Commits

Author SHA1 Message Date
f577773958 another comma fix 2025-01-08 16:07:08 -07:00
593e6611c2 fixed template to handle commas correctly 2025-01-08 16:05:18 -07:00
38263a5906 update jsonfeed for notes 2025-01-08 15:54:46 -07:00
3fb8d959d5 try my own jsonfeed method 2025-01-08 15:52:39 -07:00
2 changed files with 18 additions and 17 deletions

View File

@@ -1,17 +0,0 @@
{
"version": "https://jsonfeed.org/version/1.1",
"title": "{{ .Site.Title }} - Notes Feed",
"home_page_url": "{{ .Site.BaseURL }}",
"feed_url": "{{ .Permalink }}",
"description": "A feed of my notes from {{ .Site.Title }}",
"items": [
{{- range .Pages.ByDate.Reverse -}}
{
"id": "{{ .Permalink }}",
"url": "{{ .Permalink }}",
"content_text": {{ .Plain | jsonify }},
"date_published": "{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}"
}{{ if not (last .Pages.ByDate.Reverse .) }},{{ end }}
{{- end }}
]
}

View File

@@ -0,0 +1,18 @@
{
"version": "https://jsonfeed.org/version/1.1",
"title": "{{ .Site.Title }} - Notes Feed",
"home_page_url": "{{ .Site.BaseURL }}",
"feed_url": "{{ .Permalink }}",
"description": "A feed of my notes from {{ .Site.Title }}",
"items": [
{{- $length := sub (len .Pages) 1 -}}
{{- range $index, $page := .Pages.ByDate.Reverse -}}
{
"id": "{{ $page.Permalink }}",
"url": "{{ $page.Permalink }}",
"content_text": {{ $page.Plain | jsonify }},
"date_published": "{{ $page.Date.Format "2006-01-02T15:04:05Z07:00" }}"
}{{ if lt $index $length }},{{ end }}
{{- end }}
]
}