From 04d6e3a7e3681958d80fe7a06153409394f5e8d3 Mon Sep 17 00:00:00 2001 From: Graham Watts <34165628+GingerGraham@users.noreply.github.com> Date: Tue, 2 Apr 2024 08:06:29 +0100 Subject: [PATCH] Replaced sed with echo for new lines --- .github/scripts/addFrontMatter.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/scripts/addFrontMatter.sh b/.github/scripts/addFrontMatter.sh index 02b587e..03c87ec 100755 --- a/.github/scripts/addFrontMatter.sh +++ b/.github/scripts/addFrontMatter.sh @@ -18,7 +18,7 @@ find ${basePath} -type f \( -iname "*.md" ! -iname "*index*" ! -iname "*readme*" #frontMatter="${startEnd}\npermalink: /knowledge/${subjectLower}/${titleLower}/\nsubject: ${subject}\ntitle: ${titleSpaces}\nexcerpt: "${excerpt}"\n${startEnd}" # build Liquid Front Matter - builds multiline string sed -i "1i ${frontMatter}" "${path}" # prepend the front matter to the head of the file # Add new line after end of file - sed -i '$a ' "${path}" + echo "" >> "${path}" # Append breadcrumbs include to the end of the file on a new line and adding a new line to the end of the file - sed -i '$a {% include breadcrumbs2.html %}' "${path}" + echo "{% include breadcrumbs2.html %}" >> "${path}" done