DocumenterVitepress.jl
DocumenterVitepress.jl copied to clipboard
"Next page" link on homepage points to index which is homepage
This issue is visible at the bottom of https://chairmarks.lilithhafner.com/v1.1.2/. The "Next page: Home" button links to https://chairmarks.lilithhafner.com/v1.1.2/index which redirects to https://chairmarks.lilithhafner.com/v1.1.2/.
Bump, a user of Chairmarks has found this issue as well :)
I would not say that is a bug per se, rather a config setup convention. In vitepress, the root index.md is used for the landing page, which only contains the top nav menu, the sidebar menu is for content other than that.
Setting the following at the top of your index.md file should give you the expected behaviour.
```@raw html
---
layout: home
---
```
ok, looking back again at vitepress, in config.mts we can do:
sidebar: [
{ text: 'Home', link: '/' }, // note that it should be the root `/` instead of `index.md`.
{ text: 'Why use Chairmarks?', link: '/why' },
{ text: 'Tutorial', link: '/tutorial' },
{ text: 'How To', collapsed: false, items: [
{ text: 'migrate from BenchmarkTools', link: '/migration' },
{ text: 'install Chairmarks ergonomically', link: '/autoload' },
{ text: 'perform automated regression testing on a package', link: '/regressions' }]
},
{ text: 'Reference', link: '/reference' },
{ text: 'Explanations', link: '/explanations' }
]
and this will get the proper navigation links, no need for layout: home. Unfortunately, using the page keyword in make.jl is not supported:
[ Info: SetupBuildDirectory: setting up build directory.
ERROR: '/' is not an existing page!
will need to investigate more for a Documenter/DVpress solution. But a pure vitepress solution is already possible.