summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--blog.org22
1 files changed, 18 insertions, 4 deletions
diff --git a/blog.org b/blog.org
index 83dd7ae..79a9dc8 100644
--- a/blog.org
+++ b/blog.org
@@ -103,9 +103,12 @@
(use-package org-static-blog
:ensure t
:init
- (setq org-static-blog-use-preview nil
+ (setq org-static-blog-use-preview t
org-static-blog-preview-link-p t
- org-static-blog-index-length 10
+ org-static-blog-preview-start "<!-- preview-start -->"
+ org-static-blog-preview-end "<!-- preview-end -->"
+ org-static-blog-preview-date-first-p t
+ org-static-blog-index-length 30
org-static-blog-preview-convert-titles t
org-static-blog-preview-ellipsis "more ..."
org-static-blog-enable-tags t
@@ -149,6 +152,12 @@
(geiser-default-implementation 'guile))
(org-static-blog-publish-file fname)))
+ (defconst jao-org-static-blog--prev-beg
+ "#+begin_export html\n <!-- preview-start -->\n#+end_export ")
+
+ (defconst jao-org-static-blog--prev-end
+ "#+begin_export html\n <!-- preview-end -->\n#+end_export ")
+
(defun jao-org-static-blog-next-sundry ()
(require 'rst)
(let* ((nos (mapcar (lambda (d)
@@ -175,9 +184,14 @@
"#+date: " (format-time-string "<%Y-%m-%d %H:%M>") "\n"
"#+filetags: ")
(cond ((string= "book" kind)
- (insert "books\n\n[[https://jao.io/img/" file ".jpg]]\n\n"))
+ (insert "books\n\n"
+ jao-org-static-blog--prev-beg
+ "\n\n[[https://jao.io/img/" file ".jpg]]\n\n"
+ jao-org-static-blog--prev-end
+ "\n"))
((string= "sundry" kind)
- (insert "sundry\n\nInteresting bits elsewhere:\n\n- "))
+ (insert "sundry\n\nInteresting bits elsewhere:\n\n- ")
+ (save-excursion (insert "\n\n\n" jao-org-static-blog--prev-end)))
(t (insert (completing-read "Tag: " jao-org-blog-tag-names)
"\n\n")))))
#+end_src