]> git.vanrenterghem.biz Git - www2.vanrenterghem.biz.git/commitdiff
Add category to RSS feed items.
authorFrederik Vanrenterghem <frederik@vanrenterghem.biz>
Mon, 17 Mar 2025 14:34:24 +0000 (22:34 +0800)
committerFrederik Vanrenterghem <frederik@vanrenterghem.biz>
Mon, 17 Mar 2025 14:34:24 +0000 (22:34 +0800)
maak-website.el

index 0230ab83b6c674e9f870812da527bb3e382fd326..a1068f221b415a5e11097fc2e7ae31abb5b1969e 100644 (file)
@@ -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