仓库指标
- Star
- (11,091 star)
- PR 合并指标
- (PR 指标待抓取)
描述
I'll probably look at building it out myself, but wanted to make a record of the idea just in case someone beats me to it.
Basically, the idea is that anytime in your component docs that you use a header (ex: ## Blah) it would auto add anchor id's to it so you could ref it in the url. This is a similar concept to what GitHub auto does for .md files. For example, I can link to https://github.com/styleguidist/react-styleguidist#usage and it will auto scroll to the Usage header in that .md file.
To expand, if you had a header in the Button component docs, you could link to it to like https://react-styleguidist.js.org/examples/basic/#!/Button#example4 or something similar without going into isolation mode, but still linking to that part of the page in the doc.
We could also look at doing some fancy styling like GitHub has that shows an icon (on hover) of headers to get that url:

What is everyone's thoughts on this? Do you all think it would be worth having this feature? Would it conflict with the current routing at all, by any chance?