This plugin provides support for Obsidian compatibility.
For information on how to add, remove or configure plugins, see the Configuration page.
This plugin accepts the following configuration options:
preset: How Markdown is parsed (via remark-obsidian)."legacy"(default) parses exactly as Obsidian does, so pages render as they do in the app. It replaces Quartz’s Markdown parser, so syntax extensions added by other plugins are not consulted, and only YAML (---) frontmatter is recognized."strict"parses CommonMark and GFM as specified, plus Obsidian’s syntax, and keeps other plugins’ syntax extensions working. Use it for TOML (+++) or custom frontmatter delimiters, or plugins that add Markdown syntax.
strictLineBreaks: Obsidian’s “Strict line breaks” setting.false(the default underpreset: "legacy") renders a single line break inside a paragraph as a<br>, as in Obsidian’s default reading view.true(the default underpreset: "strict") renders it as a space, as CommonMark does. This replaces the deprecated HardLineBreaks plugin.comments: Iftrue(default), enables parsing of%%style Obsidian comment blocks.highlight: Iftrue(default), enables parsing of==style highlights within content. A highlight that starts with a colour emoji (🔴 🟠 🟡 🟢 🔵 🟣, or the matching squares) is coloured as in Obsidian 1.14, e.g.==🔴 urgent==.math: Iftrue(default), parses$inline$and$$display$$math. Withfalse, dollar signs stay text (cost of $2-$3), for sites without math.wikilinks: Iftrue(default), turns wikilinks into regular links.callouts: Iftrue(default), adds support for callout blocks for emphasizing content.mermaid: Iftrue(default), enables Mermaid diagram parsing within Markdown files.diagramRenderer:"pele"(default) or"mermaid". Which engine draws Mermaid fences: Pele, as in Obsidian, or the deprecated Mermaid.js.parseTags: Iftrue(default), parses and links tags within the content.parseBlockReferences: Iftrue(default), handles block references, linking to specific content blocks.enableInHtmlEmbed: Iftrue, allows embedding of content directly within HTML. Defaults tofalse.enableYouTubeEmbed: Iftrue(default), enables the embedding of YouTube videos and playlists using external image Markdown syntax.enableTweetEmbed: Iftrue(default), enables the embedding of tweets as static blockquotes from Twitter/X URLs.enableVideoEmbed: Iftrue(default), enables the embedding of video files.enableCheckbox: Iftrue, adds support for interactive checkboxes in content, including custom task characters (e.g.- [?],- [!],- [/]). Defaults tofalse; the defaultquartz.config.yamlturns it on.enableObsidianUri: Iftrue(default), marksobsidian://protocol links with a CSS class and data attribute for custom styling.markdownEmbeds: Iftrue(default), a note, canvas or base embedded with a Markdown link (,,,) is transcluded like![[note#Section]], as in Obsidian (which writes embeds this way when itsUse [[Wikilinks]]setting is off), instead of shown as a broken image. The link resolves like any Markdown link, byconfiguration.links.markdownLinkResolution.blockWrappers: Iftrue(default), wraps each top-level block in thedivObsidian puts it in (div.el-p > p), which Obsidian themes space blocks with. No visible change without a theme.foldHeadings: Iftrue, headings fold as in Obsidian’s reading view (“Fold heading”): an arrow before each heading, shown on hover, hides everything up to the next heading of the same or a higher level. Defaults tofalse.foldLists: Iftrue, list items with a sublist fold as in Obsidian’s reading view (“Fold indent”): an arrow before the item, shown on hover, hides its sublist. Defaults tofalse.
Also supported:
- Inline footnotes (
text^[note]) are numbered together with regular footnotes. - Obsidian’s image size suffix on Markdown images:
andset the width (and height). - An image embed without alt text (
![[pic.png]],![[pic.png|100]]) gets the path as alt text, as in Obsidian, which also names a missing image. - A block reference inside a wikilink (
[[note#^id]]) only links to that block; at the end of a paragraph it no longer gives the paragraph that block id. - Inline tags only link to tag pages that exist.
This plugin must run after GitHubFlavoredMarkdown (order 40 and 30 in the default config): where both claim the same character (~~ strikethrough, for example), the plugin registered later wins.
Default options
- source: "@quartz-community/obsidian-flavored-markdown"
enabled: true
options:
enableInHtmlEmbed: false
enableCheckbox: true
order: 40The disableBrokenWikilinks option previously lived on this plugin. It has moved to the built-in link processing as configuration.links.disableBrokenWikilinks, which owns link resolution and honors the configured markdownLinkResolution strategy when deciding whether a link is broken. If you upgrade from an earlier Quartz v5 beta, move the option from this plugin’s options to configuration.links.
Don’t remove this plugin if you’re using Obsidian to author the content!
API
- Category: Transformer
- Function name:
ExternalPlugin.ObsidianFlavoredMarkdown(). - Source:
quartz-community/obsidian-flavored-markdown - Install:
npx quartz plugin add @quartz-community/obsidian-flavored-markdown(included in the default configuration)