uhh, CI don't have a tty, use js or craft my CSS?

https://emacs-china.org/t/org-emacs-script-org-publish-all/20782
This commit is contained in:
dongdigua 2023-05-29 16:59:51 +08:00
parent b5ac4287b8
commit f6a966f481
3 changed files with 7 additions and 10 deletions

View File

@ -21,9 +21,6 @@ jobs:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 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 - name: Install Emacs
uses: purcell/setup-emacs@master uses: purcell/setup-emacs@master
with: with:

View File

@ -2,9 +2,7 @@ EMACS=emacs
ORG_CONFIG_FILE=publish_config.el ORG_CONFIG_FILE=publish_config.el
TARGET=ls ../*.html* | grep -v "index\|xmr\|404.html" TARGET=ls ../*.html* | grep -v "index\|xmr\|404.html"
# --script and --batch can't load the theme EMACS_OPTS=--script $(ORG_CONFIG_FILE) -f myweb-publish
# 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
all: html all: html

View File

@ -13,13 +13,15 @@
(package-install p))) (package-install p)))
(eval-when-compile (eval-when-compile
(require 'org)
(require 'ox-publish) (require 'ox-publish)
(require 'ox-html)
(require 'htmlize)
(require 'webfeeder)) (require 'webfeeder))
(add-to-list 'custom-theme-load-path "~/.emacs.d/everforest")
(load-theme 'everforest-hard-light t)
(setq org-html-validation-link nil (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-toc 1
org-export-with-sub-superscripts '{}) org-export-with-sub-superscripts '{})
@ -42,7 +44,7 @@
:preserve-breaks t :preserve-breaks t
:org-html-validation-link nil :org-html-validation-link nil
:html-head "<link rel='stylesheet' type='text/css' href='css/main.css' />" :html-head "<link rel='stylesheet' href='css/main.css' />"
;; :html-head-include-default-style nil ;; :html-head-include-default-style nil
:html-link-home "https://dongdigua.github.io" :html-link-home "https://dongdigua.github.io"
:html-link-up "./../posts" :html-link-up "./../posts"