aboutsummaryrefslogtreecommitdiffstats
path: root/project-config.el
diff options
context:
space:
mode:
Diffstat (limited to 'project-config.el')
-rw-r--r--project-config.el16
1 files changed, 13 insertions, 3 deletions
diff --git a/project-config.el b/project-config.el
index 96cb365..b41fb1e 100644
--- a/project-config.el
+++ b/project-config.el
@@ -12,6 +12,7 @@
:publishing-function org-html-publish-to-html
:html-head "<link rel=\"stylesheet\" href=\"assets/css/main.css\" type=\"text/css\"/>"
:html-link-home "https://ryuslash.gitlab.io/ryuslash.org/"
+ :html-link-up nil
:html-link-user-abs-url t)
("ryuslash.org Posts"
:base-directory "posts"
@@ -21,7 +22,11 @@
:publishing-function org-html-publish-to-html
:html-head "<link rel=\"stylesheet\" href=\"../assets/css/main.css\" type=\"text/css\"/>"
:html-link-home "https://ryuslash.gitlab.io/ryuslash.org/"
- :html-link-user-abs-url t)
+ :html-link-up "../"
+ :html-link-user-abs-url t
+ :html-preamble (lambda (_)
+ (project-config-print-reading-time
+ (project-config-reading-time (buffer-file-name)))))
("ryuslash-rss"
:base-directory "."
:publishing-directory "public_html"
@@ -56,14 +61,19 @@
(org-forward-element))
alist)))
+(defun project-config-print-reading-time (time)
+ (format "%d minute%s"
+ time
+ (if (= time 1) "" "s")))
+
(defun project-config-print-element (alist)
- (format "* %s\n :PROPERTIES:\n :ID: %s\n :PUBDATE: %s\n :END:\n\n %s\n[[file:%s][Read more (%d minutes)]]\n"
+ (format "* %s\n :PROPERTIES:\n :ID: %s\n :PUBDATE: %s\n :END:\n\n %s\n[[file:%s][Read more (%s)]]\n"
(alist-get 'TITLE alist)
(alist-get 'ID alist)
(alist-get 'PUBDATE alist)
(alist-get 'BODY alist)
(alist-get 'NAME alist)
- (alist-get 'LENGTH alist)))
+ (project-config-print-reading-time (alist-get 'LENGTH alist))))
(defun project-config-reading-time (file)
(with-current-buffer (find-file file)