Access4all / adg

Accessibility Developer Guide
http://www.accessibility-developer-guide.com
Other
183 stars 34 forks source link

Manually insert ToC #356

Closed backflip closed 2 years ago

backflip commented 3 years ago

With this change, the table of contents is no longer inserted automatically but rather via manually adding [[toc]] placeholder wherever needed.

UPDATE: See below, the default placeholder is now [[_TOC_]].

backflip commented 3 years ago

@renestalder, is the default [[toc]] placeholder a good solution or do you know of a better one?

christophdubach commented 2 years ago

Works as expected, so for me it’s ready to get merged. But there’s still the question if the placeholder [[toc]] is okay ...

backflip commented 2 years ago

@renestalder, unless you intervene we are going to merge this. Changing the placeholder should be easy at any point in time.

renestalder commented 2 years ago

@backflip Sorry, I missed that PR.

Interesting enough, I thought there would be some standard around the table of content syntax in Markdown, but yeah, there isn't and my research only resulted in one markdown flavoured addition, the one from GitLab. GitLab uses [[_TOC_]] or [TOC].

Most other tools insert table of contents automatically and mark the start and end of them with code comments.

So, well, actually I have no points to bring up any more regarding the exact placeholder to use.

Should we add something to the readme/contributor guidelines regarding this "non-standard" placeholder?

backflip commented 2 years ago

@renestalder, thanks a bunch! I have replaced the [[toc]] with [[_TOC_]] as the plugin already supports that out of the box, too. And as Gitlab is using and documenting it, I'd say this is the closest we get to a "standard".

I have added a sentence to CONTRIBUTING.md, too, thanks for the hint!