Using pre-processed script
There's also a pre-processing stage being performed before the HTML page is generated. You can embed script to be executed during the pre-processing stage between double braces {{ and }}. Outputting Markdown from pre-processed script is done by embedding the text between double brackets [[ and ]] inside the pre-processed script. Script to be executed inside Markdown text inside pre-processed script is embedded between double parenthesis (( and )).
The results of pre-processed script can change the structure of the document. It is assumed that the result will be output in string format. The result will be inserted in the in-memory text representation of the Markdown document, before the Markdown itself is parsed. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access