aboutsummaryrefslogtreecommitdiff
path: root/build-site.el
diff options
context:
space:
mode:
Diffstat (limited to 'build-site.el')
-rw-r--r--build-site.el28
1 files changed, 24 insertions, 4 deletions
diff --git a/build-site.el b/build-site.el
index a77c7d9..cbbb41d 100644
--- a/build-site.el
+++ b/build-site.el
@@ -2,18 +2,27 @@
(setq org-html-validation-link nil
org-html-head-include-scripts nil
- org-html-head-include-default-style nil
+ ;; org-html-head-include-default-style nil
org-html-head (with-temp-buffer
(insert-file-contents "head.html")
(buffer-string)))
+(defun custom/sitemap-format-entry (entry style project)
+ (let ((filename (org-publish-find-title entry project))
+ (date (org-publish-find-date entry project)))
+ (format "%s - [[file:%s][%s]]"
+ (format-time-string "[%Y-%m-%d %^a]" date)
+ entry
+ filename)))
+
(setq org-publish-project-alist
(list
- (list "content"
- :recursive t
+ (list "pages"
+ :recursive nil
:base-directory "./src"
:publishing-function 'org-html-publish-to-html
:publishing-directory "./public"
+ :with-title nil
:with-author nil
:with-creator nil
:with-toc nil
@@ -24,7 +33,18 @@
:base-directory "./src"
:base-extension "css\\|png\\|ico\\|jpg\\|gif"
:publishing-function 'org-publish-attachment
- :publishing-directory "./public")))
+ :publishing-directory "./public")
+ (list "blog"
+ :recursive t
+ :base-directory "./src/blog"
+ :publishing-directory "./public/blog"
+ :publishing-function 'org-html-publish-to-html
+ :section-numbers nil
+ :auto-sitemap t
+ :sitemap-title "blog posts"
+ :sitemap-filename "index.org"
+ :sitemap-sort-files 'anti-chronologically
+ :sitemap-format-entry 'custom/sitemap-format-entry)))
(org-publish-all t)