-
Notifications
You must be signed in to change notification settings - Fork 2
/
justfile
39 lines (34 loc) · 867 Bytes
/
justfile
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
default: serve
# Install dependencies
setup:
npm i @11ty/eleventy markdown-it markdown-it-attrs markdown-it-anchor
build: clean setup
#!/usr/bin/env bash
export SITE_URL="https://mechtronica.net"
npx @11ty/eleventy
unset SITE_URL
# Regenerate and serve the site
serve: setup
npx @11ty/eleventy --serve
# Publish the website from the current state
publish: build
#!/usr/bin/env bash
set -euxo pipefail
rm -rf /tmp/mechtronica
mv -f _site /tmp/mechtronica
git checkout published_site
for f in `ls`
do
rm -rf $f
done
for f in `ls /tmp/mechtronica`
do
mv /tmp/mechtronica/$f .
done
echo "mechtronica.net" > "CNAME"
git add -A
git commit -m "publish"
echo "Double check that things look ok, then run git push"
# Remove old static site content
clean:
rm -rf _site