3 ms·
This is so close for what I am want. However, why are you using Liquid block elements {% section %} And not something more writer friendly and MarkDown-s
by leejoramo 10y ago
This is so close for what I am want. However, why are you using Liquid block elements
{% section %}
And not something more writer friendly and MarkDown-style such as CommonMark's container blocks
::: section
This builds on the commonly used pattern of code blocks that markdown writers know and editing apps will hopefully eventually directly support
http://spec.commonmark.org/0.26/#container-blocks-and-leaf-blocks http://spec.commonmark.org/0.26/#container-blocks-and-leaf-b...
- Ajedi32 10y agoI'm not sure where you're getting that `::: section` syntax from. It doesn't appear anywhere in the CommonMark spec. Container blocks in Markdown are just things like blockquotes and list items...
- leejoramo 10y agoLook like you are correct. I had thought the `::: section` syntax was a recommended approach (if not yet part of the formal spec). In the past, I have used various home grown solutions to this, but recently I have been using markdown-it and the accompanying plying markdown-it-container. On the CommonMark forums, I see that the ::: syntax is a leading contender, but that CommonMark itself will not address extensions to basic markdown until after the spec reaches 1.0 https://github.com/markdown-it/markdown-it-container https://github.com/markdown-it/markdown-it-container
- toddmorey 10y agoThere's a markdown-it plugin that implements container blocks as described: https://github.com/markdown-it/markdown-it-container https://github.com/markdown-it/markdown-it-container Not an official part of the spec, but certainly something this CMS could support since you'd just parse the markdown it saves with whatever parser you choose with your static generator.