blob: 2748a7d924d9233d5413ae7ec34a2abbd9fd884b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
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 $@
layouts/partials/%.html: %.bib | layouts/partials
bibtex2html -o $(subst .html,,$@) -use-keys -dl -linebreak \
-noabstract -nokeywords -nobibsource -nofooter -nodoc \
--named-field url_video video --named-field url_tex tex \
--named-field url_slides slides --named-field url_press press \
--named-field url_poster poster --named-field url_manuscript pdf \
--named-field url_changelog changelog \
--named-field url_blog_post blog --named-field \
url_artefact artefact $<
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 --gc --minify
clean:
rm -rf layouts
rm -rf public
rm -rf content
.PHONY: all clean
|