hugosoucycc

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

commit 003bc9075fea1693cd88995a8cce618b21616ad4
parent 275370b76f0388cc3db6d3dddc7577f21c15ba20
Author: Hugo Soucy <hugo.soucy@savoirfairelinux.com>
Date:   Wed,  7 Jun 2017 08:46:05 -0400

Add the var `$page_title`

Diffstat:
Mfunctions/create-html-sections | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/functions/create-html-sections b/functions/create-html-sections @@ -16,9 +16,10 @@ create_html_sections () { # For each section page create a temporary "includes" folder mkdir -p "$TMP_PATH/$(basename "$indexsubdir")" + local page_title="$title" local tmp_folder="$TMP_PATH/$(basename "$indexsubdir")" - # Convert markdown to html + # Convert markdown to html local main_content=$(make_html_from_md "$indexsubdir/index.md") # For all markdown files that are not "index.md" @@ -48,7 +49,7 @@ create_html_sections () { # Create symlinks for images in section's landing page for img in $(find "$indexsubdir/" -type f \( -name "*.jpg" -or -name "*.png" \)); do - rel_img_path=${img#$indexsubdir} + rel_img_path=${img#$indexsubdir} $(ln -s -f "$rel_img_path" "$indexsubdir") done