diff options
author | Yann Herklotz <git@yannherklotz.com> | 2022-03-25 12:57:40 +0000 |
---|---|---|
committer | Yann Herklotz <git@yannherklotz.com> | 2022-03-25 12:57:40 +0000 |
commit | ea4ad462e33384c8bbbddca523f138c6c181e7b6 (patch) | |
tree | 3e906e36e1279d8e19793e67e2756c7205ab3519 /Makefile | |
parent | b25f796221dcb16ce2af8bd139d032cf7b5bdb7d (diff) | |
download | yannherklotz.com-ea4ad462e33384c8bbbddca523f138c6c181e7b6.tar.gz yannherklotz.com-ea4ad462e33384c8bbbddca523f138c6c181e7b6.zip |
Integrate everything into one makefile
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 31 |
1 files changed, 30 insertions, 1 deletions
@@ -1,4 +1,20 @@ -all: layouts/partials/papers.html layouts/partials/papers_other.html +DEPS := "(progn\ +(require 'package)\ +(package-initialize)\ +(add-to-list 'package-archives '(\"melpa\" . \"https://melpa.org/packages/\") t)\ +(package-refresh-contents)\ +(package-install 'ox-hugo)\ +(require 'package)\ +(package-initialize)\ +(require 'org)\ +(require 'ox)\ +(require 'ox-hugo)\ +(setq org-confirm-babel-evaluate nil\ + org-export-with-broken-links t))" + +PUBLISH := "(org-hugo-export-wim-to-md :all-subtrees)" + +all: public layouts/partials: mkdir -p $@ @@ -13,3 +29,16 @@ layouts/partials/%.html: %.bib | layouts/partials url_artifact artifact $< sed -r -e 's:\[(.*)\]:<b>\1</b>:g' $@ >$@.new && mv $@.new $@ sed -r -e 's:Yann Herklotz:<b>Yann Herklotz</b>:g' $@ >$@.new && mv $@.new $@ + +content: content.org + emacs --batch --eval $(DEPS) --find-file $< --eval $(PUBLISH) + +public: content layouts/partials/papers.html layouts/partials/papers_other.html + hugo --minify + +clean: + rm -rf layouts + rm -rf public + rm -rf content + +.PHONY: all clean |