From 2bcd173928ff29141e566c13676f8bcddd327f30 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Mon, 26 Aug 2019 00:15:43 +0530 Subject: Do not remove directory components from index filenames. * ennu.el (ennu-index-filename): Do not remove directory components from index filenames. (ennu-publish-index): Remove directory components in pagination links. --- ennu.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ennu.el b/ennu.el index 4620ef8..1f9d786 100644 --- a/ennu.el +++ b/ennu.el @@ -80,8 +80,8 @@ last form in BODY." (let ((extension (if extension (concat "." extension) ""))) (ennu-add-tongue-suffix (if page-number - (format "%s-%s%s" (file-name-nondirectory filename-prefix) page-number extension) - (concat (file-name-nondirectory filename-prefix) extension)) + (format "%s-%s%s" filename-prefix page-number extension) + (concat filename-prefix extension)) tongue))) (let* ((number-of-pages (ceiling (length posts) posts-per-page)) @@ -119,10 +119,12 @@ last form in BODY." posts) (unless (= page-number 1) (insert (format "[[./%s][Newer posts]]\n" - (ennu-index-filename filename-prefix tongue nil (1- page-number))))) + (ennu-index-filename (file-name-nondirectory filename-prefix) + tongue nil (1- page-number))))) (unless (= page-number number-of-pages) (insert (format "[[./%s][Older posts]]\n" - (ennu-index-filename filename-prefix tongue nil (1+ page-number))))) + (ennu-index-filename (file-name-nondirectory filename-prefix) + tongue nil (1+ page-number))))) (org-export-to-file 'ennu-html output-file))) (seq-partition posts posts-per-page) page-numbers -- cgit v1.2.3