aboutsummaryrefslogtreecommitdiff
path: root/build-site.el
diff options
context:
space:
mode:
Diffstat (limited to 'build-site.el')
-rw-r--r--build-site.el33
1 files changed, 18 insertions, 15 deletions
diff --git a/build-site.el b/build-site.el
index 242786b..22ce82b 100644
--- a/build-site.el
+++ b/build-site.el
@@ -2,25 +2,35 @@
(require 'ox-publish)
(require 'org-publish-rss)
+(defun my/file-to-string (file)
+ (with-temp-buffer
+ (insert-file-contents file)
+ (buffer-string)))
+
(setq org-html-validation-link nil
org-html-head-include-scripts nil
org-html-doctype "html5"
org-html-html5-fancy t
org-html-head-include-default-style nil
- org-html-head (with-temp-buffer
- (insert-file-contents "head.html")
- (buffer-string)))
+ org-html-head (my/file-to-string "templates/head.html")
+ org-html-postamble nil
+ org-export-with-section-numbers nil
+ org-export-with-timestamps nil
+ org-export-with-toc nil)
(defun my/sitemap-format-entry (entry style project)
- (let ((filename (org-publish-find-title entry project))
+ (let ((title (org-publish-find-title entry project))
(date (org-publish-find-date entry project)))
(format "%s - [[file:%s][%s]]"
(format-time-string "%F" date)
entry
- filename)))
+ title)))
(defun my/sitemap-function (title list) ; todo change this
- (org-publish-sitemap-default title list))
+ (setq spec
+ (list (cons ?a title)
+ (cons ?l (org-list-to-org list))))
+ (format-spec (my/file-to-string "templates/blog-sitemap.org") spec))
(setq org-publish-project-alist
(list
@@ -28,12 +38,8 @@
:recursive t
:base-directory "./src/blog"
:publishing-directory "./public/blog"
- :base-extension "org"
:publishing-function 'org-html-publish-to-html
- :section-numbers nil
- :with-toc nil
:auto-sitemap t
- :time-stamp-file nil
:sitemap-title "Lemurblog"
:sitemap-filename "index.org"
:sitemap-sort-files 'anti-chronologically
@@ -48,11 +54,7 @@
:recursive nil
:base-directory "./src"
:publishing-function 'org-html-publish-to-html
- :publishing-directory "./public"
- :with-toc nil
- :html-postamble nil
- :section-numbers nil
- :time-stamp-file nil)
+ :publishing-directory "./public")
(list "assets"
:recursive t
:base-directory "./src/assets"
@@ -64,5 +66,6 @@
(delete-directory "public" :recursive t)
(setenv "TZ" "UTC0") ; remove the timezone from rss output
(org-publish-all t)
+(delete-file "src/blog/rss.xml~") ; I have no clue why this thing appears at all
(message "Build done!")