aboutsummaryrefslogtreecommitdiff
path: root/generate
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2020-12-07 03:00:25 +0100
committerCharles Cabergs <me@cacharle.xyz>2020-12-07 03:00:25 +0100
commit4fb46cd35fcd929136ae44e4f31f489c361b5282 (patch)
tree038e08e633feb8aa7cd3b9ec92bb45d343bdd2d8 /generate
parent62963ef1498f202119f69a5eb7e70918d10f4319 (diff)
downloadcacharle.xyz-4fb46cd35fcd929136ae44e4f31f489c361b5282.tar.gz
cacharle.xyz-4fb46cd35fcd929136ae44e4f31f489c361b5282.tar.bz2
cacharle.xyz-4fb46cd35fcd929136ae44e4f31f489c361b5282.zip
Added static files, rebuild on save, new style sheet
Diffstat (limited to 'generate')
-rwxr-xr-xgenerate16
1 files changed, 8 insertions, 8 deletions
diff --git a/generate b/generate
index 6bb22fb..f1f3378 100755
--- a/generate
+++ b/generate
@@ -30,11 +30,11 @@ base_template_link () {
blog_path=blog
mkdir -p "$blog_path"
base_template < index.template.html |
- base_template_link 'favicon.png' |
- base_template_link 'style.css' > index.html
+ base_template_link 'static/img/favicon.png' |
+ base_template_link 'static/css/style.css' > index.html
base_template < school.template.html |
- base_template_link 'favicon.png' |
- base_template_link 'style.css' > school.html
+ base_template_link 'static/img/favicon.png' |
+ base_template_link 'static/css/style.css' > school.html
cp rss.template.xml rss.xml
@@ -45,8 +45,8 @@ do
pandoc -f markdown -t html < "$post_path" |
base_template |
- base_template_link '../favicon.png' |
- base_template_link '../style.css' > "$post_dst_path"
+ base_template_link '../static/img/favicon.png' |
+ base_template_link '../static/css/style.css' > "$post_dst_path"
# Add blog artcle link to the index.html
title=$(grep '^# .*$' -m 1 "$post_path" | cut -c 2-)
@@ -74,8 +74,8 @@ do
title=$(basename "$util_path" | tr '_' ' ')
sed '$ a <script type="text/javascript" src="script.js"></script>' < "$util_path/index.template.html" |
base_template |
- base_template_link '../../favicon.png' |
- base_template_link '../../style.css' |
+ base_template_link '../../static/img/favicon.png' |
+ base_template_link '../../static/css/style.css' |
base_template_link 'style.css' > "$util_path/index.html"
sed -i'' "/<!-- UTILSINDEX -->/ a\
<li><a href=\"$util_path\">$title</a></li>" index.html