summaryrefslogtreecommitdiff
path: root/ennu.el
diff options
context:
space:
mode:
Diffstat (limited to 'ennu.el')
-rw-r--r--ennu.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/ennu.el b/ennu.el
index 5ee6be5..6c1cf22 100644
--- a/ennu.el
+++ b/ennu.el
@@ -14,7 +14,7 @@
(cl-defstruct (ennu-post (:constructor ennu-make-post)
(:copier nil))
- filename author date language links
+ filename slug author date language links
summary tags thumbnail title translation-group)
(cl-defstruct (ennu-operation (:constructor ennu-make-operation)
@@ -55,6 +55,7 @@
(cons link-type (org-element-property :path link))))))))))
(ennu-make-post
:filename filename
+ :slug (file-name-base filename)
:author (funcall export (first (plist-get metadata :author)))
:date (org-timestamp-to-time (first (plist-get metadata :date)))
:language (plist-get metadata :language)
@@ -158,7 +159,7 @@ last form in BODY."
(insert (format "#+LANGUAGE: %s\n" tongue))
(insert "#+OPTIONS: num:nil toc:nil\n\n")
(seq-do (lambda (post)
- (insert (format "* [[post:%s]]\n" (file-name-base (ennu-post-filename post))))
+ (insert (format "* [[post:%s]]\n" (ennu-post-slug post)))
(insert (format-time-string
"/%b %e, %Y/\n\n"
(ennu-post-date post)))