On this page ▾
Formatting
slide-ng format [slides.md]
Rewrites the file with the same parser that reads it. Slide by slide it:
- trims blank lines around the content, leaving one blank line after the frontmatter and before the next
--- - prints the frontmatter again as clean YAML, keeping comments
- puts the speaker note in an HTML comment at the end
Frontmatter that is not valid YAML stops it with the file, line and slide, and what is wrong in plain words, and the file is left as it is. A frontmatter that lost its closing ---, so that a heading became a YAML comment, gets a warning, and the line is kept. Files that src: imports are not touched. Name them as arguments to format them too. A file that is already tidy is reported as such. The VS Code extension can run it from the editor (first version, not released). There is no Prettier plugin.