Templates

The same article, in the file shape you already use

A template wraps the converted Markdown with front matter, metadata, or a short instruction. The article stays the article. The file around it stays consistent.

Blog Post Template
---
title: "{{title}}"
url: {{url}}
author: {{author}}
date: {{publishedTime}}
---

{{markdown}}
Preview
---
title: "React Hooks Guide"
url: https://example.com/react-hooks
author: Dan Abramov
date: 2025-03-15
---

# React Hooks Guide
React hooks let you use state...
{{title}}{{url}}{{author}}{{publishedTime}}{{markdown}}{{toc}}

What you can put in a template

Variables from the page

Templates use double-brace fields such as {{title}}, {{url}}, {{markdown}}, {{toc}}, {{publishedTime}}, {{excerpt}}, {{byline}}, and {{siteName}} when the page provided them.

Front matter you can reuse

Wrap the article in YAML for a vault, a static-site post, or a research note. Quote {{title}} when titles contain colons.

More than one template

Keep a citation template and a prompt template. Switch them from the extension toolbar instead of editing the body by hand each time.

A front matter pattern

This is a template, not a capture from a live page. The extension substitutes the fields when you convert. The public API accepts a template string on the same idea. See the developer API for the request field. Extension output and API output are related, not guaranteed identical.

---
title: "{{title}}"
source: {{url}}
date: {{publishedTime}}
---

{{markdown}}

Where the template is applied

The side panel dropdown lists every saved template and remembers the one you picked. “Add new template” opens the extension settings page. That page’s Content Templates screen is where you create, edit, and delete. Names and body text are both required. The template whose id is the built-in Default cannot be edited or deleted. The other three that ship with the extension can. Restore defaults replaces the entire list, including anything you added, and the dialog tells you that cannot be undone.

Conversion order in the extension is fixed. The open page is extracted, the article HTML becomes Markdown with your Markdown Style options, Prettier runs on that article when formatting is enabled, and only then does the selected template wrap the text. The wrapper you typed is not passed through Prettier. Front matter stays as you wrote it. The article inside {{markdown}} is the formatted part. Markdown Style and Format Settings are the neighboring screens: heading style, list markers, fences, emphasis, indent, and whether code blocks are formatted. They change the article, not the wrapper.

The HTML to Markdown page covers the conversion itself. Templates start after that conversion. They do not change which part of the page was extracted.

The four templates that ship

Default is only {{markdown}}. Use it when you want the article and nothing around it. Basic Frontmatter writes a YAML block with title, url, and publishedTime, then the article. Content Summary writes Title, URL, Summary from the excerpt, and then the article under a Content heading. Markdown Link writes a single Markdown link plus the excerpt as a blockquote, and it does not include the article. That last one is a citation, not a clip of the body. If you translate while Markdown Link is selected, the panel stops and toasts “Current template does not contain markdown content,” because translation requires the characters {{markdown}} in the template.

Basic Frontmatter looks like this before substitution:

---
title: {{title}}
url: {{url}}
publishedTime: {{publishedTime}}
---

{{markdown}}

The shipped front matter does not quote the title. If a real title contains a colon, quote it yourself in a copy of this template. The illustration further down does that.

Fields you can actually substitute

The settings form documents {{title}}, {{url}}, {{markdown}}, {{excerpt}}, {{byline}}, {{siteName}}, {{publishedTime}}, and {{toc}}. The same object also carries the extractor’s own names, so {{author}} matches byline, {{description}} matches excerpt, {{site}} matches siteName, and {{published}} matches publishedTime. You can also write {{domain}}, {{favicon}}, {{image}}, {{language}}, {{wordCount}}, and {{url}}. Spaces inside the braces are trimmed, so {{ title }} is the same field as {{title}}.

A missing field becomes the literal word undefined in the preview. It is not hidden. Stick to the text fields above. Structured values such as schema data do not expand into nested fields, so leave {{schemaOrgData}} out of a template.

Values are inserted as text. A dollar sign in a title or a URL can come out changed. If a price or a variable name looks wrong, edit that line in the preview before you copy or download.

Workflow: a vault note

You are clipping a React article into a folder of notes, and you want the source URL in front matter every time. Open the article, open WebInk, and choose Basic Frontmatter, or a copy you saved that quotes the title. Scroll the original page first if figures load only as you reach them. The extension converts the document that is already open. Check the preview for undefined in the date line. Many pages have no publication time, and the field will say so literally. Copy, download the .md file, or use ZIP export when the figures have to sit beside the note. The zip packs the templated text, so the front matter is inside the archive. The Obsidian workflow is the longer vault version of this pass.

Here is a realistic result of the quoted pattern. The article text is shortened. It is an illustration of substitution, not a capture from a live site.

---
title: "How hooks remember state"
source: https://example.com/react-hooks
date: 2024-03-12
---

## Why state resets

A component function runs again on every render. State stays
in the hook call, matched by position, not by the variable name.

![State diagram](https://cdn.example.com/diagrams/state.png)

If you then download a ZIP, the image line can become images/state.png when that fetch succeeds. The front matter is unchanged by the image pass. See the ZIP page for failures, data URLs, and filename collisions.

Workflow: a citation, then a prompt

For a reading list, switch to Markdown Link. The output is a link and a one-line excerpt, which is what you want in a bibliography and the wrong choice when you meant to keep the article. Switch back to Default or Basic Frontmatter before you translate or before you expect a full body.

For a repeated instruction to an assistant, write a template that puts your sentence around the article:

Source: {{url}}
Title: {{title}}

Explain the argument in 8 bullets. Quote headings, do not invent citations.

{{markdown}}

That wrapper is a capture template. It is not the same list as AI Prompts in settings. AI Prompts are what Send to AI resolves, and those prompts can also use a selection field. A capture template changes the Markdown in the panel. An AI prompt is applied when you send or copy a prompt. Use a capture template when the file you save should already contain the instruction. Use an AI prompt when the saved file should stay a clean article and the instruction belongs only in the chat.

Table of contents inside the wrapper

{{toc}} is filled by the side panel, not by the page extractor. The generated list starts with a bold “Table of Contents” line and then Markdown links to anchors shaped like #toc-0. Depth defaults to the first three heading levels. You can raise it up to H6. Numbering is off until you enable it. Inclusion in the article is off until you enable it. The TOC page covers scroll tracking. The template rule is the part that surprises people: if your template already contains {{toc}}, the automatic insert is skipped so you do not get two lists. If it does not, and inclusion is on, the list is placed at the top or the bottom of the article before the template runs. Custom position looks for a placeholder in the article and otherwise falls back to the top.

A short TOC template, before substitution:

# {{title}}

{{toc}}

{{markdown}}

---
*Source: [{{siteName}}]({{url}})*

Editing, switching, and the API

Edit mode in the panel is a real edit of the output. After the first change, the template is not reapplied on each keystroke. That is what you want when you are deleting a newsletter footer the extractor kept. It is also how a front-matter mistake survives even after you fix the template: you are looking at the edited buffer, not a fresh wrap. Pick the template again from the dropdown to force a new wrap. That clears the edit.

The developer API accepts an optional template string on the conversion request. It runs the same brace substitution against the API’s Markdown result. It does not generate the extension’s TOC, so {{toc}} is not a side-panel list there. If a request also sends transform options, the template runs first and the options then replace that wrapped text with a fresh conversion. Send a template without transform options when the wrapper must survive. The extension does not do that replacement. Treat the two outputs as related, and compare them on one URL before you script a migration. The webpage to Markdown guide shows the extension path end to end.

Troubleshooting

The word undefined in a YAML line means that field was empty or the name does not match. publishedTime is the usual one. Delete the line, or switch to a template that omits it.

A title that breaks the YAML parser usually contains a colon, a hash, or a leading quote. Quote the value in the template, as in the first sample on this page. The shipped Basic Frontmatter template does not quote it.

Translation does nothing useful and shows an error when the selected template has no {{markdown}}. Markdown Link is the built-in case. Add the field, or switch templates, then pick the language again.

A ZIP that contains front matter and no figures usually means the template dropped the article, or the figures were not Markdown images in the final text. Download .zip reads the templated text, not the original HTML. Details are on the ZIP export page. The subscription, which does not gate templates or ZIP, is described on Pricing.

Restore defaults is the destructive one. It puts back Default, Basic Frontmatter, Content Summary, and Markdown Link, and it deletes the rest. Copy a custom template out first if you still want it.

Questions

Where do I edit a template?

In the extension settings page, open Content Templates. You can also choose Add new template from the side panel dropdown, which opens that settings page. The selected template is remembered in the extension. The website does not store your template text.

What happens if a field is missing?

The template step substitutes each {{name}} from the page fields. If that field is missing, the output contains the literal text undefined. Check the spelling, including the aliases: byline is the author, excerpt is the description, siteName is the site, and publishedTime is the published date.

Does the template run again after I edit the preview?

No. Once you edit the text in the panel, that edited text is the output. The wrapper is not applied on top of the edit. Choosing another template clears the edit and applies the new template to the converted article, so the manual edit is dropped. A new tab also starts clean.

Can I put the table of contents in the middle?

Yes. Put {{toc}} where you want the list. If the template contains that field, WebInk does not also auto-insert a second copy. If the template has no {{toc}} and you have turned on inclusion, the list is inserted into the article at the top, at the bottom, or at the top when the position is custom and the article has no placeholder.

Will Restore defaults keep my custom templates?

No. Restore defaults replaces the whole list with the four templates that ship with the extension. The confirmation dialog says the action cannot be undone. Export anything you wrote, by copying it out, before you confirm.

Is the public API template the same as the extension?

It uses the same {{field}} idea on the API result, and the output is not guaranteed to match the extension. The API does not fill {{toc}} the way the side panel does. If the request also sends transform options, those options replace the wrapped Markdown with a fresh conversion. Send the template on its own when the wrapper has to remain.

Build the template once

Install WebInk, open options, and save the wrapper you want on every capture.

Add to Chrome
More from WebInk