From 517c90704a06a5ef1c5ebdd7f474b45b0b7b1cec Mon Sep 17 00:00:00 2001 From: Alejandro Gallo Date: Tue, 12 Oct 2021 17:57:52 +0200 Subject: [PATCH] Add html creation infrastructure --- .github/workflows/main.yml | 7 +++++++ Makefile | 5 +++++ etc/emacs/html.el | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+) create mode 100644 etc/emacs/html.el diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3704122..df3504f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -51,10 +51,17 @@ jobs: - name: create doc run: | + mkdir -p doc cd doc nix-shell --run 'make all' echo hello world > index.html + - name: create atrip.html + run: | + cd doc + nix-shell --run 'make html' + mv atrip.html doc/ + - name: Deploy uses: JamesIves/github-pages-deploy-action@4.1.0 with: diff --git a/Makefile b/Makefile index f2f8b87..1d66502 100644 --- a/Makefile +++ b/Makefile @@ -87,3 +87,8 @@ install: cp -r include/* $(PREFIX)/include/ mkdir -p $(PREFIX)/lib cp $(wildcard $(ATRIP_SHARED_LIBRARY) $(ATRIP_STATIC_LIBRARY)) $(PREFIX)/lib/ + +.PHONY: html +EMACS_HTML = $(EMACS) --load ./etc/emacs/html.el +html: + $(EMACS_HTML) $(ORG_MAIN) --eval "(org-html-export-to-html)" diff --git a/etc/emacs/html.el b/etc/emacs/html.el new file mode 100644 index 0000000..dd45103 --- /dev/null +++ b/etc/emacs/html.el @@ -0,0 +1,33 @@ +(require 'package) + +(setq package-enable-at-startup t) +(setq package-archives + '(("gnu" . "http://elpa.gnu.org/packages/") + ("melpa" . "http://melpa.org/packages/" ) + ("org" . "http://orgmode.org/elpa/" ))) +(package-initialize) + +(unless (package-installed-p 'use-package) + (package-refresh-contents) + (package-install 'use-package)) + +(eval-when-compile + (require 'use-package)) + +(use-package htmlize + :ensure t) + +(require 'org) + +;(use-package org-plus-contrib +; :ensure + +;(use-package org-src + ;:ensure t) + +(setq org-src-fontify-natively t + org-src-preserve-indentation t + org-src-tab-acts-natively t) + +(load-theme 'tsdh-light) +(require 'ox-html)