forked from Bunteshaus/bunteshaus.de
small fixes
This commit is contained in:
parent
e1eaa0ec5b
commit
a797c02cad
|
@ -25,7 +25,13 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for file in "${files[@]}"; do
|
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}"
|
folder="content/posts/${fname}"
|
||||||
if ! unzip -l "${file}"|grep -q "index.de.md"; then
|
if ! unzip -l "${file}"|grep -q "index.de.md"; then
|
||||||
err "maybe wrong archive, this is not compatible"
|
err "maybe wrong archive, this is not compatible"
|
||||||
|
@ -44,7 +50,12 @@ output_temp=""
|
||||||
|
|
||||||
for file in "${files[@]}"; do
|
for file in "${files[@]}"; do
|
||||||
banner="false"
|
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}"
|
folder="content/posts/${fname}"
|
||||||
for f in $(find "${folder}" -type f); do
|
for f in $(find "${folder}" -type f); do
|
||||||
if echo ${i}|grep -q "banner"; then
|
if echo ${i}|grep -q "banner"; then
|
||||||
|
|
|
@ -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 |
|
@ -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 |
Loading…
Reference in New Issue