Configure no trailing slash in URLs? #6332
Replies: 2 comments
-
I am not aware of such an option. There have been a bunch of discussions about the trailing slash over at MkDocs. It seems the trailing slashes used to be necessary for the live reload server to work but this may have changed? The server still sends a redirect to the version with a slash at the end, though. So does my own fairly vanilla Nginx install but that should be configurable. The question remains whether the links produced by MkDocs/Material could be produced without the slash. If you care enough, you could write a hook that uses the on_post_page event to rewrite URLs. Having said this, it strikes me that you did not say what the reason is to get rid of the slashes? |
Beta Was this translation helpful? Give feedback.
-
In my opinion, URL's without the trailing-slash simply look better. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Is there are a way to configure URL's to have no trailing slash?
I know directories are used and
index.html
is loaded from the directory, but I can make the necessary web server config for this to work.I use Jekyll in other projects and I can configure no trailing slash in URL's.
Is there a way to do this with MkDocs?
Beta Was this translation helpful? Give feedback.
All reactions