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!
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
@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! 🥹
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
@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
@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-…
knap.md/filters#built-…
1
0
7
1,309
@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
@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
@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
Take a look at the docs and the Knap Playground, it will make more sense: knap.md/playground
1
0
6
2,276
@kepano 😅😂
- lol this is Jinja2 right?
- why are we creating markdown files from perfectly good structured data?
- lol this is Jinja2 right?
- why are we creating markdown files from perfectly good structured data?
1
0
2
521
@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/…
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
@kepano Looks like it's heavily inspired by Jinja + Shopify Liquid
1
0
2
1,016
@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/…
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
@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
@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.
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
@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
@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
obsidian.md/clipper
0
0
6
1,012
@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.
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
@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
@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
knap.md/playground
0
0
3
1,289
@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
















