This commit is contained in:
vulpine 2020-07-31 14:12:36 +00:00
commit 087c7155a1
4 changed files with 40 additions and 0 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
src
src/
src/*

17
template/page.html Normal file
View File

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html>
<head>
<meta name="generator" content=
"lick simple site">
<title>XFSSTITLE</title>
<link rel="stylesheet" href="template/style.css">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<!-- xfss -->
</body>
</html>

1
template/style.css Symbolic link
View File

@ -0,0 +1 @@
../../lickhack-css/lickhack.css

19
xfss Normal file
View File

@ -0,0 +1,19 @@
#!/bin/bash
BOOPTMP=$(mktemp)
for fn in $(ls src); do
NEWF=${fn%??}html
TITLE=$(echo ${fn%???} | sed 's/_/ /g' | sed -e 's/[]$.*[\^]/\\&/g')
echo "rendering $NEWF..."
cmark <src/$fn >$BOOPTMP
cp template/page.html $NEWF
sed "/<body>/r $BOOPTMP" template/page.html > $NEWF
sed -i "s/XFSSTITLE/$TITLE/" $NEWF
done