aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ennum.el18
1 files changed, 8 insertions, 10 deletions
diff --git a/ennum.el b/ennum.el
index 7e75dc5..c0556d2 100644
--- a/ennum.el
+++ b/ennum.el
@@ -422,11 +422,10 @@ result as a string."
(concat filename-prefix extension))
tongue)))
-(defun ennum-publish-index-page (filename-prefix title last-page posts page-number output-file)
+(defun ennum-publish-index-page (filename-prefix title last-page posts page-number tongue output-file)
(ennum-exp
- (let* ((tongue (ennum-post-language (first posts)))
- (system-time-locale
- (map-elt (ennum-setting :locale-alist) tongue)))
+ (let ((system-time-locale
+ (map-elt (ennum-setting :locale-alist) tongue)))
(when (file-name-directory output-file)
(ennum-mkdir-p (file-name-directory output-file)))
(with-temp-buffer
@@ -468,9 +467,8 @@ result as a string."
(ennum-index-filename filename-prefix tongue "html" 1))
(ennum-add-tongue-suffix (format "%s.html" filename-prefix) tongue))))
-(defun ennum-publish-index (filename-prefix title posts-per-page posts)
- (let* ((tongue (ennum-post-language (first posts)))
- (number-of-pages (ceiling (length posts) posts-per-page))
+(defun ennum-publish-index (filename-prefix title posts-per-page tongue posts)
+ (let* ((number-of-pages (ceiling (length posts) posts-per-page))
(page-numbers (number-sequence 1 number-of-pages))
(output-files (seq-map (apply-partially
'ennum-index-filename filename-prefix tongue "html")
@@ -479,7 +477,7 @@ result as a string."
(ennum-publish-index-page
filename-prefix title
(= page-number number-of-pages)
- post page-number output-file))
+ post page-number tongue output-file))
(seq-partition posts posts-per-page)
page-numbers
output-files)))
@@ -709,7 +707,7 @@ as keys. Keys are compared using `equal'."
;; Publish indices
(seq-mapcat
(pcase-lambda (`(,tongue . ,posts))
- (ennum-publish-index "index" blog-title posts-per-page posts))
+ (ennum-publish-index "index" blog-title posts-per-page tongue posts))
(seq-group-by 'ennum-post-language posts))
;; Publish tag indices
(seq-mapcat
@@ -718,7 +716,7 @@ as keys. Keys are compared using `equal'."
(pcase-lambda (`(,tongue . ,posts))
(ennum-publish-index
(ennum--file-join (ennum-setting :tag-directory) tag)
- tag posts-per-page posts))
+ tag posts-per-page tongue posts))
(seq-group-by 'ennum-post-language posts)))
(ennum-many-to-many-group-by 'ennum-post-tags posts))
;; Publish thumbnails