Open shellscape opened 1 year ago
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:
@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
The second link doesn't have trailing slash 🫠
/foo/index.md -> /foo/ /foo/bar.md -> /foo/bar /baz.md -> /baz
The second link doesn't have trailing slash 🫠
Oh ok lol thanks again. Confusing really
Here is an example: https://stackblitz.com/edit/vite-atxxax?file=docs%2F.vitepress%2Fconfig.ts
The Get Started
page will have Server Side
as next page, but all other pages will have Get Started
as next page.
@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