diff --git a/.github/workflows/site.yml b/.github/workflows/site.yml index ace7533..07178b6 100644 --- a/.github/workflows/site.yml +++ b/.github/workflows/site.yml @@ -21,9 +21,6 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Everforest Theme - run: git clone --depth 1 https://github.com/dongdigua/everforest-emacs.git ~/.emacs.d/everforest - - name: Install Emacs uses: purcell/setup-emacs@master with: diff --git a/org/Makefile b/org/Makefile index d793c40..e3b461b 100644 --- a/org/Makefile +++ b/org/Makefile @@ -2,9 +2,7 @@ EMACS=emacs ORG_CONFIG_FILE=publish_config.el TARGET=ls ../*.html* | grep -v "index\|xmr\|404.html" -# --script and --batch can't load the theme -# GUI will have a better color, but can't use in CI -EMACS_OPTS=-Q -nw --eval "(load-file \"$(ORG_CONFIG_FILE)\")" -f myweb-publish +EMACS_OPTS=--script $(ORG_CONFIG_FILE) -f myweb-publish all: html diff --git a/org/publish_config.el b/org/publish_config.el index dac3041..31d3403 100644 --- a/org/publish_config.el +++ b/org/publish_config.el @@ -13,13 +13,15 @@ (package-install p))) (eval-when-compile + (require 'org) (require 'ox-publish) + (require 'ox-html) + (require 'htmlize) (require 'webfeeder)) -(add-to-list 'custom-theme-load-path "~/.emacs.d/everforest") -(load-theme 'everforest-hard-light t) - (setq org-html-validation-link nil + ;; https://emacs-china.org/t/org-emacs-script-org-publish-all/20782 + org-html-htmlize-output-type 'css org-export-with-toc 1 org-export-with-sub-superscripts '{}) @@ -42,7 +44,7 @@ :preserve-breaks t :org-html-validation-link nil - :html-head "" + :html-head "" ;; :html-head-include-default-style nil :html-link-home "https://dongdigua.github.io" :html-link-up "./../posts"