diff --git a/src/articles/cheat-sheets/Markdown_cheat_sheet.md b/src/articles/cheat_sheets/Markdown_cheat_sheet.md similarity index 100% rename from src/articles/cheat-sheets/Markdown_cheat_sheet.md rename to src/articles/cheat_sheets/Markdown_cheat_sheet.md diff --git a/src/articles/cheat-sheets/index.md b/src/articles/cheat_sheets/index.md similarity index 74% rename from src/articles/cheat-sheets/index.md rename to src/articles/cheat_sheets/index.md index cb4dacd..95138f4 100644 --- a/src/articles/cheat-sheets/index.md +++ b/src/articles/cheat_sheets/index.md @@ -5,4 +5,4 @@ If you add an `index.md` into a directory, it will become a part of the breadcru Use it as overview for subpages of that directory: -- [Markdown cheat sheet](cheat-sheets/Markdown_cheat_sheet) - shows the markdown syntax. +- [Markdown cheat sheet](cheat_sheets/Markdown_cheat_sheet) - shows the markdown syntax. diff --git a/src/articles/index.md b/src/articles/index.md index 82af569..ec4eb42 100644 --- a/src/articles/index.md +++ b/src/articles/index.md @@ -6,7 +6,10 @@ Place the content of your *slim wiki* into this directory. Write it using Use the main page as overview and add links to subpages: -- [Cheat Sheets](cheat-sheets) - You can add links to directories having a `index.md`. -- [Markdown cheat sheet](cheat-sheets/Markdown_cheat_sheet) - Or add direct a link to a markdown file. +- [Cheat Sheets](cheat_sheets) - You can add links to directories having a `index.md`. +- [Markdown cheat sheet](cheat_sheets/Markdown_cheat_sheet) - Or add direct a link to a markdown file. -**Note:** The `.md` extension is optional when linking to markdown files. +**Notes:** + +- The extension `.md` is optional when linking to markdown files. +- Underscores in directory or file names are shown as spaces in the breadcrumbs. So if you name your file `My_new_page.md`, it will be shown as `My new page`. diff --git a/src/server/logic/Main.php b/src/server/logic/Main.php index cd4c0df..6f0dfd4 100644 --- a/src/server/logic/Main.php +++ b/src/server/logic/Main.php @@ -56,7 +56,10 @@ class Main { if ($isLast || file_exists($articleBaseDir . $currentPath . '/index.md')) { // This is the requested file or an directory having an index -> Add it - $breadcrumbArray[] = array('name' => $pathPart, 'path' => urlencode($currentPath), 'active' => $isLast); + $breadcrumbArray[] = array( + 'name' => str_replace('_', ' ', $pathPart), + 'path' => urlencode($currentPath), + 'active' => $isLast); } }