-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: set
trailingSlash: false
to fix refresh issues on GitHub pages
Signed-off-by: Haoqun Jiang <[email protected]> It's said (and as I tested) that if GitHub Pages detects the URL points to a directory on the server, it would add a trailing slash to the URL on refreshing. <https://stackoverflow.com/a/33271505/2302258> Per [Docusaurus's default configuration](https://docusaurus.io/docs/api/docusaurus-config#trailingSlash), `docs/getting-started/overview.mdx` would emit `docs/getting-started/overview/index.html`, therefore GitHub Pages would take `docs/getting-started/overview/` as the canonical URL. But the relative links in the document would not be touched by default, so `./alternatives` remains `./alternatives`, which is `docs/getting-started/alternatives` in the original web page, and `docs/getting-started/overview/alternatives` after refreshing. The latter would be a 404 page. To fix this, we have to enforce a `trailingSlash` style. `trailingSlash: true` requires fixing quite a few links across the docs, so I chose `trailingSlash: false` to keep as many links untouched as possible.
- Loading branch information
1 parent
36948dd
commit 65b585e
Showing
5 changed files
with
8 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Packages | ||
|
||
- [`@stricli/core`](./core) | ||
- [`@stricli/auto-complete`](./auto-complete) | ||
- [`@stricli/core`](./core/index.md) | ||
- [`@stricli/auto-complete`](./auto-complete/index.md) |