You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, where a directory contains an index.mdx file, Mosaic will ensure that the corresponding URL ends in index. For example:
Source: foo/bar/index.mdx
URL: https://example.com/foo/bar/index
Requests to the URL https://example.com/foo/bar will be redirected to the corresponding https://example.com/foo/bar/index URL.
It would be nice if there was an option to change the behaviour so that it becomes:
Source: foo/bar/index.mdx
URL: https://example.com/foo/bar
https://example.com/foo/bar/index would be a permanent redirect to https://example.com/foo/bar
This is the behaviour we would like for the Salt site as:
We get more succinct URLs (easier to read, share verbally, guess, etc.)
It's more inline with how out-of-the-box Next.js behaves and indeed many other site generation tools where index.md|html|whatever files tend to be served up at URLs whose path omits the index part.
I suggest that this becomes an opt-in option though (perhaps via mosaic.config.js?), so that other Mosaic-based sites don't suddenly have all their URLs change upon upgrading.
Note that the non-index-suffixed URLs would also need to be reflected in any auto-generated links for site navigation, breadcrumbs, etc.
The text was updated successfully, but these errors were encountered:
Currently, where a directory contains an
index.mdx
file, Mosaic will ensure that the corresponding URL ends inindex
. For example:foo/bar/index.mdx
https://example.com/foo/bar/index
Requests to the URL
https://example.com/foo/bar
will be redirected to the correspondinghttps://example.com/foo/bar/index
URL.It would be nice if there was an option to change the behaviour so that it becomes:
foo/bar/index.mdx
https://example.com/foo/bar
https://example.com/foo/bar/index
would be a permanent redirect tohttps://example.com/foo/bar
This is the behaviour we would like for the Salt site as:
index.md|html|whatever
files tend to be served up at URLs whose path omits theindex
part.I suggest that this becomes an opt-in option though (perhaps via
mosaic.config.js
?), so that other Mosaic-based sites don't suddenly have all their URLs change upon upgrading.Note that the non-index-suffixed URLs would also need to be reflected in any auto-generated links for site navigation, breadcrumbs, etc.
The text was updated successfully, but these errors were encountered: