johno / johno/gatsby-theme-documentation
Using pathPrefix creates wrong hyperlinks in sidebar
- Dominant language
- JavaScript
- Stars
- 134
- Forks
- 17
- PR merge metrics
- No merged PRs in 30d
Description
### Steps to reproduce
1. Add `pathPrefix` config to `gatsby-config.js`
2. Build using `gatsby build --prefix-paths` ([Gatsby docs](https://www.gatsbyjs.org/docs/path-prefix/))
### Expected behavior
Paths should have the path prefix added once.
e.g. `/endpoints` would become `/my-path/endpoints` after build.
### Actual behavior
For assets and links inside `.mdx` pages inside `/docs` the path is added once, but for links created in `sidebar.mdx` the path is added twice.
Actual result: `/my-path/my-path/endpoints`
### Actual generated example
`src/gatsby-theme-documentation/sidebar.mdx`
```html
```
### `gatsby-config.js`
```js
module.exports = {
siteMetadata: {
title: 'API Documentation',
description: 'Docs for API',
},
plugins: [
'gatsby-theme-documentation',
],
pathPrefix: 'my-path',
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.