From 1c98cfcdc7f599c1f38916dcd331a41f36d63880 Mon Sep 17 00:00:00 2001 From: Hugo Peixoto Date: Fri, 21 Jul 2023 00:28:00 +0100 Subject: [PATCH] Mais alpine --- mkstork.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/mkstork.sh b/mkstork.sh index 25d088c..4680e8c 100755 --- a/mkstork.sh +++ b/mkstork.sh @@ -9,10 +9,12 @@ frontmatter_handling = "Parse" files = [ EOF -find content/artigos -name "*.md" -printf "%P\n" | while read filename; do -slug="$(echo "$filename" | sed -e 's|/index.md||')" -date="$(cat "content/artigos/$filename" | yq --front-matter=extract .date | sed -e 's/ ..:..:..//' -e 's/-/\//g')" -echo " {url=\"$date/$slug\", title=\"\", path=\"$filename\"}," -done +find content/artigos -name "*.md" | + sed -e 's|content/artigos/||' | + while read filename; do + slug="$(echo "$filename" | sed -e 's|/index.md||')" + date="$(cat "content/artigos/$filename" | yq --front-matter=extract .date | sed -e 's/ ..:..:..//' -e 's/-/\//g')" + echo " {url=\"$date/$slug\", title=\"\", path=\"$filename\"}," + done echo "]"