Markdown Block

Which Markdown specification is used in Pushword — CommonMark, GFM, or something else?

The default Markdown implementation in Pushword is based on CommonMark, with a few customizations designed to make it easy to switch between Markdown and a WYSIWYG block editor.

For users

The difference is almost invisible — your usual Markdown syntax will continue to work as expected.

For developers

Markdown content is parsed block by block, rather than as a single document.Blocks are separated by two blank lines.

Attributes can be defined using the syntax {#attribute-name}, placed on a separate line just before the Markdown block it applies to. This is conflicting with Prettier Markdown.

Advanced content types such as galleries, attachments, or page lists are supported through Twig functions.

You can use twig syntax inside markdown inline code or markdown code block, it will not be parsed by twig. If you want to use twig inside inline code or code block, use html directly (<pre></pre>).

Example

{#example-content}

## Example Content

{#mainParagraph}
This is a paragraph.

{#mainGallery}
{{ gallery({'piedweb-logo.png': '', '1.jpg': '', '2.jpg': '', '3.jpg': ''})|unprose }}