forked from gbtami/pychess-variants
-
Notifications
You must be signed in to change notification settings - Fork 0
/
md2html.sh
executable file
·31 lines (21 loc) · 791 Bytes
/
md2html.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
26
27
28
29
30
31
#!/bin/sh
cd static/docs
export PATH="../../node_modules/.bin/:$PATH"
for f in *.md; do
showdown makehtml -i "$f" -o "$(basename -- "$f" .md).html" --flavor github
done
for f in hu/*.md; do
showdown makehtml -i "$f" -o "$(basename -- "$f" .md).hu.html" --flavor github
done
for f in pt/*.md; do
showdown makehtml -i "$f" -o "$(basename -- "$f" .md).pt.html" --flavor github
done
for f in fr/*.md; do
showdown makehtml -i "$f" -o "$(basename -- "$f" .md).fr.html" --flavor github
done
showdown makehtml -i "zh/intro.md" -o "intro.zh.html" --flavor github
SRC='https://github.com/gbtami/pychess-variants/blob/master';
DST='https://www.pychess.org';
find . -type f -name "*.html" -exec sed -i 's,'"$SRC"','"$DST"',' {} \;
mkdir ../../templates/docs
mv -t ../../templates/docs *.html