Skip to content

Commit

Permalink
Add icon to Atom feed
Browse files Browse the repository at this point in the history
  • Loading branch information
bewuethr committed Aug 10, 2023
1 parent c313514 commit c1a1568
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pbb
Original file line number Diff line number Diff line change
Expand Up @@ -371,11 +371,13 @@ buildfeed() {
url=$(getconfvalue 'baseurl') \
name=$(getconfvalue 'authorname') \
email=$(getconfvalue 'authoremail') \
icon=$([[ -f docs/favicon.png ]] && echo "/favicon.png") \
entries=$(buildentries) \
yq --null-input --output-format=xml '
.+p_xml = "version=\"1.0\" encoding=\"utf-8\""
| .feed = {
"+@xmlns": "http://www.w3.org/2005/Atom",
"+@xmlns:webfeeds": "http://webfeeds.org/rss/1.0",
"title": strenv(title),
"id": strenv(url) + "/",
"updated": now,
Expand All @@ -400,6 +402,11 @@ buildfeed() {
"+@uri": "https://bewuethr/pandoc-bash-blog",
"+content": "pandoc-bash-blog"
},
"icon": strenv(icon),
"webfeeds:icon": strenv(icon),
"webfeeds:cover": {
"+@image": strenv(icon)
},
"entry": env(entries)
}
'
Expand Down

0 comments on commit c1a1568

Please sign in to comment.