about summary refs log tree commit diff
path: root/gen
blob: 9d7f8d398950e7b7f7d0f7933fe6dc8943c48a0c (plain)
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
#!/bin/sh

rm -r dest || true
mkdir dest

# This is useful when deploying on netlify. Thanks to storing compiled binaries
# in this folder they will be cached and restored.
export PATH="$PWD/.jekyll-cache:$PATH"
./tools/compile

cat > wpisy/kronika.html << EOF
<h2>Ostatnie wpisy</h2>

<a href="rss.xml"><img alt="" src="/assets/rss.svg" style="height:1em">RSS</a>
<div>
EOF

for f in `find wpisy/kronika/20* -name '*.md' | sort -r`; do
  path=`echo $f | sed 's/wpisy//;s/.md//'`
  echo "<a href=\"$path\"><div>$path</div></a>" >> wpisy/kronika.html
done
echo "</div>" >> wpisy/kronika.html

./ssg5 wpisy dest "19 PDH Puszcza" "https://19.niedzwiedzinski.cyou"
cp -r static/* dest