nextra
nextra copied to clipboard
Rename configurations
I'm working on the docs and noticed some option names that can be improved for better consistency and accuracy. This will be another breaking change for v2, hopefully the last one.
- [ ]
banner.text
→banner.content
- [ ]
footer.text
→footer.content
- [ ]
editLink.text
→editLink.content
- [x]
feedback.link
→feedback.content
- [x]
bodyExtraContent
→main.extraContent
(in the future we can configure the main content area here) - [ ]
i18n.text
→i18n.name
- [x]
projectChat
→chat
- [x]
github
→ removed, useproject.link
unstable_faviconGlyph
Should be renamed too
I think all the unstable_
can be removed since we've tested them for so long.
Is there a way to completely disable editLink?
If I remove the param, the link still shows as "Edit this page" and leads to the Nextra repo (apparently, it's the default value)
editLink: { component: null }
Thanks you very much!
Btw, you may consider shrinking space for lists.
If, say,
- I start
- with a numbered list 2.1 and then want to include a sublist 2.2 the sublist is separated by a huge line that is higher than a normal one
Same for an introductory sentence and a list following it.
Same for separating lines in callouts in general.
See the screenshots:
You may also want to introduce routing to the 404 page.
For example, adding a link "Go to the main page"/"Return to the main page" below the 404 message. That would improve user experience by tonnes, since otherwise the user doesn't have any means of navigating from the 404 page within the web app, but only through the address bar and the browser arrows.
![image](https://user-images.githubusercontent.com/22454517/192365872-e90b803e-a500-47d8-8b38-df50c1d2e0c6.png)
You may also want to introduce routing to the 404 page.
For example, adding a link "Go to the main page"/"Return to the main page" below the 404 message. That would improve user experience by tonnes, since otherwise the user doesn't have any means of navigating from the 404 page within the web app, but only through the address bar and the browser arrows.
![]()
It’s already introduced but not documented yet :), thanks for the catch!
@raproid
Btw, you may consider shrinking space for lists.
Yeah would love to fix that, could you open a new issue for that? Unrelated to this one.
https://github.com/shuding/nextra/blob/core/examples/swr-site/pages/404.mdx https://github.com/shuding/nextra/blob/core/examples/swr-site/pages/_meta.en-US.json
@B2o5T Thank you!
@shuding @B2o5T is there a way to make a page available directly by the URL but not list it in the sidebar menu?
@shuding @B2o5T sorry to be a bother, but is there a way to make a page available directly by the URL but not list it in the sidebar menu? I'm really interested in this feature.
@raproid could you describe more? Don't understand your question
@B2o5T I’m speaking about hiding a page from the sidebar menu. Eg, Docusaurus, which I used before, would generate pages from every .md file in the source folder “docs” but I’d have to include them into the sidebar.js by hand for them to appear in the left sidebar navigation menu. If I didn’t, I’d be able to access the page directly by the URL, but it would be invisible for anybody who uses the left sidebar menu for navigation.
It is nice for some content you want to expose only by the link to a specific audience.
@B2o5T makes sense?
@raproid try this https://github.com/shuding/nextra/blob/a04c128c240fdc1fd43f8f1bb6961a0eb99872eb/examples/swr-site/pages/_meta.en-US.json#L5
@B2o5T it is working!!! Thank you very much!
For those who are new like me, you need to change the following in the theme.config.js
file
{
bodyExtraContent: ''
}
to
{
main: {
extraContent: '',
}
}