X-Git-Url: https://git.shemshak.org/~bandali/bndl.org/blobdiff_plain/2c35d3a8bdf9546f96d4a570595d0c9908d51eb5..65641ab439f507b8cf0f24bca67b03fbcfbfa218:/ssng?ds=sidebyside diff --git a/ssng b/ssng index 8ea78e2..b14383b 100755 --- a/ssng +++ b/ssng @@ -24,6 +24,7 @@ : "${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" -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" ] && @@ -56,8 +57,10 @@ EOF [ -f "$FOOTER_FILE" ] && FOOTER=$(cat "$FOOTER_FILE") || FOOTER=$(cat << EOF -Copyright $COPYRIGHT_YEAR–$(date +%Y) -$WEBSITE_TITLE +Copyright $COPYRIGHT_FROM_YEAR–$(date +%Y) +$WEBSITE_TITLE +| +colophon EOF ) @@ -92,7 +95,7 @@ copy_to_document_root() { 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 @@ -202,12 +205,13 @@ echo "$sitemap"| /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 @@ -238,14 +242,11 @@ echo "$sitemap"|
$announcement -
-
$header__home
-
- -
-
-
$article
- +
+$HEADER +
+
$article
+