-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
29 lines (21 loc) · 799 Bytes
/
makefile
File metadata and controls
29 lines (21 loc) · 799 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
.POSIX:
.SUFFIXES:
.SUFFIXES: .mmd .png
all: checkDependencies mermaidjs hugo postHugoCopy websiteArchive
clean:
rm -rf ./public/
rm -fv content/notes/ir/irg.png
checkDependencies:
@if [ ! -f /usr/bin/hugo ] || [ ! -f /usr/bin/npx ]; then \
printf 'warning: %s\n' 'needed dependencies for a full build: hugo, npx (npm)' >> /dev/stderr; \
fi
.mmd.png:
npx -p @mermaid-js/mermaid-cli mmdc -i $< -o $@
mermaidjs: content/notes/ir/irg.png
hugo:
hugo --enableGitInfo --panicOnWarning --printI18nWarnings --printPathWarnings
postHugoCopy:
cp -a ./changelog.rss ./data/ ./public/
websiteArchive:
mkdir -p ./public/archives/
tar --exclude='./public/archives' --exclude='./wip' -zcf public/archives/nikthink-net-full-latest.tgz .editorconfig .gitignore .gitmodules .github/workflows/* ./*