simplify st
This commit is contained in:
parent
7e33b51819
commit
7af727305e
6
st/st.sh
6
st/st.sh
|
|
@ -5,18 +5,18 @@ index=$output/index.html
|
||||||
title=Texts
|
title=Texts
|
||||||
|
|
||||||
rm -rf $output/*
|
rm -rf $output/*
|
||||||
|
touch $index
|
||||||
|
|
||||||
cp style.css $output/style.css
|
|
||||||
echo '<!DOCTYPE html><html><head><title>' >> $index
|
echo '<!DOCTYPE html><html><head><title>' >> $index
|
||||||
echo $title >> $index
|
echo $title >> $index
|
||||||
echo '</title><link rel="stylesheet" type="text/css" href="style.css"></head><body><div><a href="index.html">Home</a></div><hr>' >> $index
|
echo '</title></head><body>' >> $index
|
||||||
|
|
||||||
for f in $input/*.md
|
for f in $input/*.md
|
||||||
do
|
do
|
||||||
f=${f##*/}
|
f=${f##*/}
|
||||||
title=${f%.md}
|
title=${f%.md}
|
||||||
|
|
||||||
sed 's/\[\[\(.*\)\]\]/\[\1\](\1.html)/g' "$input/$f" | pandoc -f $outformat --metadata title="$title" --template template.html --standalone -o "$output/${title}.html"
|
sed 's/\[\[\(.*\)\]\]/\[\1\](\1.html)/g' "$input/$f" | pandoc -f $outformat --metadata title="$title" --standalone -o "$output/${title}.html"
|
||||||
echo "<div><a href=\"$title.html\">$title</a></div>" >> $index
|
echo "<div><a href=\"$title.html\">$title</a></div>" >> $index
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
body {
|
|
||||||
font-family: helvetica
|
|
||||||
}
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
<!doctype html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>$title$</title>
|
|
||||||
<link rel="stylesheet" type="text/css" href="style.css">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div>
|
|
||||||
<a href="index.html">Home</a>
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
$body$
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
Loading…
Reference in New Issue