eonn-site

scripts and documents that generate eonn.xyz
git clone git://git.eonn.xyz/eonn-site.git
Log | Files | Refs

commit 808d73247691d2e0f089811b9257e5260c84d0d0
parent 83df78b6bb0c8f8b3e18487742c310308924981a
Author: Ian Ressa <ian@eonn.xyz>
Date:   Sun, 20 Feb 2022 23:43:13 -0500

adding index footer specification

Diffstat:
Mbin/ssg5 | 16+++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/bin/ssg5 b/bin/ssg5 @@ -47,7 +47,9 @@ main() { h_file="$src/_header.html" h_index_file="$src/_header-index.html" f_file="$src/_footer.html" - test -f "$f_file" && FOOTER=$(cat "$f_file") && export FOOTER + f_index_file="$src/_footer-index.html" + test -f "$f_file" && DEFFOOTER=$(cat "$f_file") && export DEFFOOTER + test -f "$f_index_file" && INDEXFOOTER=$(cat "$f_index_file") && export INDEXFOOTER test -f "$h_file" && DEFHEADER=$(cat "$h_file") && export DEFHEADER test -f "$h_index_file" && INDEXHEADER=$(cat "$h_index_file") && export INDEXHEADER @@ -184,9 +186,11 @@ render_html_files() { while read -r f do if $(echo "$1/$f" | grep "index.html" > /dev/null); then - HEADER="$INDEXHEADER" && export HEADER + HEADER="$INDEXHEADER" && export HEADER + FOOTER="$INDEXFOOTER" && export FOOTER else - HEADER="$DEFHEADER" && export HEADER + HEADER="$DEFHEADER" && export HEADER + FOOTER="$DEFFOOTER" && export FOOTER fi render_html_file "$3" < "$1/$f" > "$2/$f" done @@ -210,9 +214,11 @@ render_md_files_markdown() { while read -r f do if $(echo "$1/$f" | grep "index.md" > /dev/null); then - HEADER="$INDEXHEADER" && export HEADER + HEADER="$INDEXHEADER" && export HEADER + FOOTER="$INDEXFOOTER" && export FOOTER else - HEADER="$DEFHEADER" && export HEADER + HEADER="$DEFHEADER" && export HEADER + FOOTER="$DEFFOOTER" && export FOOTER fi markdown < "$1/$f" | render_html_file "$3" \