mirror of
https://github.com/truecharts/charts.git
synced 2026-07-08 12:23:57 -03:00
Update frontmatter.sh
This commit is contained in:
4
.github/scripts/frontmatter.sh
vendored
4
.github/scripts/frontmatter.sh
vendored
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user