diff --git a/genlog.sh b/genlog.sh index a365b37..727c076 100755 --- a/genlog.sh +++ b/genlog.sh @@ -72,6 +72,14 @@ do # converting .gmi files in .html /usr/local/bin/gmnitohtml < "$gmi_file" > "$tempdir/body.html" + # trick to support h4 titles + lines=$(grep "

# .*<\/h3>" "$tempdir/body.html") + while read -r line; do + fixed_line=${line//

# /

} # replace '

# ' by '

' + fixed_line=${fixed_line//<\/h3>/<\/h4>} # replace '

' by '' + sed -i "s~$line~$fixed_line~" "$tempdir/body.html" + done <<< "$lines" + # retrieving of the path of the current .gmi file file_path="$(dirname "$gmi_file")" # retrieving of the filename of the current .gmi file, without its extension diff --git a/html/header.html b/html/header.html index 27de878..215f57c 100644 --- a/html/header.html +++ b/html/header.html @@ -64,6 +64,10 @@ content: "### "; } + h4::before { + content: "#### "; + } + blockquote::before { content: "> "; }