mirror of
https://codeberg.org/scip/kleingebaeck.git
synced 2025-12-17 04:21:00 +01:00
Fix #47: add mock http server for testing w/o hitting prod site
This commit is contained in:
13
t/httproot/templates/render.sh
Executable file
13
t/httproot/templates/render.sh
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh -x
|
||||
base="../kleinanzeigen"
|
||||
mkdir -p $base
|
||||
|
||||
echo "Generating /s-bestandsliste.html"
|
||||
p2cli -t index.tpl -i vars.yaml > $base/s-bestandsliste.html
|
||||
|
||||
for idx in 0 1; do
|
||||
slug=$(cat vars.yaml | yq ".ads[$idx].slug")
|
||||
id=$(cat vars.yaml | yq ".ads[$idx].id")
|
||||
mkdir -p $base/$slug/$id
|
||||
cat vars.yaml | yq ".ads[$idx]" | p2cli -t ad.tpl -f yaml > $base/$slug/$id/index.html
|
||||
done
|
||||
Reference in New Issue
Block a user