xfss
This commit is contained in:
commit
087c7155a1
4 changed files with 40 additions and 0 deletions
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
src
|
||||||
|
src/
|
||||||
|
src/*
|
17
template/page.html
Normal file
17
template/page.html
Normal 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
1
template/style.css
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../../lickhack-css/lickhack.css
|
19
xfss
Normal file
19
xfss
Normal 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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue