diff options
-rw-r--r-- | ennu.el | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -135,8 +135,9 @@ last form in BODY." (concat filename-prefix extension)) tongue))) -(defun ennu-publish-index (filename-prefix tongue title posts-per-page posts) - (let* ((number-of-pages (ceiling (length posts) posts-per-page)) +(defun ennu-publish-index (filename-prefix title posts-per-page posts) + (let* ((tongue (ennu-post-language (first posts))) + (number-of-pages (ceiling (length posts) posts-per-page)) (page-numbers (number-sequence 1 number-of-pages))) `(,(seq-map 'ennu-post-filename posts) ,(cons (ennu-add-tongue-suffix (format "%s.html" filename-prefix) tongue) @@ -398,7 +399,7 @@ as keys. Keys are compared using `equal'." ;; Publish indices (seq-map (pcase-lambda (`(,tongue . ,posts)) - (ennu-publish-index "index" tongue blog-title posts-per-page posts)) + (ennu-publish-index "index" blog-title posts-per-page posts)) (seq-group-by 'ennu-post-language posts)) (seq-mapcat (pcase-lambda (`(,tag . ,posts)) @@ -406,7 +407,7 @@ as keys. Keys are compared using `equal'." (pcase-lambda (`(,tongue . ,posts)) (ennu-publish-index (ennu--expand-relative tag (ennu-setting :tag-directory)) - tongue tag posts-per-page posts)) + tag posts-per-page posts)) (seq-group-by 'ennu-post-language posts))) (ennu-many-to-many-group-by 'ennu-post-tags posts)) ;; Publish links |