: "${RSS_AUTHOR:=amin@aminb.org}"
: "${RSS_DESCRIPTION:=Personal website}"
: "${COPYRIGHT_FROM_YEAR:=2016}"
+: "${DOCS:=out}"
##########################################################################
RSS_URL="$SERVER_PROTO://$SERVER_NAME/rss.xml"
SITEMAP="$TEMP_DIR/sitemap.xml"
-ANNOUNCEMENT_FILE="$PWD/announcement.html"
-FOOTER_FILE="$PWD/footer.html"
-HEADER_FILE="$PWD/header.html"
+ANNOUNCEMENT_FILE="$PWD/_announcement.html"
+FOOTER_FILE="$PWD/_footer.html"
+HEADER_FILE="$PWD/_header.html"
[ -f "$ANNOUNCEMENT_FILE" ] &&
ANNOUNCEMENT_TEXT=$(cat "$ANNOUNCEMENT_FILE")
[ -f "$HEADER_FILE" ] &&
[ -f "$FOOTER_FILE" ] &&
FOOTER=$(cat "$FOOTER_FILE") ||
FOOTER=$(cat << EOF
-Copyright $COPYRIGHT_YEAR–$(date +%Y)
-<a href="/about.html">$WEBSITE_TITLE</a>
+Copyright $COPYRIGHT_FROM_YEAR–$(date +%Y)
+<a href="/">$WEBSITE_TITLE</a>
+<span class="bar">|</span>
+<a href="/colophon">colophon</a>
EOF
)
md_to_html() {
find "$TEMP_DIR" -type f -name '*.md'|
while read -r file; do
- lowdown -D html-skiphtml -d metadata \
+ lowdown -D html-skiphtml -D html-head-ids \
"$file" > "${file%\.md}.html" &&
rm "$file"
done
/index.html)
title='Home'
head_title="$WEBSITE_TITLE"
- header__home=''
+ ;;
+ /contact.html)
+ head_title="Contact | $WEBSITE_TITLE"
;;
*)
title="${line#*====}"
- head_title="$title - $WEBSITE_TITLE"
- header__home="$HEADER"
+ head_title="$title | $WEBSITE_TITLE"
;;
esac
# merge page with html template
<input class="light-off" type="checkbox" id="light-off">
<div class="page">
$announcement
-<div class="header">
-<div class="header__left">$header__home</div>
-<div class="header__right">
-<label for="light-off" class="light-off-button"></label>
-</div>
-</div>
-<div class="article">$article</div>
-<div class="footer">$FOOTER</div>
+<header>
+$HEADER
+</header>
+<div class="article clear">$article</div>
+<footer>$FOOTER</footer>
</div>
</body>
</html>