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
As a folder structure of docs/2023/08. As you can see, it's just a calendar notation. However, while isCategoryIndex disables the sidebar behavior of overriding 'August 8th' to August, it still creates the URL for 2023/08.
If because category index pages are not coupled to the slug system and we'd better not give users the impression that they are, would there be an exposed function for isSlugIndex or so? I am generating many pages (thousands) and want as minimum information as possible.
Yes, solving your use-case would be quite complicated. And a breaking change too (it's always quite risky for our users to change the permalink generation algo).
Currently the process is:
Read docs files, generate metadata including a permalink for each
Generate the autogenerated sidebar from those docs
Providing an explicit slug remains an option, although not as convenient.
And createFrontMatter would also give you the ability to generate with code your own slug front matter.
Another option would allow to allow providing a isCategoryIndex callback as a first-class docs plugin option, and default to the current behavior. This would be the default isCategoryIndex that is passed as param to the defaultSidebarItemsGenerator. Once we have createFrontMatter, I'm not sure it would be a super useful option.
Have you read the Contributing Guidelines on issues?
Prerequisites
npm run clear
oryarn clear
command.rm -rf node_modules yarn.lock package-lock.json
and re-installing packages.Description
I have set up
for my docusaurus.config.js. And I have a folder structure of
As a folder structure of
docs/2023/08
. As you can see, it's just a calendar notation. However, whileisCategoryIndex
disables the sidebar behavior of overriding 'August 8th' to August, it still creates the URL for2023/08
.Reproducible demo
https://github.com/anaclumos/heimdall/tree/da910b28b2ae2d6ecf77225db38035e57cdaa637 (Exact Commit)
Steps to reproduce
https://github.com/anaclumos/heimdall/tree/da910b28b2ae2d6ecf77225db38035e57cdaa637 (Exact Commit)
Expected behavior
The URL for
docs/2023/08/08.md
should be generated atsitename/2023/08/08
, notsitename/2023/08
Actual behavior
The URL generates at
sitename/2023/08
Your environment
No response
Self-service
The text was updated successfully, but these errors were encountered: