projects
/
~bandali
/
bndl.org
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add more content (contact, colophon, arch on air post)
[~bandali/bndl.org]
/
ssng
diff --git
a/ssng
b/ssng
index
8ea78e2
..
b14383b
100755
(executable)
--- a/
ssng
+++ b/
ssng
@@
-24,6
+24,7
@@
: "${RSS_AUTHOR:=amin@aminb.org}"
: "${RSS_DESCRIPTION:=Personal website}"
: "${COPYRIGHT_FROM_YEAR:=2016}"
: "${RSS_AUTHOR:=amin@aminb.org}"
: "${RSS_DESCRIPTION:=Personal website}"
: "${COPYRIGHT_FROM_YEAR:=2016}"
+: "${DOCS:=out}"
##########################################################################
##########################################################################
@@
-41,9
+42,9
@@
RSS_FILE="$TEMP_DIR/rss.xml"
RSS_URL="$SERVER_PROTO://$SERVER_NAME/rss.xml"
SITEMAP="$TEMP_DIR/sitemap.xml"
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 "$ANNOUNCEMENT_FILE" ] &&
ANNOUNCEMENT_TEXT=$(cat "$ANNOUNCEMENT_FILE")
[ -f "$HEADER_FILE" ] &&
@@
-56,8
+57,10
@@
EOF
[ -f "$FOOTER_FILE" ] &&
FOOTER=$(cat "$FOOTER_FILE") ||
FOOTER=$(cat << EOF
[ -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
)
EOF
)
@@
-92,7
+95,7
@@
copy_to_document_root() {
md_to_html() {
find "$TEMP_DIR" -type f -name '*.md'|
while read -r file; do
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
"$file" > "${file%\.md}.html" &&
rm "$file"
done
@@
-202,12
+205,13
@@
echo "$sitemap"|
/index.html)
title='Home'
head_title="$WEBSITE_TITLE"
/index.html)
title='Home'
head_title="$WEBSITE_TITLE"
- header__home=''
+ ;;
+ /contact.html)
+ head_title="Contact | $WEBSITE_TITLE"
;;
*)
title="${line#*====}"
;;
*)
title="${line#*====}"
- head_title="$title - $WEBSITE_TITLE"
- header__home="$HEADER"
+ head_title="$title | $WEBSITE_TITLE"
;;
esac
# merge page with html template
;;
esac
# merge page with html template
@@
-238,14
+242,11
@@
echo "$sitemap"|
<input class="light-off" type="checkbox" id="light-off">
<div class="page">
$announcement
<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>
</div>
</body>
</html>