- Remove Hugo configuration, themes, and Node.js dependencies - Delete CI/CD files (.drone.yml, .fleek.json, Dockerfile) - Convert Markdown content to Org-mode format in org/ directory - Add Emacs Lisp publishing script with ox-publish configuration - Create Makefile for build automation - Update .gitignore for Emacs and macOS files - Preserve media assets with Git LFS tracking - Add RSS feed generation capability - Remove package.json, package-lock.json, and markdownlint config
81 lines
2.6 KiB
EmacsLisp
Executable File
81 lines
2.6 KiB
EmacsLisp
Executable File
#!/usr/bin/env -S emacs -x
|
|
|
|
(require 'package)
|
|
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
|
|
(package-initialize)
|
|
|
|
;; Install ox-rss if not present
|
|
(unless (package-installed-p 'ox-rss)
|
|
(package-refresh-contents)
|
|
(package-install 'ox-rss))
|
|
|
|
(require 'ox-publish)
|
|
(require 'ox-rss)
|
|
(setq org-publish-project-alist
|
|
'(("blog-posts"
|
|
:base-directory "org/posts/"
|
|
:base-extension "org"
|
|
:publishing-directory "dist/p/"
|
|
:recursive t
|
|
:publishing-function org-html-publish-to-html
|
|
:org-html-preamble nil
|
|
:html-self-link-headlines nil
|
|
:org-export-with-title nil
|
|
:org-export-with-toc nil
|
|
:org-export-with-section-numbers nil
|
|
:org-export-with-properties nil
|
|
:org-export-with-tags nil
|
|
:org-export-with-date t
|
|
:org-export-with-time-stamp-file t
|
|
:org-export-with-tables t
|
|
:org-html-table-use-header-tags-for-first-column nil
|
|
)
|
|
("blog-pages"
|
|
:base-directory "org/"
|
|
:base-extension "org"
|
|
:publishing-directory "dist/"
|
|
:exclude "posts/\\|rss\\.org"
|
|
:recursive t
|
|
:publishing-function org-html-publish-to-html
|
|
:org-html-preamble nil
|
|
:html-self-link-headlines nil
|
|
:org-export-with-title nil
|
|
:org-export-with-toc nil
|
|
:org-export-with-section-numbers nil
|
|
:org-export-with-tags nil
|
|
:org-html-table-use-header-tags-for-first-column nil
|
|
)
|
|
("blog-media"
|
|
:base-directory "org/media"
|
|
:base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf"
|
|
:publishing-directory "dist/media/"
|
|
:recursive t
|
|
:publishing-function org-publish-attachment
|
|
)
|
|
("blog-static"
|
|
:base-directory "static/"
|
|
:base-extension "*"
|
|
:publishing-directory "dist/media/"
|
|
:recursive nil
|
|
:publishing-function org-publish-attachment
|
|
)
|
|
("blog-rss"
|
|
:base-directory "org/posts/"
|
|
:base-extension "org"
|
|
:recursive nil
|
|
:exclude ".*"
|
|
:include ("../rss.org")
|
|
:publishing-function (org-rss-publish-to-rss)
|
|
:publishing-directory "dist/"
|
|
:with-toc nil
|
|
:section-numbers nil
|
|
:html-link-use-abs-url t
|
|
:html-link-home "https://bitdispenser.dev/"
|
|
:title "Bitdispenser RSS"
|
|
)
|
|
("blog"
|
|
:components ("blog-posts" "blog-pages" "blog-media" "blog-static" "blog-rss"))
|
|
))
|
|
|
|
(org-publish "blog" t)
|