Hubert Kuo373 downloadsCreate structured Markdown packages from selectable templates.
KnForge creates consistent, self-contained Markdown packages in Obsidian. Choose a template, enter a name, and KnForge creates a package folder, an optional subfolder structure, and a Markdown file that is opened immediately.
KnForge is designed for repeatable note structures such as research topics, projects, meetings, customers, technical records, and knowledge objects. It works entirely inside your Vault and keeps the generated content as portable Markdown with optional YAML frontmatter.
<name>/<name>.md package layout.assets folder.KnForge follows Obsidian's interface language automatically. English and Simplified Chinese are included. Other Obsidian languages currently fall back to English, and additional translations can be added without changing package creation behavior.
After KnForge has been accepted into the community directory:
<your-vault>/.obsidian/plugins/knforge/ if it does not exist.main.js, manifest.json, and versions.json into that folder.README.md is included in release packages for reference but is not required
by Obsidian at runtime.
KnForge creates the package and opens its Markdown file.
When rich content copied from a web page or a rendered Markdown preview is pasted
into an active note, KnForge saves supported images, linked videos, and PDFs in
an assets folder beside that note and rewrites their links. It supports
clipboard files, data: images, HTTP/HTTPS links, and local file:// links in
the Obsidian desktop app. Images use standard Markdown image links; other
attachments use standard Markdown links.
Copied attachments receive short names such as asset-001.png, preserving their
type without carrying long or URL-encoded source names into the vault. Settings
can switch to type prefixes (img, gif, video, pdf) and add a Moment date/time
format such as YYYYMMDDHHmmss before the sequence. The sequence increases within
each assets folder and starts at 001 in a new folder. Existing files are never
overwritten. The per-attachment and per-paste limits default to 20 MiB and
200 MiB; each can be changed independently or set to 0 for no limit. Unlimited
downloads can use substantial memory. If an attachment cannot
be copied, its original link is retained and KnForge reports a partial result.
Pure Markdown text containing only relative attachment paths does not include
the source file location; KnForge leaves it unchanged and shows a notice.
With a creation location of Projects, a package name of Windchill, and this
folder structure:
assets
references
exports
KnForge creates:
Projects/
└── Windchill/
├── Windchill.md
├── assets/
├── references/
└── exports/
The contents of Windchill.md come from the template selected in the creation
dialog.
Start typing any part of a Vault folder path. KnForge displays matching folders using Obsidian's suggestion interface. Select a suggestion to use that folder.
KnForge recursively discovers every .md file in the selected folder and its
subfolders. Templates are displayed relative to the template folder, so a file
at Templates/Projects/Meeting.md appears as Projects/Meeting.md.
Selecting the Vault root makes every Markdown file in the Vault available as a template. For most Vaults, a dedicated template folder is recommended.
Enter one package subfolder per line:
assets
references
exports
Nested paths are supported:
assets/images
assets/documents
references
Folder entries can use the same variables as templates. Every resulting path is validated before KnForge writes the package.
KnForge follows the location choices used by Obsidian's Files and links settings:
A/A.md active, creating B produces
A/B/B.md.A/A.md active, creating B
produces B/B.md beside A. When the active note is in the Vault root, the
Vault root is retained.The additional folder setting is hidden unless the custom-folder option is selected.
The template and custom-location fields are editable path inputs rather than fixed dropdowns. Matching is case-insensitive and can match any part of a folder path. An empty query also offers the Vault root.
This option is disabled by default. When disabled, KnForge does not generate or modify YAML; the selected template is used as-is after variable substitution.
When enabled, two additional settings appear:
Example KnForge YAML:
title: "{{title}}"
type: project
status: draft
created: "{{date}}"
Given template frontmatter:
type: meeting
owner: Hubert
and KnForge YAML:
type: project
status: draft
type: meeting.type: project.owner and status are retained in both modes because they do not conflict.Merging is performed on top-level YAML keys. When YAML generation is enabled, frontmatter is parsed and serialized again; comments, quoting choices, and manual formatting inside the original YAML may be normalized.
Variables can be used in template content, KnForge YAML, and configured package subfolder paths. KnForge renders these variables itself because Obsidian does not expose the core Templates renderer as a public plugin API.
KnForge follows the core Obsidian Templates syntax for title, date, and time:
| Variable | Value |
|---|---|
{{title}} |
Validated, filename-safe package name |
{{date}} |
Date in YYYY-MM-DD format |
{{time}} |
Time in HH:mm format |
{{date:FORMAT}} |
Date formatted with Obsidian's official Moment instance |
{{time:FORMAT}} |
Time formatted with Obsidian's official Moment instance |
Examples include {{date:YYYY/MM/DD}}, {{date:dddd, MMMM Do YYYY}}, and
{{time:HH:mm:ss}}.
| Variable | Value |
|---|---|
{{slug}} |
Filename-safe package name |
{{year}} |
Four-digit year |
{{month}} |
Two-digit month |
{{day}} |
Two-digit day |
{{timestamp}} |
Local date and time in YYYYMMDDHHmmss format |
{{id}} |
Unique UUID generated for this package |
Unknown variables stop creation and display an error instead of silently
producing an unexpected path or document. Formatting suffixes are supported
only on date and time.
KnForge does not interpret Templater expressions. To use complete <% tp... %>
expressions, install and enable Templater, then enable Templater's Trigger
Templater on new file creation setting. Set Template matching mode to
None. No folder-template rule is needed because KnForge has already written
the selected template into the new Markdown file.
KnForge first renders its {{...}} variables and, when enabled, merges shared
KnForge YAML with the template's existing frontmatter. It then creates the file
with Templater expressions intact. Templater processes those expressions in
response to the new-file event. Template properties and shared KnForge
properties can therefore be used together; YAML conflict priority decides
which value wins for duplicate top-level keys. KnForge shared properties always
appear first in the generated frontmatter, in the same order as the KnForge YAML
setting. Template-only properties follow in their original order.
Recommended Templater settings:
Trigger Templater on new file creation: On
Template matching mode: None
Avoid Folder templates for this integration. Folder and regex template modes are designed to populate empty new files, while KnForge creates a complete file from its selected template. Templater processes that file asynchronously after creation, so expressions may remain visible briefly before their values appear.
For a manual integration check, configure shared KnForge YAML such as:
id: "{{id}}"
status: draft
created_by: human
and select a template containing:
---
title: <% tp.file.title %>
created: <% tp.date.now("YYYY-MM-DD") %>
type: resource
---
After KnForge creates the package and Templater finishes processing the new
file, verify that the package folders and Markdown file exist, id, status,
and created_by contain KnForge values, and title and created contain values
generated by Templater.
KnForge does not require proprietary syntax in generated files:
--- delimiters.YAML frontmatter is a widely supported Markdown ecosystem convention, but it is not part of the CommonMark specification itself. Disable KnForge YAML if you need the generated file to contain only the selected Markdown template.
KnForge does not remove Obsidian-specific syntax already present in a template. Template authors control the portability of template content.
KnForge validates the complete creation plan before writing package content:
KnForge only reads and writes files inside the current Vault. It does not make network requests, collect telemetry, display advertising, or require an online account.
.md files.If a current-file-relative location is selected but no note is active, the Vault root is used. Open the desired note before invoking KnForge, or select a fixed folder in settings.
KnForge YAML must contain a mapping of keys to values. A list or scalar at the document root is not accepted. For example, use:
tags:
- research
- active
instead of a root-level list.
KnForge intentionally refuses to overwrite an existing package folder. Choose a different package name or move the existing package first.
KnForge operates locally inside the active Vault. It has no network integration, telemetry, analytics, advertisements, payment features, or external account requirements. Like all Obsidian community plugins, it runs with Obsidian's file access permissions.
pnpm install
pnpm lint
pnpm test
pnpm build
The production build writes main.js in the repository root. The lint command
uses Obsidian's community-plugin ESLint rules. Automated tests cover path
safety, template discovery, location handling, declarative settings, variable
rendering, localization, and YAML conflict behavior.
Release changes are documented in CHANGELOG.md.
Use the GitHub repository's issue tracker to report bugs or request features. When reporting a problem, include your Obsidian version, KnForge version, platform, relevant settings, and steps to reproduce the issue. Do not include private Vault content or credentials.