diff --git a/.run/10_generate_sidebar.sh b/.run/10_generate_sidebar.sh index f27d690..829b3c0 100644 --- a/.run/10_generate_sidebar.sh +++ b/.run/10_generate_sidebar.sh @@ -32,9 +32,11 @@ generate_sidebar() { if [[ -z "$title" ]]; then title=$(basename "$dir_path") fi - # Remove any double slashes from the path + # Remove any double slashes from the path and add leading slash for absolute path local clean_path clean_path=$(echo "$dir_path/" | sed 's://:/:g') + clean_path="/${clean_path}" # Add leading slash for absolute path + echo "$indent* [$title]($clean_path)" >> "$SIDEBAR_FILE" echo "Added: $clean_path with title '$title'" @@ -92,6 +94,7 @@ generate_readme_in_subfolders() { local clean_subdir_path clean_subdir_path=$(echo "$subdir" | sed 's://:/:g') + clean_subdir_path="/${clean_subdir_path}" # Add leading slash for absolute path new_content+="* [$subdir_title]($clean_subdir_path)\n" echo "Generated link for $clean_subdir_path with title '$subdir_title'" diff --git a/_sidebar.md b/_sidebar.md index 790bd05..0c02fe2 100644 --- a/_sidebar.md +++ b/_sidebar.md @@ -1,16 +1,16 @@ -* [Activités](activites/) - * [Sortie Mutek ](activites/1_sortie_mutek/) - * [Présenter l'œuvres multimédia](activites/2_corpus_multimedia/) -* [Contenus](contenus/) - * [Docsify](contenus/docsify/) - * [GIT](contenus/git/) - * [Github](contenus/github/) - * [Publication de Pages GitHub](contenus/github/pages/) - * [Intégration Continue](contenus/github/scriptCI/) - * [Markdown](contenus/markdown/) - * [vscode.dev](contenus/vscodeDev/) -* [Cours ](cours/) -* [Description institutionelle](di/) -* [Évaluations](evaluations/) -* [Médiagraphie](mediagraphie/) -* [PIEA](piea/) +* [Activités](/activites/) + * [Sortie Mutek ](/activites/1_sortie_mutek/) + * [Présenter l'œuvres multimédia](/activites/2_corpus_multimedia/) +* [Contenus](/contenus/) + * [Docsify](/contenus/docsify/) + * [GIT](/contenus/git/) + * [Github](/contenus/github/) + * [Publication de Pages GitHub](/contenus/github/pages/) + * [Intégration Continue](/contenus/github/scriptCI/) + * [Markdown](/contenus/markdown/) + * [vscode.dev](/contenus/vscodeDev/) +* [Cours ](/cours/) +* [Description institutionelle](/di/) +* [Évaluations](/evaluations/) +* [Médiagraphie](/mediagraphie/) +* [PIEA](/piea/) diff --git a/index.html b/index.html index fefae54..c42cfdf 100644 --- a/index.html +++ b/index.html @@ -46,8 +46,9 @@ repo: 'https://github.com/tim-montmorency/582523-gestion', auto2top: true, - loadSidebar: true, // Enable sidebar loading - subMaxLevel: 4, // Adjust the level to include in TOC + loadSidebar: true, // Enable sidebar loading + subMaxLevel: 4, // Adjust the level to include in TOC + relativePath: true, // relative path enable copyCode: { buttonText: '📄', errorText: '⚠️',