diff --git a/.github/scripts/frontmatter.sh b/.github/scripts/frontmatter.sh index c64adb39a5f..4e4bbaac5ab 100755 --- a/.github/scripts/frontmatter.sh +++ b/.github/scripts/frontmatter.sh @@ -23,7 +23,7 @@ is_true() { } echo "Checking front matter" -if ! head -n 1 "$file_path" | grep -q "---"; then +if ! head -n 1 "$file_path" | grep -q "^---$"; then echo "Front matter (start) not found, adding it" # Dont trace content, as its usually too large [ "$DEBUG" == "true" ] && set +x @@ -31,6 +31,8 @@ if ! head -n 1 "$file_path" | grep -q "---"; then [ "$DEBUG" == "true" ] && set -x fi +cat $file_path + # Get the title from the front matter echo "Checking title" title=$($base_cmd '.title' "$file_path")