diff options
| author | Gene Pasquet <dev@etenil.net> | 2026-04-05 23:44:12 +0100 |
|---|---|---|
| committer | Gene Pasquet <dev@etenil.net> | 2026-04-05 23:44:12 +0100 |
| commit | 300131ca5a19d9de5250579d944a52b067b2d60b (patch) | |
| tree | bed560ea0f5f252e3f40576a14e2a7f19bb35662 /makedocs.el | |
| parent | b99ada53b715def5492c7d04c0d327fa7048e5d3 (diff) | |
Rename prefix from downstroke/ to downstroke-
Diffstat (limited to 'makedocs.el')
| -rw-r--r-- | makedocs.el | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/makedocs.el b/makedocs.el new file mode 100644 index 0000000..6675092 --- /dev/null +++ b/makedocs.el @@ -0,0 +1,35 @@ +(require 'ox-publish) + +;; 1. Define the project paths relative to this script +(setq project-root (file-name-directory (or load-file-name buffer-file-name))) +(setq org-notes-dir (expand-file-name "docs/" project-root)) +(setq public-dir (expand-file-name "public/" project-root)) + +;; 2. Set up the publishing configuration +(setq org-publish-project-alist + `(("project-docs" + :base-directory ,org-notes-dir + :base-extension "org" + :publishing-directory ,public-dir + :recursive t + :publishing-function org-html-publish-to-html + :headline-levels 4 + :auto-preamble t + ;; This ensures ReadTheOrg works correctly + :html-head "<link rel=\"stylesheet\" type=\"text/css\" href=\"https://fniessen.github.io/org-html-themes/src/readtheorg_theme/css/readtheorg.css\"/> + <script src=\"https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js\"></script> + <script src=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js\"></script> + <script type=\"text/javascript\" src=\"https://fniessen.github.io/org-html-themes/src/readtheorg_theme/js/readtheorg.js\"></script>" + :html-head-extra "<link rel='stylesheet' type='text/css' href='https://gongzhitaao.org/orgcss/org.css'/>") + ("project-static" + :base-directory ,org-notes-dir + :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf" + :publishing-directory ,public-dir + :recursive t + :publishing-function org-publish-attachment) + ("all" :components ("project-docs" "project-static")))) + +;; 3. The magic command to build everything +(org-publish-all t) + +(message "Build complete!") |
