summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--blog.org30
1 files 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 "<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)