Switch from Pelican to Zola

Updated articles accordingly
Updated new_article script
Changed README
Added Zola 'section indexes'
Added Zulma theme submodule

Removed everything related to Pelican
This commit is contained in:
trotFunky 2020-10-03 00:45:33 +02:00
parent a11b0f01e0
commit a52350f164
21 changed files with 131 additions and 217 deletions

View file

@ -7,8 +7,9 @@ append_to_metadata() {
if [ $# -eq 2 ]; then
echo -n "$2 : "
read answer
option="$(echo "$2" | tr '[:upper:]' '[:lower:]')"
if [ -n "$answer" ]; then
echo "$2: ""$answer" >> "content/articles/$1"
echo "$option = ""$answer" >> "content/articles/$1"
else
echo "Empty answer, nothing was appended"
fi
@ -18,21 +19,27 @@ append_to_metadata() {
echo -n "Filename : "
read filename
echo "+++" > content/articles/"$filename"
echo "The title must be between quotes"
append_to_metadata "$filename" "Title"
append_to_metadata "$filename" "Date"
append_to_metadata "$filename" "Category"
append_to_metadata "$filename" "Tags"
append_to_metadata "$filename" "Lang"
append_to_metadata "$filename" "Draft"
append_to_metadata "$filename" "Slug"
append_to_metadata "$filename" "Summary"
echo "[taxonomies]" >> content/articles/"$filename"
echo -e "\n" >> content/articles/"$filename"
echo "Categories and tag must be formatted as follows : [\"element1\",\"element2\"]"
append_to_metadata "$filename" "Categories"
append_to_metadata "$filename" "Tags"
echo -e "+++\n\n" >> content/articles/"$filename"
# Try to get the default editor from alternatives
EDITOR=${EDITOR:-$(update-alternatives --list editor | head -n1)}