diff --git a/README.md b/README.md index c0aa454..c8c5e1c 100644 --- a/README.md +++ b/README.md @@ -30,3 +30,8 @@ put your files in the "content" folder or ``` ./genlog.sh /path/to/your/choosen/folder ``` + +or + +you can optionally add a text at the end of the HTML page title +```./genlog.sh /path/to/your/choosen/folder "Your custom title"``` diff --git a/genlog.sh b/genlog.sh index 7f8c80a..0b09ba9 100755 --- a/genlog.sh +++ b/genlog.sh @@ -25,7 +25,7 @@ find "$source_path" -wholename "*.gmi" -type f | while read -r gmi_file do # récupérer la 1ère ligne du fichier .gmi et remplacer "# " par "" - title="$(sed -n '1{s/# //p}' "$gmi_file")" + title="$(sed -n '1{s/# //p}' "$gmi_file") $2" # dans le header.html, remplacer "<\-- TITLE -->" par le titre récupéré # puis enregistrer le fichier ainsi modifié dans "temp/header.html"