From ca21ed158b9ff5580c35e322b882dfb190284b1c Mon Sep 17 00:00:00 2001 From: Nulo Date: Mon, 11 Oct 2021 16:27:56 -0300 Subject: [PATCH] =?UTF-8?q?Reutilizar=20c=C3=B3digo=20de=20markdown=20en?= =?UTF-8?q?=20index?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/build.sh b/build.sh index 6982c3e..5ba894d 100755 --- a/build.sh +++ b/build.sh @@ -18,6 +18,13 @@ template () { fi } +markdown () { + # TODO: hacky + cmark --unsafe "$1" \ + | sed "s/\1<\/a>/g' +} + outdir=build mkdir -p $outdir # Autocopiarnos :) @@ -25,7 +32,7 @@ cp ./*.sh ./*.md ./*.css ./*.png ./*.mp4 "$outdir" index="$outdir/index.html" inicio=true header=false template "nulo.in" > "$index" -cmark --unsafe index.md >> "$index" +markdown index.md >> "$index" echo "

Lista de páginas