From bd9cd5745961463377a0aadd594822147d289bf0 Mon Sep 17 00:00:00 2001 From: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Date: Mon, 13 May 2024 01:29:53 +0300 Subject: [PATCH] Update frontmatter.sh --- .github/scripts/frontmatter.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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")