-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Next Page Always Shows First Page #3031
Comments
Are those links in sidebar working? Can you share a minimal version of this via https://vitepress.new ? |
Links in the sidebar are indeed working. I'm not sure how to boil down the implementation to something more minimal in this context. The site is fairly small and can be found here: https://github.com/shellscape/jsx-email/tree/main/apps/web |
me too |
I faced this not too long ago, the only way I found to make it work was to create a base url and then set all links relative to that. Here's an example: sidebar: {
"/docs/options": {
base: "/docs/options",
items: [
{
text: "Example 1",
collapsed: false,
items: [
{ text: "First page", link: "/" }, // equivalent file /docs/options/index.md
{ text: "Second page", link: "/two" }, // equivalent file /docs/options/two.md
{ text: "Third page", link: "/three" }, // equivalent file /docs/options/three.md
],
},
],
},
}, |
I'm having the exact same issue. I'm new to VitePress, and just following along with the examples, so I have no clue why this isn't working. |
Yep, same issue here example: https://stackblitz.com/edit/vite-yzovsb |
@bukowa In that example you've extra trailing slash. Remove them, it'll work fine: |
this is broking next page navigation see vuejs/vitepress#3031 (comment)
@brc-dd Thank you it works but I just created another example with sub folder where this is broken: https://stackblitz.com/edit/vite-yzovsb |
Oh ok lol thanks again. Confusing really |
Here is an example: https://stackblitz.com/edit/vite-atxxax?file=docs%2F.vitepress%2Fconfig.ts The |
@lepture Like I said earlier, there should be proper leading/trailing slashes. Read my earlier comments. Add proper slashes to your example, it will work fine: |
@brc-dd thanks, you are correct. |
I have the same issue. |
help |
Describe the bug
I cannot for the life of me get the
Next Page
button to show anything but the first page (in this caseIntroduction
) I know there are several issues that have been closed about this same topic, but their resolutions are all to use absolute URLs, which I am. Below is my configuration and what the shape of the sidebar settings looks like:Reproduction
And the sidebar:
Expected behavior
Following advice in other issues, I would have expected that using absolute urls in
link
would produce a behavior where the Next Page button would indeed show the name and url of the next page in the sidebar.System Info
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: