Search...Search plugins and themes...
⌘K
Sign in
  • Get started
  • Download
  • Pricing
  • Enterprise
  • Account
  • Obsidian
  • Overview
  • Sync
  • Publish
  • Canvas
  • Mobile
  • Web Clipper
  • CLI
  • Learn
  • Help
  • Developers
  • Changelog
  • About
  • Roadmap
  • Blog
  • Resources
  • System status
  • License overview
  • Terms of service
  • Privacy policy
  • Security
  • Community
  • Plugins
  • Themes
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

Knapsack

bobstantonbobstanton13 downloads

Editor, tester and note creator for Knap templates.

Add to Obsidian
Knapsack screenshot
  • Overview
  • Scorecard
  • Updates1

Editor, tester and note creator for Knap templates.

Testing a template

Using a knap template, Templates/Recipe.knap:

---
{{ author | wikilink | yaml_property:"author" }}
{{ servings | yaml_property:"servings" }}
{{ url | yaml_property:"source" }}
---

{{ title | h1 }}

{{ description | blockquote }}

## Ingredients

{{ ingredients | table:("Ingredient", "Quantity") }}

## Instructions

{{ instructions | list:numbered }}

Add a knapsack block to a note with data for the fields in the knap template:

```knapsack
template: Templates/Recipe.knap
data:
  author: Eric Kim
  servings: 8
  url: https://example.com/gochujang-cookies
  title: Gochujang caramel cookies
  description: Chewy sugar cookies with a ribbon of spicy caramel.
  ingredients:
    - [Unsalted butter, 1/2 cup]
    - [Dark brown sugar, 1/4 cup]
    - [Gochujang, 1 tablespoon]
    - [All-purpose flour, 1 1/2 cups]
  instructions:
    - Mix the caramel ingredients until smooth.
    - Make and chill the cookie dough.
    - Swirl in the caramel, shape, and bake.
```
Setting Meaning
template Vault path or [[wikilink]] of the template file
data Variables for the template, or the path or [[wikilink]] of a note whose properties to use
render true shows the preview as formatted Markdown instead of its source. What is copied or made into a note is the source either way
preview false hides the generated Markdown
fields Inputs that turn the block into a form; see below
outputFolder Folder for created notes; made if missing. Setting it adds a Create note button, with or without fields

Creating a note

Set a outputFolder and fields types. Each field becomes an input, and the result can be made into a note or copied.

```knapsack
template: Templates/Recipe.knap
outputFolder: Recipes
data:
  servings: 8
fields:
  title: text
  author: text
  servings: number
  url: text
  description: text
  instructions: list
```
Field type Input
text One line of text
number A number
checkbox A toggle
date A date picker
list Several values, separated by commas
note A note, chosen from suggestions; the template gets its name
notes Several notes, separated by commas
[first, second, third] A dropdown of those choices

Defaults can be provided in data. New notes are named after title or name field

Suggestions from a property

A text or list field suggests values other note's property values. To take suggestions from a different property, name it after the type:

```knapsack
template: Templates/Recipe.knap
fields:
  author: text                # values of the author property
  stars: text Rating          # values of the Rating property
  course: list Meal type      # property names may contain spaces
  tags: list                  # tags from properties and from note text
```

Notes from a folder

note and notes suggest every note in the vault. Name a folder after the type to offer only its notes: author: note People.

Required fields

End a field's name with * to require it: title*: text. A form with an empty required field cannot be copied or made into a note.

Styling

Selector Part
.knapsack-block The whole block
.knapsack-form The inputs and buttons
.knapsack-field One field's row, with data-field (its name), data-type, and data-required
.knapsack-missing A required field left empty
.knapsack-actions The row of buttons
.knapsack-preview The generated Markdown and any messages
.knapsack-error, .knapsack-warning Message blocks

Network requests

None.

Background tasks

None.

Dependencies

Library Purpose
knap Template rendering and syntax highlighting
monkey-around Opening .knap.md files in the template editor

The suggestions and delimiter pairing in src/vendor are copied from the Knap playground.

HealthExcellent
ReviewSatisfactory
About
Edit and test Knap templates directly in Obsidian and preview the rendered Markdown from knapsack blocks. Create notes from templates using form-style fields or existing note data, produce the underlying Markdown source, and save created notes to a specified folder.
TemplatingFolders
Details
Current version
0.0.1
Last updated
2 days ago
Created
2 days ago
Updates
1 release
Downloads
13
Compatible with
Obsidian 1.13.0+
Platforms
Desktop, Mobile
License
AGPL-3.0
Report bugRequest featureReport plugin
Sponsor
Ko-fi
GitHub Sponsors
Author
bobstantonbobstanton
vaultquery.stanton.dev/
GitHubbobstanton
  1. Community
  2. Plugins
  3. Templating
  4. Knapsack

Related plugins

Folder notes

Create notes within folders that can be accessed without collapsing the folder, similar to the functionality offered in Notion.

Create Note in Folder

Add commands to create a note in a specific folder.

Default Template

Automatically apply templates to new notes with user-configurable template selection.

Journal Folder

Utilities for folder-based journaling.

Templater

Create and use dynamic templates.

Quick Explorer

Perform file explorer operations (and see your current file path) from the title bar, using the mouse or keyboard.

QuickAdd

Quickly add new notes or content to your vault.

Flexplorer

Enhance the file explorer with custom sorting, pinning, and hiding.

Relay

Collaborate in real time with live cursors. Share folders. Manage access to updates.

Journals

Manage your journals.