X-Git-Url: https://git.shemshak.org/~bandali/bndl.org/blobdiff_plain/b7b51be56777ba869fdecd282c3188ca8fad0af9..627c9ae4805fd0b532d8a5b4760db74ba145f21b:/ssng diff --git a/ssng b/ssng index c9cb4d0..b14383b 100755 --- a/ssng +++ b/ssng @@ -18,12 +18,13 @@ # ssng is a fork of Roman Zolotarev's ssg. See end of file for ssg's # license notice. -: "${WEBSITE_TITLE:=Roman Zolotarev}" -: "${SERVER_NAME:=www.romanzolotarev.com}" +: "${WEBSITE_TITLE:=Amin Bandali}" +: "${SERVER_NAME:=aminb.org}" : "${SERVER_PROTO:=https}" -: "${RSS_AUTHOR:=hi@romanzolotarev.com (Roman Zolotarev)}" +: "${RSS_AUTHOR:=amin@aminb.org}" : "${RSS_DESCRIPTION:=Personal website}" -: "${COPYRIGHT_YEAR:=2016}" +: "${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"|