- commit
- 7745a7a2710cbad8cc242a19a080ce495075072d
- parent
- 19b107fcea2fb2fd6e495287ae85dd9ce315809f
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2024-03-25 23:32
use descriptions
Diffstat
M | _templates/base.html | 1 | + |
M | feed-atom.sh | 1 | + |
M | feed-json.sh | 1 | + |
3 files changed, 3 insertions, 0 deletions
diff --git a/_templates/base.html b/_templates/base.html
@@ -7,6 +7,7 @@ 7 7 <meta name="referrer" content="strict-origin-when-cross-origin"> 8 8 <meta http-equiv="Content-Security-Policy" content="default-src 'self'"> 9 9 <title>Ξ${if(title)} - ${title}${endif}</title> -1 10 ${if(description)}<meta name="description" content="${description}">${endif} 10 11 <link rel="stylesheet" type="text/css" href="/static/style.css"> 11 12 <link rel="alternate" type="application/atom+xml" href="/feed.xml"> 12 13 <link rel="alternate" type="application/feed+json" href="/feed.json">
diff --git a/feed-atom.sh b/feed-atom.sh
@@ -32,6 +32,7 @@ ls _content/posts | tac | $select | while read l; do 32 32 echo " <link href=\"$url\" />" 33 33 echo " <id>$url</id>" 34 34 echo " <updated>$(grep '^date:' "$yml" | head -n 1 | sed 's/date: //' | escape)T00:00:00Z</updated>" -1 35 echo " <summary>$(grep '^description:' "$yml" | head -n 1 | sed 's/description: //;s/^"\(.*\)"$/\1/' | escape)</summary>" 35 36 echo ' <content type="html">' 36 37 cat "$html" | escape 37 38 echo ' </content>'
diff --git a/feed-json.sh b/feed-json.sh
@@ -38,6 +38,7 @@ ls _content/posts | tac | $select | while read l; do 38 38 value 2 'title' "$(grep '^title:' "$yml" | head -n 1 | sed 's/title: //;s/^"\(.*\)"$/\1/' | escape)" 39 39 value 2 'url' "$url" 40 40 value 2 'id' "$url" -1 41 value 2 'summary' "$(grep '^description:' "$yml" | head -n 1 | sed 's/description: //;s/^"\(.*\)"$/\1/' | escape)" 41 42 value 2 'date_published' "$(grep '^date:' "$yml" | head -n 1 | sed 's/date: //' | escape)" 42 43 echo " \"content_html\": \"$(cat "$html" | escape | sed 's/$/\\\\n/' | tr -d '\n')\"" 43 44 done