diff options
Diffstat (limited to 'build.el')
-rwxr-xr-x | build.el | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/build.el b/build.el new file mode 100755 index 0000000..54f62e9 --- /dev/null +++ b/build.el @@ -0,0 +1,34 @@ +#! /home/arun/.guix-profile/bin/emacs --script + +(require 'ox-publish) + +(setq org-publish-project-alist + '(("pages" + :base-directory "pages" + :base-extension "org" + :publishing-directory "site" + :publishing-function org-html-publish-to-html + :html-head "<link rel=\"stylesheet\" type=\"text/css\" href=\"static/style.css\"/>" + :html-postamble nil + :html-indent t) + ("static" + :base-directory "static" + :base-extension any + :publishing-directory "site/static" + :publishing-function org-publish-attachment)) + org-export-with-section-numbers nil + org-export-with-toc nil + org-html-head-include-default-style nil + org-html-head-include-scripts nil + org-export-filter-link-functions + (list (lambda (output backend info) + (string-match "<a href=\"\\([^\"]*\\)\">" output) + (let ((href (match-string 1 output))) + (if (string-prefix-p "http" href) + output + (replace-match (file-name-base href) + nil nil output 1))))) + make-backup-files nil) + +(org-publish-all t) + |