`href` is missing in the section heading
See original GitHub issueCurrent behavior
There is no href for headings, and there are warnings:
Warning: Failed prop type: The prop `href` is marked as required in `SectionHeadingRenderer`, but its value is `undefined`.
<!-- the current output html for the heading -->
<h1 id="components" class="rsg--heading-14 rsg--heading1-15">
<a class="rsg--sectionName-11">Components</a>
</h1>
To reproduce
mkdir no-heading-href-repro
cd no-heading-href-repro
yarn init -y
yarn add vue vue-loader vue-styleguidist vue-template-compiler webpack
echo '
const path = require("path");
const { VueLoaderPlugin } = require("vue-loader");
module.exports = {
sections: [
{
name: "Components",
components: path.resolve(__dirname, "./src/components/*.vue"),
},
],
webpackConfig: {
module: { rules: [{ test: /\.vue$/, loader: "vue-loader" }] },
plugins: [new VueLoaderPlugin()],
},
};
' > styleguide.config.js
mkdir -p src/components
echo '
<template>
<div>Foo</div>
</template>
<script>
export default {
name: "Foo",
};
</script>
' > src/components/Foo.vue
yarn vue-styleguidist server --open
Expected behavior
There should be a href for the heading “Components”.
Environments
- vue-styleguidist: 4.32.2
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Heading level three not appearing as a hyperlink location.
When I try to hyperlink to the section from references within the document, only the top two layers of headings appear. I should...
Read more >Word missing headings in insert hyperlink - Super User
I go to Insert > Link > Place in this document , but my headings didn't appear. (If I place a bookmark, then...
Read more >Links in HTML documents - W3C
This section introduces the link (or hyperlink, or Web link), the basic hypertext construct. A link is a connection from one Web resource...
Read more ><h1>–<h6>: The HTML Section Heading elements
The to HTML elements represent six levels of section headings. is the highest section level and is the lowest.
Read more >Missing base href in header causes problems for relative file ...
I've experienced this with Bluemarine and another PHPTemplate theme. For instance, a node with URL http://example.com/node/3 rewrites relative filename of some.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I will definitely look into it.
Sorry I did not provide the actual usecase, I thought the minimal repro (for the
hrefissue) should be enough, but it seems the minimal repro is not suitable for the case you mentioned above. Here’s the more appropriate repro modified from the initial repro:If I click the “My Heading” in the sidebar, it’ll navigate to the “My Heading” section with url updated (
http://localhost:6060/#/Components/My%20Heading). I thought clicking the section heading should behave the same as clicking the corresponding link in the sidebar, which brings us to the clicked section with the url updated, but the “My Heading” section heading is now a<span>instead of an<a>, is this behavior expected?