Skip to content

Commit

Permalink
activer relative path
Browse files Browse the repository at this point in the history
  • Loading branch information
gllmAR committed Sep 12, 2024
1 parent 157d47f commit f799508
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 19 deletions.
5 changes: 4 additions & 1 deletion .run/10_generate_sidebar.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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'"

Expand Down Expand Up @@ -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'"
Expand Down
32 changes: 16 additions & 16 deletions _sidebar.md
Original file line number Diff line number Diff line change
@@ -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/)
5 changes: 3 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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: '⚠️',
Expand Down

0 comments on commit f799508

Please sign in to comment.