3 (setq org-html-doctype "html5")
4 (setq org-html-divs '((preamble "header" "top")
5 (content "main" "content")
6 (postamble "footer" "postamble"))
7 org-html-container-element "section")
8 (setq org-html-head-include-default-style nil)
9 ;(setq org-html-htmlize-output-type 'css) ; default: 'inline-css
11 (defun website-header (info)
13 (insert-file-contents "~/websites/stage.vanrenterghem.biz/html/navbar.html")
16 (defun post-header (exp-plist)
18 (insert (format "<nav aria-label=\"breadcrumb\">
19 <ol class=\"breadcrumb\">
20 <li class=\"breadcrumb-item\"><a href=\"/\">Home</a></li>
21 <li class=\"breadcrumb-item\"><a href=\"/sitemap.html\">Blog</a></li>
22 <li class=\"breadcrumb-item active\" aria-current=\"page\">%s</li>
25 (or (org-export-data (plist-get exp-plist ':title) exp-plist)
27 (goto-char (point-min))
28 (insert-file-contents "~/websites/stage.vanrenterghem.biz/html/post-header.html")
29 ;(goto-char (point-max))
30 ;(insert (format "<p>Tags: %s</p>"
31 ; (or (org-export-data (plist-get exp-plist :filetags) exp-plist)
35 (defun website-footer (info)
37 (insert-file-contents "~/websites/stage.vanrenterghem.biz/html/footer.html")
40 (defun my-org-publish-sitemap-default-entry (entry style project)
41 "My format for site map ENTRY, as a string.
42 ENTRY is a file name. STYLE is the style of the sitemap.
43 PROJECT is the current project."
44 (cond ((not (directory-name-p entry))
45 (format "%s - [[file:%s][%s]]" ;;the date and filename are added after the entry
46 (format-time-string "%e %b %Y" (org-publish-find-date entry project))
48 (org-publish-find-title entry project)))
50 ;; Return only last subdir.
51 (file-name-nondirectory (directory-file-name entry)))
54 (setq org-publish-project-alist
56 :base-directory "~/websites/stage.vanrenterghem.biz/source/"
58 :publishing-directory "~/websites/stage.vanrenterghem.biz/target"
59 :publishing-function org-html-publish-to-html
63 :html-head-include-default-style nil
64 :html-head "<link href=\"/assets/styles/bootstrap-5.3.0/css/bootstrap.min.css\" rel=\"stylesheet\" />"
66 :html-preamble website-header
67 :html-postamble website-footer
71 :base-directory "~/websites/stage.vanrenterghem.biz/source/posts/"
73 :publishing-directory "~/websites/stage.vanrenterghem.biz/target"
74 :publishing-function org-html-publish-to-html
75 :exclude "assets*\\|sitemap.org\\|index.org" ;; regexp
76 :html-content-class "container content inlinepage card h-entry"
81 :html-head-include-default-style nil
82 :html-head "<link href=\"/assets/styles/bootstrap-5.3.0/css/bootstrap.min.css\" rel=\"stylesheet\" />\n
83 <link href=\"/assets/styles/org-htmlize.css\" rel=\"stylesheet\" />"
85 :html-divs ((preamble "header" "preamble")
86 (content "article" "inlinepage card h-entry")
87 (postamble "footer" "postamble"))
90 :html-preamble post-header
91 :html-postamble website-footer
92 :sitemap-sort-folders ignore-errors
93 :sitemap-format-entry my-org-publish-sitemap-default-entry
94 :sitemap-sort-files anti-chronologically
98 :base-directory "~/websites/stage.vanrenterghem.biz/source/assets/"
101 :publishing-directory "~/websites/stage.vanrenterghem.biz/target/assets/"
102 :publishing-function org-publish-attachment)
104 ("website" :components ("posts" "pages" "assets"))))