You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Make section wrapping built-in and handled by the markdown renderer. #672
<!-- Content with Table of Contents Module -->
{% capture content_with_toc %}
## title one
A bunch of markdown here...
{% endcapture %}
{% include modules/column-w-toc.liquid
id: "getting-started"
content: content_with_toc
%}
<!-- END: Content with Table of Contents --><!-- Single Column Body Module -->
{% capture content %}
## title two
A bunch of more markdown here...
{% endcapture %}
{% include modules/one-column.liquid
id: "mozilla-developer-network"
content: content
%}
<!-- END: Single Column Body Module -->
These templates are essentially just wrapping those heading levels in section elements (plus a bunch of other markup to control the grid)
It should be possible assuming this is a common convention to have a custom markdown plugin automatically handle this essentially wrapping everything under that current heading level with markup.
That would then mean the markup required for the doc would end-up being:
## title one
A bunch of markdown here...
## title two
A bunch of more markdown here...
The goal with this approach is to remove the need for the document author to worry about the implementation details and focus on just writing good markdown documentation.
Activity
muffinresearch commentedon Jul 30, 2020
A plugin prototype is here: https://github.com/mozilla/markdown-it-heading-wrapper/