This is Knap. It's a new language I created that turns data into Markdown. The syntax should feel familiar and comes with wonderfully pleasant features to modify and format plain text.

Knap is open source. Over a million people already use Knap directly or indirectly because it ng language I made for Obsidian Web Clipper. Now any tool can use it.

You can add Knap to your app or use it via CLI. Create a batch of Markdown files from JSON or CSV, or pipe Defuddle directly into Knap to generate Markdown from HTML/URLs.

The Knap site is color-coded to help beginners understand the relationship between variables (blue), filters (orange), and logic (green). I've tried to document it as comprehensively as I can.

Try the Knap Playground so you can see how fun the syntax is to use!

Knap is pronounced /knæp/ (with a hard k). It's named after knapping (with a silent k): the process of shaping stones to form arrowheads, scrapers, and other tools.

Enjoy!

Sep 10, 2026 · 7:08 PM UTC

87
295
4,225
241,620
Replying to @kepano
Knap: a simple template language that turns data into Markdown using logic, variables, and filters.
knap.md
5
5
228
16,216
RepliesRelevant
Replying to @kepano
@kepano You made liquid 👌
2
0
65
4,915
Replying to @tobi
@tobiy much! You solved it twenty years ago and it still feels as ergonomic as ever! Amazing how many templating engines branched off of Liquid.

I spent years making Shopify themes with Liquid and Chyrp themes with Twig (with some brief detours into Mustache, etc), so that familiarity is completely ingrained in me.

Knap is just Liquid tuned for Markdown & YAML instead of HTML. It would not exist without you! 🥹
0
0
97
4,303
Replying to @kepano
@kepano Very nice! Looks just like Ruby “liquid”
1
0
10
2,036
Replying to @rsms
@rsms That's right! You can think of it as Liquid for Markdown.
x.com/kepano/status/…
@SteveCracker3 @obsdmd Knap's syntax is intentionally designed to feel familiar if you've used Twig, Liquid, Jinja, Tera, etc.

But Knap is specifically designed for generating Markdown with frontmatter, so it has many more built-in filters for that purpose and different defaults for whitespace.
0
0
13
2,276
Replying to @kepano
@kepano nice! thinking of ways to use this and seems like it could be helpful for cleaning up vaults where frontmatter is a mess as well as probably converting harness transcripts into md

is there anything new that obsidian web clipper can do with knap?
1
0
1
1,475
Replying to @gootecks
@gootecks Knap is the Obsidian Web Clipper template engine split into its own package. But in the process of generalizing it I had a few ideas for some new filters. Those will be in the next Web Clipper update. Plus a few more things people suggested today. See
knap.md/filters#built-…
1
0
7
1,309
Replying to @kepano
@kepano Is that liquid?
2
0
1
396
Replying to @SebastianSzturo
@SebastianSzturo Sorta! You can think of it like Liquid for Markdown.
@SteveCracker3 @obsdmd Knap's syntax is intentionally designed to feel familiar if you've used Twig, Liquid, Jinja, Tera, etc.

But Knap is specifically designed for generating Markdown with frontmatter, so it has many more built-in filters for that purpose and different defaults for whitespace.
0
0
0
412
Replying to @kepano
@kepano It also means "pretty" in Dutch ;-)
1
0
45
3,645
Replying to @jplattel
@jplattel Despite having lived in Delft briefly, I didn't know that! Happy coincidence :)
0
0
36
2,983
Replying to @kepano
@kepano I read your text and watched the video and I still don't understand what knap is doing. How is the output with all the data generated from the input which is just code?
2
0
7
2,556
Replying to @jonilaserson
@jonilaserson You're right there are two parts to the input: the data and the Knap template. Here the data is stored in JSON, but it could be piped in via CLI, or come from the host.

Take a look at the docs and the Knap Playground, it will make more sense: knap.md/playground
1
0
6
2,276
Replying to @kepano
@kepano 😅😂
- lol this is Jinja2 right?
- why are we creating markdown files from perfectly good structured data?
1
0
2
521
Replying to @TheBalkanHacker
@TheBalkanHackeris indeed designed to feel familiar if you've used other templating languages like Jinja, Twig, Liquid, etc.

As for the latter... Knap is the templating language I originally made for Obsidian Web Clipper and Importer.

Why are a million people using Web Clipper to save web pages with frontmatter? Or using Obsidian Importer to move their data from proprietary notetaking apps to Markdown?

I suppose because they want that data in a format that is easy to read and edit, or they want to modify that data in many subtle ways, see Knap's filters. Note that the output can still be structured, Knap can produce YAML too.

Perhaps you want to turn CSV or JSON data into a batch of Markdown files for a static site generator.

There are many creative uses of Knap :)

x.com/kepano/status/…
@SteveCracker3 @obsdmd Knap's syntax is intentionally designed to feel familiar if you've used Twig, Liquid, Jinja, Tera, etc.

But Knap is specifically designed for generating Markdown with frontmatter, so it has many more built-in filters for that purpose and different defaults for whitespace.
1
0
1
694
Replying to @kepano
@kepano Looks like it's heavily inspired by Jinja + Shopify Liquid
1
0
2
1,016
Replying to @asunnyoruche
@asunnyoruche Chyrp/Twig by Alex Suraci and @mitsuhiko was a more direct inspiration for me personally, but yes they're all related!
x.com/kepano/status/…
@SteveCracker3 @obsdmd Knap's syntax is intentionally designed to feel familiar if you've used Twig, Liquid, Jinja, Tera, etc.

But Knap is specifically designed for generating Markdown with frontmatter, so it has many more built-in filters for that purpose and different defaults for whitespace.
0
0
2
1,302
Replying to @kepano
@kepano what makes Knap different than Djot?
1
0
2
1,533
Replying to @SpiritOfStarr
@SpiritOfStarr They are unrelated in purpose. Djot is an alternative to Markdown. Knap is a templating language to generate Markdown. Though it's not really optimized for that, Knap can also generate Djot.
1
0
11
1,424
Replying to @kepano
@kepano @obsdmd So it’s Tera basically
1
0
2
1,698
Replying to @SteveCracker3
@SteveCracker3 @obsdmd Knap's syntax is intentionally designed to feel familiar if you've used Twig, Liquid, Jinja, Tera, etc.

But Knap is specifically designed for generating Markdown with frontmatter, so it has many more built-in filters for that purpose and different defaults for whitespace.
0
0
15
6,545
Replying to @kepano
@kepano I get it when it comes to CSV data: converting it to MD so that you can integrate it in your Obsidian "databases". But HTML as in web pages? Why should we want to convert entire web pages to some sort of note format and not simple preserve those pages as they are in HTML?
1
0
1
1,070
Replying to @F_Ferreira_
@F_Ferreira_ People want to save the main content of the site itself, not all the navigation, footers, ads, etc. So they use Knap in Obsidian Web Clipper to save pages as Markdown and also to highlight/annotate the content in a more human-friendly format.
obsidian.md/clipper
0
0
6
1,012
Replying to @kepano
@kepano Will you be updating your obsidian skills repo to include Knap? 👀🤔
1
0
1
635
Replying to @KlubByte
0
0
5
649
Replying to @kepano
@kepano "Knap gedaan!" (well done!). I'm the (Dutch) author of the Markdown Pro plugin for Jetbrains (plugins.jetbrains.com/plugin/33400-m…)

Would you mind if I integrate Knap? I've implemented basic support for Obsidian in the latest version as well, and this could be a nice addition.
1
0
0
234
Replying to @epragt
@epragt Knap is open source under the MIT license so you're welcome to!
2
0
1
220
Replying to @kepano
@kepano Will this get into Obsidian?
1
0
0
170
Replying to @mrbavio
@mrbavio It is making its way. It's in Obsidian Web Clipper and Obsidian Importer already.
0
0
2
224
Replying to @kepano
@kepano I'd keep the JSON input on screen beside the template. Seeing one value change all the way through would explain Knap in seconds.
1
0
0
1,318
Replying to @xiz25
@xiz25 I tried but found it's a lot to show in a video frame. Check out the Playground, that's exactly how it is laid out :)
knap.md/playground
0
0
3
1,289
Replying to @kepano
@kepano Any plan on adding custom blocks à-la Nunjucks/Jinja through the API? If so, I'd definitely switch to Knap for my Blueprint Obsidian plugin :D
1
0
0
887
Replying to @madx
@madx what kind of custom blocks do you have in mind?
1
0
0
563