-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathwebsite.mak
More file actions
31 lines (21 loc) · 917 Bytes
/
website.mak
File metadata and controls
31 lines (21 loc) · 917 Bytes
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
# generated with CMTools 0.0.10 75f0436
#
# Makefile for running pandoc on all Markdown docs ending in .md
#
PROJECT = cloud-init-examples
PANDOC = $(shell which pandoc)
MD_PAGES = $(shell ls -1 *.md)
HTML_PAGES = $(shell ls -1 *.md | sed -E 's/.md/.html/g')
build: $(HTML_PAGES) $(MD_PAGES) pagefind
$(HTML_PAGES): $(MD_PAGES) .FORCE
if [ -f $(PANDOC) ]; then $(PANDOC) --metadata title=$(basename $@) -s --to html5 $(basename $@).md -o $(basename $@).html \
--lua-filter=links-to-html.lua \
--template=page.tmpl; fi
@if [ $@ = "README.html" ]; then mv README.html index.html; fi
pagefind: .FORCE
# NOTE: I am not including most of the archive in PageFind index since it doesn't make sense in this case.
pagefind --verbose --glob="{*.html,docs/*.html}" --force-language en-US --exclude-selectors="nav,header,footer" --output-path ./pagefind --site .
git add pagefind
clean:
@rm *.html
.FORCE: