diff --git a/build.sh b/build.sh index 78842cd..4b31af2 100755 --- a/build.sh +++ b/build.sh @@ -108,7 +108,8 @@ add_header_and_footer() { cp "$BASE_PATH/header.html" "$BASE_PATH/temp/$parent_dir/temp_header.html" # Check for relevant metadata, and perform corresponding action - if [[ ! -v "meta_array["date"]" ]]; then # If there is no date + # This syntax is intended (although it doesn't follow typical Bash array syntax). See https://stackoverflow.com/a/45385463 for more info. + if [[ ! -v "meta_array[date]" ]]; then # If there is no date sed -i '$ d' "$BASE_PATH/temp/$parent_dir/temp_header.html" # remove the 'date published' section of the header fi