paritybit.ca

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit d9d8b8e1461fde48bc800895ed7c6b1861ff3dc3
parent eceb227f669884a6922464f1f40131991fa7deec
Author: Jake Bauer <jbauer@paritybit.ca>
Date:   Tue, 19 Nov 2019 12:50:47 -0500

Remove unnecessary 'paritybit.ca —' from title tags

Diffstat:
Mcreatepages.sh | 5++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/createpages.sh b/createpages.sh @@ -103,7 +103,7 @@ for page in $@; do # And sets the html title tag to be the content of that first line pagetitle=$(head -n 1 "$pagedir"/"$pagename".md | cut -f 2- -d " ") printf " Setting page title..." - sed -i "s/<title>.*<\/title>/<title>paritybit.ca – ${pagetitle//&/\\&}<\/title>/" \ + sed -i "s/<title>.*<\/title>/<title>${pagetitle//&/\\&}<\/title>/" \ "$htmldir"/"$savepath"/"$pagename".html tput setaf 2; tput bold echo " [DONE]" @@ -129,12 +129,11 @@ for page in $@; do # Remove leading whitespace and quote marks CSSTagsClean=$(echo -e "${CSSTags}" | sed -e 's/^[[:space:]]*//') CSSTagsClean=$(sed -e 's/^"//' -e 's/"$//' <<< "$CSSTagsClean") - printf " Adding CSS link elements..." # Split fifth line into separate css file names, separated by a space IFS=' ' read -r -a CSSFileList <<< "$CSSTagsClean" # Add each link element after the <title> tag for CSSFile in "${CSSFileList[@]}"; do - sed -i "/<title>paritybit.ca/a \ \ \ \ <link rel=\"stylesheet\" href=\"\/css\/$CSSFile\">" \ + sed -i "/<title>/a \ \ \ \ <link rel=\"stylesheet\" href=\"\/css\/$CSSFile\">" \ $htmldir/$savepath/$pagename.html done tput setaf 2; tput bold