From dd866882d0e9195f1504c0ff92c7aacf7c1354ad Mon Sep 17 00:00:00 2001 From: Frederik Vanrenterghem Date: Mon, 17 Mar 2025 22:34:24 +0800 Subject: [PATCH] Add category to RSS feed items. --- maak-website.el | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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 -- 2.39.5