From: Frederik Vanrenterghem Date: Mon, 17 Mar 2025 14:34:24 +0000 (+0800) Subject: Add category to RSS feed items. X-Git-Url: http://git.vanrenterghem.biz/www2.vanrenterghem.biz.git/commitdiff_plain/dd866882d0e9195f1504c0ff92c7aacf7c1354ad Add category to RSS feed items. --- diff --git a/maak-website.el b/maak-website.el index 0230ab8..a1068f2 100644 --- a/maak-website.el +++ b/maak-website.el @@ -232,10 +232,14 @@ PROJECT is the current project." (let* ((file (org-publish--expand-file-name entry project)) (title (org-publish-find-title entry project)) (date (format-time-string "%Y-%m-%d %H:%M" (org-publish-find-date entry project))) - (link (concat (file-name-sans-extension entry) ".html"))) - (with-temp-buffer + (link (concat (file-name-sans-extension entry) ".html")) + (tags (cadar (with-temp-buffer + (org-mode) + (insert-file-contents file) + (org-collect-keywords '("FILETAGS")))))) + (with-temp-buffer (org-mode) - (insert (format "* [[file:%s][%s]]\n" file title)) + (insert (format "* [[file:%s][%s]] %s\n" file title tags)) ;; add properties for `ox-rss.el' here (org-set-property "RSS_PERMALINK" link) (org-set-property "PUBDATE" date) @@ -280,7 +284,7 @@ PROJECT is the current project." :publishing-function org-mustache-html-publish-to-html :mustache-template ,(file-name-concat my-blog-mustache-folder "post.mustache") :preparation-function my-blog-create-tags-files - :exclude "html*\\|assets*\\|rss.org\\|index.org\\|sitemap.org" + :exclude "html*\\|assets*\\|rss.org\\|index.org\\|sitemap.org\\|.org~" :html-content-class nil :section-numbers nil :with-toc nil