about summary refs log tree commit diff
path: root/ennum.el
diff options
context:
space:
mode:
authorArun Isaac2020-08-02 00:48:39 +0530
committerArun Isaac2020-08-02 03:20:16 +0530
commit25f8a2086b299867bb0e27a645daa957fac15c92 (patch)
tree15691411ed4482bac086b0c026caadc9bddde44c /ennum.el
parent14d46e1aefa33f3ca2d14db6aa2e54623c7a069d (diff)
downloadennum-25f8a2086b299867bb0e27a645daa957fac15c92.tar.gz
ennum-25f8a2086b299867bb0e27a645daa957fac15c92.tar.lz
ennum-25f8a2086b299867bb0e27a645daa957fac15c92.zip
Pass post titles in info.
* ennum-html.el (ennum-html-link): Handle post links as a special
case.
(ennum-html-export-post): Use post link description received as
argument. When description is nil, do not attempt to read source files
to find the post title.
* ennum.el (ennum-export-post): Pass post titles as :ennum-post-titles
in info.
Diffstat (limited to 'ennum.el')
-rw-r--r--ennum.el11
1 files changed, 10 insertions, 1 deletions
diff --git a/ennum.el b/ennum.el
index 6cd5757..955a0bf 100644
--- a/ennum.el
+++ b/ennum.el
@@ -326,7 +326,16 @@ result as a string."
     (ennum-mkdir-p (file-name-directory output-file))
     (let ((system-time-locale (map-elt (ennum-setting :locale-alist)
                                        (ennum-post-language post) nil 'string=))
-          (ext-plist (list :ennum-translations (ennum-post-translations post)
+          (ext-plist (list :ennum-post-titles
+                           (ennum--filter-map
+                            (lambda (link)
+                              (when (and (ennum-post-link-p link)
+                                         (not (eq (ennum-post-link-target-title link)
+                                                  'not-required)))
+                                (cons (ennum-post-link-path link)
+                                      (ennum-post-link-target-title link))))
+                            (ennum-post-links post))
+                           :ennum-translations (ennum-post-translations post)
                            :ennum-video-posters
                            (ennum--filter-map (lambda (link)
                                                 (when (eq (ennum-link-type link) 'video)