diff options
| -rwxr-xr-x | generate | 12 | ||||
| -rw-r--r-- | rss.template.xml | 18 | ||||
| -rw-r--r-- | rss.xml | 20 |
3 files changed, 50 insertions, 0 deletions
@@ -36,6 +36,8 @@ base_template < school.template.html | base_template_link 'favicon.png' | base_template_link 'style.css' > school.html +cp rss.template.xml rss.xml + # Generate blog posts for post_path in "$blog_path"/*.md do @@ -53,6 +55,16 @@ do sed -i "/<!-- BLOGINDEX -->/ a\ <li><a href=\"$post_dst_path\">$title</a></li>" index.html + post_date=$(date '+%a, %d %b %Y %H:%M:%S %z' -d "$(stat -c '%w' "$post_path")") + sed -i "/<!-- ITEM -->/ a\ + <item> \ + <title>$title</title> \ + <pubDate>$post_date</pubDate> \ + <guid>https://cacharle.xyz/$post_dst_path</guid> \ + <link>https://cacharle.xyz/$post_dst_path</link> \ + <description>Open this entry in your browser to see the content</description> \ + </item>" rss.xml + echo "Generated post at $post_dst_path" done diff --git a/rss.template.xml b/rss.template.xml new file mode 100644 index 0000000..00ebc62 --- /dev/null +++ b/rss.template.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8"?> +<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> + +<channel> +<title>cacharle.xyz</title> +<description>Charles Cabergs's blog</description> +<language>en-us</language> +<managingEditor>me@cacharle.xyz</managingEditor> +<webMaster>me@cacharle.xyz</webMaster> +<category>blog</category> +<link>https://cacharle.xyz/rss.xml</link> +<atom:link href="https://cacharle.xyz/rss.xml" rel="self" type="application/rss+xml" /> + +<!-- ITEM --> + +</channel> +</rss> + @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> + +<channel> +<title>cacharle.xyz</title> +<description>Charles Cabergs's blog</description> +<language>en-us</language> +<managingEditor>me@cacharle.xyz</managingEditor> +<webMaster>me@cacharle.xyz</webMaster> +<category>blog</category> +<link>https://cacharle.xyz/rss.xml</link> +<atom:link href="https://cacharle.xyz/rss.xml" rel="self" type="application/rss+xml" /> + +<!-- ITEM --> +<item> <title> YouTube subscriptions to RSS feeds</title> <pubDate>Sun, 06 Dec 2020 14:25:38 +0100</pubDate> <guid>https://cacharle.xyz/blog/youtube_to_rss.html</guid> <link>https://cacharle.xyz/blog/youtube_to_rss.html</link> <description>Open this entry in your browser to see the content</description> </item> +<item> <title> How to make your own git server/website </title> <pubDate>Tue, 24 Nov 2020 12:10:50 +0100</pubDate> <guid>https://cacharle.xyz/blog/git_server.html</guid> <link>https://cacharle.xyz/blog/git_server.html</link> <description>Open this entry in your browser to see the content</description> </item> + +</channel> +</rss> + |
