diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index cbbe390..911bef1 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -10,16 +10,22 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - + - name: install extra repository run: sudo add-apt-repository ppa:kelleyk/emacs - + - name: refresh apt run: sudo apt-get update - + - name: install dependencies run: sudo apt-get install emacs26 + - name: install htmlize + run: git clone https://github.com/hniksic/emacs-htmlize && cp emacs-htmlize/htmlize.el src/ + + - name: install htmlize + run: git clone https://github.com/hniksic/emacs-htmlize + - name: make run: make -C src/ doc diff --git a/docs/config.el b/docs/config.el index 2bf16e4..093ee8c 100755 --- a/docs/config.el +++ b/docs/config.el @@ -2,6 +2,7 @@ ;; https://emacs.stackexchange.com/questions/38437/org-mode-batch-export-missing-syntax-highlighting (package-initialize) +(require 'htmlize) (require 'font-lock) (require 'subr-x) ;; for `when-let' diff --git a/src/create_doc.sh b/src/create_doc.sh index ea002d9..39327c8 100755 --- a/src/create_doc.sh +++ b/src/create_doc.sh @@ -1,7 +1,12 @@ #!/bin/bash INPUT=$1 -emacs --batch --load ../docs/config.el $INPUT -f org-html-export-to-html +if [[ -f ../docs/htmlize.el ]] +then + emacs --batch --load ../docs/htmlize.el --load ../docs/config.el $INPUT -f org-html-export-to-html +else + emacs --batch --load ../docs/config.el $INPUT -f org-html-export-to-html +fi mv index.html ../docs