From 6550448e6f262f9ef843bef2f9bc783aabff7163 Mon Sep 17 00:00:00 2001 From: Frederik Vanrenterghem Date: Mon, 27 Nov 2023 15:58:59 +0800 Subject: [PATCH 1/1] Toon datum in bestandenlijst. --- maak-website.el | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/maak-website.el b/maak-website.el index f55ae09..4d37c18 100644 --- a/maak-website.el +++ b/maak-website.el @@ -1,6 +1,10 @@ (require 'ox-publish) (setq org-html-doctype "html5") +(setq org-html-divs '((preamble "header" "top") + (content "main" "content") + (postamble "footer" "postamble")) + org-html-container-element "section") (defun website-header (info) (with-temp-buffer @@ -12,6 +16,20 @@ (insert-file-contents "~/websites/stage.vanrenterghem.biz/html/footer.html") (buffer-string))) +(defun my-org-publish-sitemap-default-entry (entry style project) + "My format for site map ENTRY, as a string. +ENTRY is a file name. STYLE is the style of the sitemap. +PROJECT is the current project." + (cond ((not (directory-name-p entry)) + (format "%s - [[file:%s][%s]]" ;;the date and filename are added after the entry + (format-time-string "%e %b %Y" (org-publish-find-date entry project)) + entry + (org-publish-find-title entry project))) + ((eq style 'tree) + ;; Return only last subdir. + (file-name-nondirectory (directory-file-name entry))) + (t entry))) + (setq org-publish-project-alist '(("orgfiles" :base-directory "~/websites/stage.vanrenterghem.biz/source/" @@ -30,6 +48,8 @@ ;:sitemap-filename "~/websites/stage.vanrenterghem.biz/source/posts/sitemap.org" :html-preamble website-header :html-postamble website-footer + :sitemap-format-entry my-org-publish-sitemap-default-entry + :sitemap-sort-files anti-chronologically ) ("assets" -- 2.39.5