summaryrefslogtreecommitdiff
path: root/ennu.el
diff options
context:
space:
mode:
Diffstat (limited to 'ennu.el')
-rw-r--r--ennu.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/ennu.el b/ennu.el
index 04017ba..a07a5b8 100644
--- a/ennu.el
+++ b/ennu.el
@@ -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