Skip to content
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

Prev / Next page in docs is not working as expected #998

Closed
brc-dd opened this issue Sep 19, 2024 · 0 comments
Closed

Prev / Next page in docs is not working as expected #998

brc-dd opened this issue Sep 19, 2024 · 0 comments
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@brc-dd
Copy link

brc-dd commented Sep 19, 2024

It currently shows /installation as next page for all pages:

image

You seem to have file structure like

installation/
  - index.md
props/
  - modes/
    - index.md
...

You'll need to adjust themeConfig.sidebar in your vitepress settings to this (notice trailing slashes):

[
  {
    text: 'Getting Started',
    collapsed: false,
    items: [{ text: 'Installation', link: '/installation/' }],
  },
  {
    text: 'Props',
    collapsed: false,
    items: [
      { text: 'Modes', link: '/props/modes/' },
      { text: 'Modes configuration', link: '/props/modes-configuration/' },
      { text: 'General configuration', link: '/props/general-configuration/' },
      { text: 'Calendar configuration', link: '/props/calendar-configuration/' },
      { text: 'Time picker configuration', link: '/props/time-picker-configuration/' },
      { text: 'Formatting', link: '/props/formatting/' },
      { text: 'Localization', link: '/props/localization/' },
      { text: 'Positioning', link: '/props/positioning/' },
      { text: 'Keyboard', link: '/props/keyboard/' },
      { text: 'Look and feel', link: '/props/look-and-feel/' },
    ],
  },
  {
    text: 'Slots',
    collapsed: true,
    items: [
      { text: 'Components', link: '/slots/components/' },
      { text: 'Content', link: '/slots/content/' },
      { text: 'Trigger and input', link: '/slots/trigger-and-input/' },
      { text: 'Icons', link: '/slots/icons/' },
      { text: 'Overlay', link: '/slots/overlay/' },
    ],
  },
  {
    text: 'Methods and events',
    collapsed: true,
    items: [
      { text: 'Methods', link: '/methods-and-events/methods/' },
      { text: 'Events', link: '/methods-and-events/events/' },
    ],
  },
  {
    text: 'Customization',
    collapsed: true,
    items: [{ text: 'Theming', link: '/customization/theming/' }],
  },
  {
    text: 'Migration guides',
    collapsed: true,
    items: [
      { text: 'Migrating from v8', link: '/migration/from-v8/' },
      { text: 'Migrating from v7', link: '/migration/from-v7/' },
      { text: 'Migrating from v6', link: '/migration/from-v6/' },
      { text: 'Migrating from v5', link: '/migration/from-v5/' },
    ],
  },
]

PS: You probably don't need this structure. If you're keeping things as /foo/index.md instead of just /foo.md to have clean urls like /foo/ instead of /foo.html, you can just enable cleanUrls: true in vitepress config which will remove .html prefix (though you won't get trailing slashes 👀).

@Jasenkoo Jasenkoo added documentation Improvements or additions to documentation bug Something isn't working labels Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants