-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.sh
executable file
·25 lines (19 loc) · 809 Bytes
/
build.sh
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
#!/usr/bin/env bash
# first, copy over any extra shortcodes, like the pdf embedded shortcode
# https://stackoverflow.com/questions/793858/how-to-mkdir-only-if-a-directory-does-not-already-exist
mkdir -p layouts/shortcodes
cp extras/pdf_shortcodes/layouts/shortcodes/embed-pdf.html layouts/shortcodes/
mkdir -p static/js
cp -R extras/pdf_shortcodes/static/js/pdf-js static/js/
if [ ! -r ./node_modules ]; then
podman run --rm --volume $PWD:/srv -w /srv docker.io/node npm ci
fi
if [ ! -r ./public ]; then
podman run --rm --volume $PWD:/src -w /src docker.io/capsulecorplab/hugo-asciidoctor-plantuml:0.76.5-alpine 'hugo --minify -v --destination public'
fi
if [ ! -r ./content/assets ]; then
ln -srv assets content/assets
fi
if [ ! -r ./public/assets ]; then
cp -r assets public/assets
fi