feat: add build commands to distribute over HTTP

This commit is contained in:
Andrew Rioux
2025-10-19 21:59:42 -04:00
parent e164ed9c12
commit 4430469cdc
5 changed files with 411 additions and 0 deletions
+55
View File
@@ -0,0 +1,55 @@
(require 'org)
(setq org-html-style-default "")
(setq org-html-postamble
(let ((article-name (getenv "FILE_NAME"))
(last-commit (getenv "LAST_COMMIT")))
(concat
(format
"<p><a href=\"https://gitea.riouxs.co/andrew.rioux/website/src/commit/%s/%s\">View source</a></p>"
last-commit
(substring article-name 2))
(format
"<p><a href=\"/%s\">View PDF</a></p>"
(string-replace "org" "pdf" (substring article-name 2))))))
(setq org-html-head-extra
(let ((last-commit-date (getenv "LAST_COMMIT_DATE"))
(first-commit-date (getenv "FIRST_COMMIT_DATE"))
(article-name (getenv "FILE_NAME")))
(concat
"<link rel=\"stylesheet\" type=\"text/css\" href=\"/resources/basestyles.css\" />"
(format "<meta name=\"DC.date\" content=\"%s\" />" first-commit-date)
(format "<meta name=\"DC.modified\" content=\"%s\" />" last-commit-date)
"<meta name=\"DC.creator\" content=\"Andrew Rioux\" />"
"<meta name=\"DC.type\" content=\"blogPost\" />"
(format
"<meta name=\"DC.relation\" content=\"https://andrew.riouxs.co/%s\" />"
(string-replace "org" "pdf" (substring article-name 2))))))
(setq org-html-preamble
(let ((last-commit-date (getenv "LAST_COMMIT_DATE"))
(first-commit-date (getenv "FIRST_COMMIT_DATE")))
(if (string= last-commit-date first-commit-date)
(concat
"<p class=\"author\">Author: Andrew Rioux</p>"
; "<meta name=\"citation_title\" content=\"%t\" />"
"<meta name=\"DC.title\" content=\"%t\" />"
"<p class=\"date\">Publish date: "
last-commit-date
"</p>")
(concat
"<p class=\"author\">Author: Andrew Rioux</p>"
; "<meta name=\"citation_title\" content=\"%t\" />"
"<meta name=\"DC.title\" content=\"%t\" />"
"<p class=\"date\">Initial publish date: "
first-commit-date
"</p><p class=\"date\">Last modify date: "
last-commit-date
"</p>")
)))