hugosoucycc

[ARCHIVED] Another old source code of <hugo.soucy.cc>.
Log | Files | Refs | Submodules

commit d7b6ee5168d0da0aefade0bc577e5f71e9ce6703
parent 5894a676c1dbf28492bfc80a715ffbd81cafd9fc
Author: Hugo Soucy <hugo.soucy@savoirfairelinux.com>
Date:   Mon, 26 Jun 2017 10:34:09 -0400

Add canonical URI for section index pages

Diffstat:
Mfunctions/create-html-sections | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/functions/create-html-sections b/functions/create-html-sections @@ -17,7 +17,7 @@ create_html_sections () { mkdir -p "$TMP_PATH/$(basename "$indexsubdir")" # Load the meta file of the subdirectory index - . "${indexsubdir%.*}/index.meta" + . "${indexsubdir%.*}/index.meta" local page_title="$title" local tmp_folder="$TMP_PATH/$(basename "$indexsubdir")" @@ -64,9 +64,12 @@ create_html_sections () { done if test "$(ls -A "$tmp_folder/")"; then + unset -v permalink + # Sort all the includes files # Create an HTML file with all the includes in descending order local list_items=$(cat $(find "$tmp_folder/" -type f -name \*.inc.html | sort -nr)) + local permalink="$BASE_URL/$(basename "$indexsubdir")/" mo "$TPL_MUSTACHE_PATH/${tplname}-index.mustache" > "$indexsubdir/index.html" fi