vuejs / vitepress

Vite & Vue powered static site generator.
https://vitepress.dev
MIT License
11.48k stars 1.86k forks source link

previous / next error #3703

Closed moominka closed 1 month ago

moominka commented 1 month ago

Describe the bug

all but one prev / next links ok (defined in config.mts)

Reproduction

        { text: "A", link: "/blah/page-0" },
        { text: "B", link: "/blah/page-1" },
        { text: "C", link: "blah/page-2" },
        { text: "D", link: "/blah/page-3" },
        { text: "E", link: "/blah/page-4" },

Expected behavior

all link forwards and backwards, but if missing prepended / then only page 0,1,3,4 have correct next/prev linkages

the missing prepended / in config for

blah/page-2

means loading this page will produce only

next page -> /blah/page-0

System Info

irrelevant

Additional context

n/a

Validations

brc-dd commented 1 month ago

Not a bug. Garbage in, garbage out.

moominka commented 1 month ago

true!

the reason I filled it was that regardless of whether a relative link is used in the sidebar or not, the link is to the correct document location

    { text: "B", link: "/blah/page-2" },

-> //example.org/blah/page-2

    { text: "C", link: "blah/page-2" },

-> //example.org/blah/page-2

but the next / previous behaviour changes

It felt worth documenting in case someone else was scratching their head looking for their ‘picnic’ error.

Thank you for your work and prompt reply, much appreciated.