small fixes

This commit is contained in:
teldra 2022-06-26 19:23:41 +02:00
parent e1eaa0ec5b
commit a797c02cad
5 changed files with 13 additions and 23 deletions

View File

@ -25,7 +25,13 @@ else
fi
for file in "${files[@]}"; do
fname="$(basename ${file%.*})"
s="$(basename ${file%.*})" # receive input in first argument
s="${s//[^[:alnum:]]/-}" # replace all non-alnum characters to -
s="${s//+(-)/-}" # convert multiple - to single -
s="${s/#-}" # remove - from start
s="${s/%-}" # remove - from end
fname="${s,,}" # convert to lowercase
folder="content/posts/${fname}"
if ! unzip -l "${file}"|grep -q "index.de.md"; then
err "maybe wrong archive, this is not compatible"
@ -44,7 +50,12 @@ output_temp=""
for file in "${files[@]}"; do
banner="false"
fname="$(basename ${file%.*})"
s="$(basename ${file%.*})" # receive input in first argument
s="${s//[^[:alnum:]]/-}" # replace all non-alnum characters to -
s="${s//+(-)/-}" # convert multiple - to single -
s="${s/#-}" # remove - from start
s="${s/%-}" # remove - from end
fname="${s,,}" # convert to lowercase
folder="content/posts/${fname}"
for f in $(find "${folder}" -type f); do
if echo ${i}|grep -q "banner"; then

View File

@ -1,12 +0,0 @@
---
title: "Testartikel"
date: 2022-06-26T19:21:00+02:00
news: ["Buha"]
events: ["Konzert"]
tags: ["Buha","Konzert","Andrej Turkovskij"]
---
Inhalt des Artikels
Ich weiss nicht was ich schreiben soll
![Wikipedia Logo](ujscvzou80j61.jpg "A Globe composed of letters and puzzle pieces")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 667 KiB

View File

@ -1,9 +0,0 @@
---
title: "Testartikel"
date: 2022-06-26T19:03:00+02:00
news: ["Buha"]
events: ["Konzert"]
tags: ["Buha","Konzert","Andrej Turkovskij"]
---
Inhalt des Artikels
Ich weiss nicht was ich schreiben soll

Binary file not shown.

Before

Width:  |  Height:  |  Size: 667 KiB