wintercms / docs

The Winter CMS documentation
https://wintercms.com/docs
Creative Commons Attribution 4.0 International
37 stars 69 forks source link

In content shortcuts anchors broken #162

Open damsfx opened 11 months ago

damsfx commented 11 months ago

On some docs pages, in text columned-list shortcuts don't work.
The three pages where I find the issue for now :

https://wintercms.com/docs/v1.2/docs/services/helpers top shortcuts https://wintercms.com/docs/v1.2/docs/services/validation#available-validation-rules https://wintercms.com/docs/v1.2/docs/services/collections#available-methods

For the Helpers top shortcuts, anchors need to be updated to remove "_".

For Validation (available validation rules) and Collections (available methods), the corresponding anchors doesn't exists in the rendered page.

LukeTowers commented 11 months ago

Can we just manually update them for now on the develop branch?

damsfx commented 4 months ago

@LukeTowers Is somebody working on this? This drive me crazy ...

LukeTowers commented 4 months ago

@bennothommo ping

LukeTowers commented 2 months ago

@damsfx the helpers page appears to be fixed now, do you want to submit a PR for the other ones?

bennothommo commented 2 months ago

@LukeTowers I was going to fix the validation and collection ones at the same time, the problem though was that anchoring the rules/commands in those pages results in every validation rule / collection method appearing in the Table of Contents (anchors must be a H2 or H3). I wasn't sure if that was gonna be acceptable or not, so I left it.

damsfx commented 2 months ago

@LukeTowers I wanted to do it ... but I'm having trouble setting up the documentation locally to test my changes. Can you or @bennothommo give me some pointers on how to get a working copy of the local documentation? I alaways fall back in a Failed to open directory: No such file or directory error.

@bennothommo I had the same thought as you when I looked at the documentation plugin code. I even wondered whether it wouldn't be preferable for these pages to have their own title anchors in a H4 heading rather than polluting the TOC. But in this case it result in a markdown content having HTML.

LukeTowers commented 2 months ago

@bennothommo @damsfx I'm fine with the TOC being made bigger on those pages, eventually we'll reorganize the docs to have more pages with less content on each page so it's easier to find information by browsing around, but for now having them in the TOC should be fine. If necessary it would be nice if they could be collapsible, but that's not a hard requirement.