diff options
author | jao <jao@gnu.org> | 2021-02-28 05:33:14 +0000 |
---|---|---|
committer | jao <jao@gnu.org> | 2021-02-28 05:33:14 +0000 |
commit | df5eab632eccd5332a045a0756263180721fd8a2 (patch) | |
tree | 4e6f24e70c4cb9374d1ffbe00ade55d7317782f8 | |
parent | c732ce2b29db8715546ab5e3a770c60fd49971cc (diff) | |
download | elibs-df5eab632eccd5332a045a0756263180721fd8a2.tar.gz elibs-df5eab632eccd5332a045a0756263180721fd8a2.tar.bz2 |
blog.org: using the as yet unofficial per-tag RSS generation
-rw-r--r-- | blog.org | 30 |
1 files changed, 24 insertions, 6 deletions
@@ -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 "<a href=\"/blog/%s\">%s</a>" 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 "<a href=\"/blog/%s\">%s</a>" + 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 "") " </div>" " </div>" - " | <a href=\"/blog/rss.xml\">rss</a>" + " | <div class=\"dropdown\">" + " <a href=\"/blog/rss.xml\" class=\"dropbtn\">rss</a>" + " <div class=\"dropdown-content\">" + (mapconcat #'identity jao-org-blog-tag-rss "") + " </div>" + " </div>" " </div>" "</div>")) #+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 "<author>mail@jao.io</author>\n" + org-static-blog-rss-extra "" ; "<author>mail@jao.io</author>\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) |