mirror of
https://github.com/til-schneider/slim-wiki.git
synced 2025-01-17 04:38:24 +01:00
Fixed: Links to directories are now working with or without a trailing /
This commit is contained in:
parent
127b3bb03a
commit
efa639d6cf
@ -177,8 +177,8 @@ class Main {
|
||||
$articleFilename = implode('/', $requestPathArray);
|
||||
|
||||
// Support `index.md` for directories
|
||||
if ($articleFilename == '' || substr($articleFilename, -1) == '/') {
|
||||
$articleFilename = $articleFilename . 'index.md';
|
||||
if (is_dir($articleBaseDir . $articleFilename) || substr($articleFilename, -1) == '/') {
|
||||
$articleFilename = rtrim($articleFilename, '/') . '/index.md';
|
||||
}
|
||||
|
||||
// Make the extension `.md` optional
|
||||
|
Loading…
x
Reference in New Issue
Block a user