hyogen-md

0.10.0

Template Syntax

hyogen.md extends Markdown with HTML-comment directives and Mustache-style expressions. Everything below is available in @b4moss/hyogen-md@0.10.0.

Two layers

LayerWhereWhat you can write
Expressions{{ }} / {{{ }}} in Markdown bodyExpressions only — no statements
Logic blocks<!-- @hg … @endhg --> or <!--@@ … @@-->Declarations, includes, if / each, and more

Topics

Data and output

  • Front matter — YAML metadata and component props
  • Expressions&#123;&#123; &#125;&#125;, defaults, ternary
  • Methods.toLocaleString and allowed calls

Blocks and directives

Safety

Minimal example

---
title: Greeting
---

# {{ title }}

<!--
@hg
const name = "world"
@endhg
-->

Hello {{ name | "stranger" }}!

Rendered:

# Greeting

Hello world!

Try it in the Playground.