diff options
author | Arun Isaac | 2019-08-27 13:10:08 +0530 |
---|---|---|
committer | Arun Isaac | 2019-08-27 13:10:08 +0530 |
commit | f686c4fd2a2cae51c01f000d8b648cbbd3b1541a (patch) | |
tree | 56a64c738b6a254e0f09498f5fd31e60a82137da /ennu-html.el | |
parent | b50737fd6bf1a7d8bee9fbe52307ebc13276759b (diff) | |
download | ennum-f686c4fd2a2cae51c01f000d8b648cbbd3b1541a.tar.gz ennum-f686c4fd2a2cae51c01f000d8b648cbbd3b1541a.tar.lz ennum-f686c4fd2a2cae51c01f000d8b648cbbd3b1541a.zip |
Implement post as structure.
* ennu.el (ennu-post): New structure.
(ennu-posts, ennu-publish, ennu-publish-feed, ennu-publish-index,
ennu-publish-post, ennu--feed-entry): Use new post structure API.
(ennu-later-post-p, ennu-read-post, ennu--read-post): New functions.
(ennu-plist-map-to-plist, ennu-post-links, ennu-post-metadata,
ennu--post-metadata-memoized, ennu-post-tags, ennu-post-thumbnail,
ennu-post-tongue, ennu--later-post): Delete functions.
* ennu-html.el (ennu-export-post): Use new post structure API.
Diffstat (limited to 'ennu-html.el')
-rw-r--r-- | ennu-html.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ennu-html.el b/ennu-html.el index 36796d1..9a24f9c 100644 --- a/ennu-html.el +++ b/ennu-html.el @@ -18,11 +18,11 @@ ;; TODO: Pass title through org-export-data-with-backend or something ;; similar in order to export org syntax in title (defun ennu-export-post (path desc backend) - (let ((post (concat (expand-file-name path (ennu-setting :posts-directory)) + (let ((filename (concat (expand-file-name path (ennu-setting :posts-directory)) ".org"))) (xmlgen `(a :href ,(expand-file-name* path (ennu-setting :posts-directory)) - ,(or desc (plist-get (ennu-post-metadata post) :title)))))) + ,(or desc (ennu-post-title (ennu-read-post filename))))))) (org-link-set-parameters "post" :export 'ennu-export-post) |