diff options
-rw-r--r-- | ennu.el | 42 |
1 files changed, 22 insertions, 20 deletions
@@ -100,20 +100,25 @@ last form in BODY." ;; (expand-file-name (file-name-nondirectory tangled-file) ;; tangle-dir) ;; t))) - (let ((input-post-files (seq-map 'ennu-post-filename posts))) - (ennu-make-operation - :inputs input-post-files - :outputs (seq-map 'ennu--org-output-filename input-post-files) - :publish - (lambda (&rest output-files) - (seq-mapn - (lambda (post output-file) - (ennu-with-file-contents (ennu-post-filename post) - (org-export-to-file - 'ennu-html output-file nil nil nil nil - (list :translations (seq-remove (apply-partially 'equal post) posts))))) - posts - output-files))))) + (let ((link-publish-operations + (seq-map 'ennu-publish-link (seq-mapcat 'ennu-post-links posts))) + (input-post-files (seq-map 'ennu-post-filename posts))) + (cons + (ennu-make-operation + :inputs (append input-post-files + (seq-mapcat 'ennu-operation-inputs link-publish-operations)) + :outputs (seq-map 'ennu--org-output-filename input-post-files) + :publish + (lambda (&rest output-files) + (seq-mapn + (lambda (post output-file) + (ennu-with-file-contents (ennu-post-filename post) + (org-export-to-file + 'ennu-html output-file nil nil nil nil + (list :translations (seq-remove (apply-partially 'equal post) posts))))) + posts + output-files))) + link-publish-operations))) (defun ennu-publish-page (pages-directory page) (ennu-make-operation @@ -417,9 +422,9 @@ as keys. Keys are compared using `equal'." (let ((posts (ennu-posts (ennu-setting :posts-directory)))) (append ;; Publish posts - (seq-map (pcase-lambda (`(,translation-group . ,posts)) - (ennu-publish-post posts)) - (seq-group-by 'ennu-post-translation-group posts)) + (seq-mapcat (pcase-lambda (`(,translation-group . ,posts)) + (ennu-publish-post posts)) + (seq-group-by 'ennu-post-translation-group posts)) ;; Publish feed (list (ennu-publish-feed (ennu-setting :atom-feed-file) blog-title @@ -439,9 +444,6 @@ as keys. Keys are compared using `equal'." tag posts-per-page posts)) (seq-group-by 'ennu-post-language posts))) (ennu-many-to-many-group-by 'ennu-post-tags posts)) - ;; Publish links - (seq-map 'ennu-publish-link - (seq-uniq (seq-mapcat 'ennu-post-links posts))) ;; Publish thumbnails (seq-map (apply-partially 'ennu-publish-image (list (ennu-setting :thumbnail-image-width))) |