document lowdown as dependency; add some error handling
This commit is contained in:
parent
f596aa50b3
commit
5f0252aedc
10
README.md
10
README.md
@ -21,6 +21,16 @@ make script. :)
|
|||||||
You can see this method in action (maybe! if we didn't break it) at
|
You can see this method in action (maybe! if we didn't break it) at
|
||||||
[https://testing.anarchyplanet.org](https://testing.anarchyplanet.org).
|
[https://testing.anarchyplanet.org](https://testing.anarchyplanet.org).
|
||||||
|
|
||||||
|
## Dependencies
|
||||||
|
|
||||||
|
We use [lowdown](https://kristaps.bsd.lv/lowdown/) for markdown
|
||||||
|
conversion. See its documentation:
|
||||||
|
|
||||||
|
* [overview](https://kristaps.bsd.lv/lowdown/)
|
||||||
|
* [lowdown(1)](https://kristaps.bsd.lv/lowdown/lowdown.1.html)
|
||||||
|
* [lowdown(5)](https://kristaps.bsd.lv/lowdown/lowdown.5.html) which
|
||||||
|
describes the lanuage syntax
|
||||||
|
|
||||||
## TODOs
|
## TODOs
|
||||||
|
|
||||||
### TODO discuss and decide on sections
|
### TODO discuss and decide on sections
|
||||||
|
11
publish.sh
11
publish.sh
@ -1,11 +1,17 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
PUB_DIR=${1:-/home/html/planet/static}
|
PUB_DIR=${1:-/home/html/planet/static}
|
||||||
FILES=md/*.md
|
MD_FILES=md/*.md
|
||||||
|
OTHER_FILES=*.css
|
||||||
|
|
||||||
|
if ! test -d $PUB_DIR; then
|
||||||
|
echo "error: PUB_DIR does not exist:" $PUB_DIR
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
test -d tmp || mkdir tmp
|
test -d tmp || mkdir tmp
|
||||||
|
|
||||||
for f in $FILES
|
for f in $MD_FILES
|
||||||
do
|
do
|
||||||
filename=$(basename -- $f .md)
|
filename=$(basename -- $f .md)
|
||||||
echo "publishing md/$filename.md to $PUB_DIR/$filename.html"
|
echo "publishing md/$filename.md to $PUB_DIR/$filename.html"
|
||||||
@ -21,3 +27,4 @@ do
|
|||||||
cat tmp/head.html nav.html tmp/$filename.html foot.html tail.html \
|
cat tmp/head.html nav.html tmp/$filename.html foot.html tail.html \
|
||||||
> $PUB_DIR/$filename.html
|
> $PUB_DIR/$filename.html
|
||||||
done
|
done
|
||||||
|
cp $OTHER_FILES $PUB_DIR
|
||||||
|
Loading…
x
Reference in New Issue
Block a user