From df5eab632eccd5332a045a0756263180721fd8a2 Mon Sep 17 00:00:00 2001 From: jao Date: Sun, 28 Feb 2021 05:33:14 +0000 Subject: blog.org: using the as yet unofficial per-tag RSS generation --- blog.org | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/blog.org b/blog.org index cd9c125..83dd7ae 100644 --- a/blog.org +++ b/blog.org @@ -3,22 +3,34 @@ * Vars and setup #+begin_src emacs-lisp - ;; (jao-load-path "org-static-blog") + (jao-load-path "org-static-blog") (when (> emacs-major-version 26) (use-package htmlize :ensure t)) (defvar jao-blog-base-dir "~/doc/jao.io") (defun jao-blog-dir (p) (expand-file-name p jao-blog-base-dir)) - (setq jao-org-blog-tags + (setq jao-org-blog-tag-files + (seq-difference (directory-files (jao-blog-dir "blog") nil "tag-.*") + "tag-norss.html") + + jao-org-blog-tags (mapcar (lambda (f) (string-match "tag-\\(.+\\)\\.html" f) (format "%s" f (match-string 1 f))) - (directory-files (jao-blog-dir "blog") nil "tag-.*")) + jao-org-blog-tag-files) + + jao-org-blog-tag-rss + (mapcar (lambda (f) + (string-match "\\(.+\\)-rss\\.xml" f) + (format "%s" + f (match-string 1 f))) + (directory-files (jao-blog-dir "blog") nil ".*-rss.xml")) + jao-org-blog-tag-names (mapcar (lambda (f) (string-match "tag-\\(.+\\)\\.html" f) (match-string 1 f)) - (directory-files (jao-blog-dir "blog") nil "tag-.*"))) + jao-org-blog-tag-files)) #+end_src * HTML headers and footers *** Header @@ -52,7 +64,12 @@ (mapconcat #'identity jao-org-blog-tags "") " " " " - " | rss" + " |
" + " rss" + "
" + (mapconcat #'identity jao-org-blog-tag-rss "") + "
" + "
" " " "")) #+end_src @@ -99,9 +116,10 @@ org-static-blog-posts-directory (jao-blog-dir "posts/") org-static-blog-drafts-directory (jao-blog-dir "drafts/") org-static-blog-publish-directory (jao-blog-dir "blog/") - org-static-blog-rss-extra "mail@jao.io\n" + org-static-blog-rss-extra "" ; "mail@jao.io\n" org-static-blog-rss-max-entries 30 org-static-blog-rss-excluded-tag "norss" + org-static-blog-enable-tag-rss t org-export-with-toc nil org-export-with-section-numbers nil) -- cgit v1.2.3