Documentation
¶
Overview ¶
Package frontmatter detects and extracts YAML frontmatter from markdown sources and renders it as an HTML table.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Extract ¶
Extract splits src into (frontmatterBytes, bodyBytes, found).
found is true only when:
- src starts with exactly "---\n" or "---\r\n" at byte offset 0
- a closing "---" appears on its own line before EOF
- the bytes between the delimiters parse as valid YAML
When found is false, bodyBytes == src (full content unchanged, no copy). When found is true, bodyBytes is the content after the closing delimiter line.
func RenderTable ¶
RenderTable renders parsed YAML frontmatter bytes as an HTML table. Top-level keys appear in document order. Nested values are rendered as their string representation. All values are HTML-escaped.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.