SPACE.LA
◀ music select
schlop / company / shipped

tish-dark-matter

Frontmatter for tish and js

BPM
174
GRADE
SS
LEVEL
6
RELEASES
1
YEARS
2026–2026

Frontmatter, Parsed Twice

On May 6, 2026 I needed to read frontmatter out of markdown from tish. The usual answer is gray-matter, which is JavaScript with a dependency tree. So I wrote my own and published it to npm the same day, and a good part of that day went to the publish pipeline instead of the parser.

@schlopai/tish-dark-matter is gray-matter compatible on purpose: same matter(string, options) call, YAML, TOML and JSON blocks. The difference is that the default engines are written in tish and compiled to JavaScript for the JS entry point. One implementation, two runtimes, and no runtime npm dependencies. It ships as both a JS library and native .tish code.

It doesn't do full YAML 1.2. It handles flat key-value pairs, quoted and plain strings, booleans, null, numbers and comments, but not anchors or block scalars. That covers the frontmatter I actually needed to read.

before this

history

  1. v1.0.1
  2. 1.0.1