(require 'ox-publish)
+(load "~/.emacs.d/lisp/mustache-html.el")
(setq org-html-doctype "html5")
(setq org-html-head-include-default-style nil)
-;(setq org-html-htmlize-output-type 'css) ; default: 'inline-css
+(setq org-html-htmlize-output-type 'css) ; default: 'inline-css
(defun my-org-publish-sitemap-default-entry (entry style project)
(articles (my-blog-sort-article-list filenames project-plist)))
(dolist (file filenames)
(let* ((abspath (file-name-concat "/home/frederik/websites/stage.vanrenterghem.biz/source/posts" file))
- (relpath (file-relative-name abspath "/home/frederik/websites/stage.vanrenterghem.biz/"))
+ (relpath (file-relative-name abspath "/home/frederik/websites/stage.vanrenterghem.biz/source/posts/"))
(title (org-publish-find-title file project-plist))
(date (format-time-string (car org-time-stamp-formats) (org-publish-find-date file project-plist)))
(preview (my-blog-get-preview abspath))
(buffer-string))))
(defun my-plain-publish-sitemap-default (title list)
- "Default site map, as a string.
+ "Create a simple site map, as a string.
TITLE is the title of the site map. LIST is an internal
representation for the files to include, as returned by
-`org-list-to-lisp'. PROJECT is the current project."
+`org-list-to-lisp'."
(with-temp-file "~/websites/stage.vanrenterghem.biz/source/sitemap.org"
- (insert "#+OPTIONS: ^:nil\n") ; do not use underscores as subscript
- (insert (concat "#+TITLE: " title "\n\n"))
- (insert (org-list-to-org list))))
+ (let* ((filenames (my-blog-parse-sitemap-list list))
+ (project-plist (assoc "posts" org-publish-project-alist))
+ (articles (my-blog-sort-article-list filenames project-plist)))
+ (dolist (file filenames)
+ (let* ((abspath (file-name-concat "/home/frederik/websites/stage.vanrenterghem.biz/source/posts" file))
+ (relpath (file-relative-name abspath "/home/frederik/websites/stage.vanrenterghem.biz/source/"))
+ (title (org-publish-find-title file project-plist))
+ (date (format-time-string "%e %b %Y" (org-publish-find-date file project-plist))))
+ (insert (concat "* [[file:" relpath "][" date " - " title "]]\n"))))
+ (goto-char (point-min))
+ (insert "#+OPTIONS: ^:nil\n")))) ; do not use underscores as subscript
(setq org-publish-project-alist
'(("landing"
:base-directory "~/websites/stage.vanrenterghem.biz/source/"
:base-extension "org"
- :include ("posts/sitemap.org")
+ ;:include ("posts/sitemap.org")
:publishing-directory "~/websites/stage.vanrenterghem.biz/target"
:publishing-function org-mustache-html-publish-to-html
:mustache-template "~/websites/stage.vanrenterghem.biz/html/landing.mustache"
- :headline-levels 3
+ :headline-levels 2
:section-numbers nil
:with-toc nil
+ :with-title nil
+ :html-content-class nil
:html-head-include-default-style nil
:html-head nil
:html-divs nil
:publishing-directory "~/websites/stage.vanrenterghem.biz/target/posts"
:publishing-function org-mustache-html-publish-to-html
:mustache-template "~/websites/stage.vanrenterghem.biz/html/post.mustache"
- :exclude "assets*\\|index.org" ;"assets*\\|sitemap.org\\|index.org" ;; regexp
+ :exclude "html*\\|assets*\\|index.org" ;"assets*\\|sitemap.org\\|index.org" ;; regexp
:html-content-class nil
:section-numbers nil
:with-toc nil