diff options
Diffstat (limited to 'generate')
| -rwxr-xr-x | generate | 12 |
1 files changed, 12 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 |
