The OFM v1 authoring surface, with links, embeds, callouts, math, and media.

About 6 min read

Syntax

The ofm@1 profile has a versioned contract. It favors source that reads well in Obsidian, on the generated site, and in a plain text editor.

Use a wikilink for another note and an alias for display text: compiler architecture. A heading fragment links to Compiler boundary. A block fragment links to compiler contract.

The next excerpt is embedded from the architecture note:

From Architecture

The compiler receives an immutable snapshot of public-source bytes, attachment metadata, normalized paths, configuration, optional Git dates, and an explicit BuildRequest.reference_time (Time). It does not read the filesystem, ask Jekyll for state, use the network, inspect environment variables, or read the current clock. The adapter samples the reference time once; input preparation, remote Markdown materialization, and every locale compilation preserve that same input. It controls recommendation expiry and the reference year of daily headings, and never supplies missing post dates. Its sorted result contains pages, generated files, projected files, and diagnostics. Localization stays behind this same VaultCompiler.compile(BuildRequest) interface: one locale plan creates default-authoritative overlay snapshots and combines their immutable outputs before Jekyll receives them.

Embeds keep their source attribution. When the same excerpt appears more than once, the compiler scopes its DOM IDs so anchors remain unique.

Text marks and tasks

Common Markdown works alongside highlighting, footnotes, and task states.1

  • Publish at least one note.
  • Replace the sample title.
  • Review a draft.

Callouts

A folded note


Folded callouts use a native details element, so they remain keyboard accessible.

Math and diagrams

Inline math such as e^{i\pi}+1=0 keeps its source visible until MathJax loads.

\operatorname{score}(q, d)=\sum_{t\in q}\operatorname{weight}(t, d)

flowchart LR
  Vault --> Compiler
  Compiler --> Jekyll
  Jekyll --> Pages

Mermaid and MathJax load only on pages that use them.

Media

An image embed can include its width or width and height.

For Markdown images, put dimensions in the alt text, for example ![Diagram|640x360](diagram.png). A literal | inside a Markdown destination is part of the filename or URL, not a size separator; %7C is also accepted. Inline and reference images use the same published attachment address in HTML and exported Markdown. Filesystem restrictions still apply: Windows does not allow literal pipes in filenames.

In external media URLs, encode a literal pipe as %7C, for example ![Diagram|640](https://example.test/a%7Cb.png). An unencoded pipe fails URL validation.

![[diagram.png|640x360]]
![[paper.pdf#page=3]]
![[paper.pdf#height=560]]

Local audio, video, and PDF files use native browser controls. In v1, .3gp is audio and .webm is video. PDF embeds accept page and height options. Canvas and Bases files become download cards because v1 does not execute their data models.

Local and remote PDF fragments accept only page and height. Unsupported options such as zoom=100 fail the build (invalid_pdf_options for local files, invalid_external_media for remote URLs); remove them before building.

External HTTPS media uses the same Markdown image syntax. GIFs and other supported images keep image semantics and optional Obsidian dimensions. Direct audio and video files use native controls. PDFs start as compact links with an optional preview action in browsers with a native PDF viewer. YouTube, Bilibili, and Vimeo links become privacy-conscious, lazy player frames, while X or Twitter status links become lazy Tweet embeds with a normal link as their fallback.

![Animation|320x180]https://media.example/loop.gif
![Product tour]https://cdn.example/tour.mp4
![Interview]https://cdn.example/interview.mp3
![Paper]https://cdn.example/paper.pdf#page=3&height=560
![arXiv paper]https://arxiv.org/pdf/2609.12345
![Conference talk]https://www.youtube.com/watch?v=NnTvZWp5Q7o&t=1m30s
![](https://www.bilibili.com/video/BV1E7411e7hC?p=2)
![](https://vimeo.com/212731897)
![](https://x.com/obsdmd/status/1580548874246443010)

Supported files follow Obsidian's accepted formats: images (avif, bmp, gif, jpeg, jpg, png, svg, webp, plus apng), audio (3gp, flac, m4a, mp3, ogg, wav), video (mkv, mov, mp4, ogv, webm), and PDF. Codec support depends on the browser. Remote files are recognized by the URL path's extension, including uppercase extensions and URLs with query parameters; arXiv /pdf/ URLs also work without an extension. PDF fragments accept a positive page and a height between 64 and 4096. Ordinary Markdown links stay links. The compiler does not fetch remote notes, render Canvas or Bases data, or expand shortened provider URLs.

Remote PDF previews load only on request. The server must allow CORS and return application/pdf; the browser verifies the PDF signature before opening a typed Blob in its native viewer. HTML responses never enter a frame. Previews are limited to 20 MiB and 30 seconds, with one active preview per page. If previewing fails, the compact link stays usable without an empty frame. The link retains page and signed query parameters, and omits the embed-only height option.

Use an explicit iframe only when the page cannot be represented by one of those media forms:

<iframe
  src="https://example.com/interactive"
  title="Interactive example"
  height="560">
</iframe>

The compiler accepts only HTTPS iframe URLs without credentials or custom ports. It discards authored active attributes, rebuilds known video players from canonical provider URLs, and applies one fixed sandbox to generic pages. Every external embed loads only on pages that contain it and receives the narrow Content Security Policy it needs. Generic frames and Tweets retain plain HTTPS fallback links. Builds never contact the provider. An iframe written inside inline code, a code fence, or a comment remains inert source text.

Tags and comments

Inline tags such as #field-notes and nested tags such as #guide/syntax join tags from frontmatter. The site uses one tag index with stable anchors.

Obsidian comments and HTML comments do not appear in HTML, previews, search, graph metadata, or feeds.

Every authored public note also has Copy page and View as Markdown actions. Both use the same frontmatter-free Markdown resource and preserve the authored body, including OFM syntax and comments. Treat comments in a public note as public source text.

Read CJK Showcase for mixed-script examples.

  1. The full compatibility table is maintained in OFM v1 Conformance. ↩

Search this site

The index loads when search opens.

    Browse

    Context

    Full graph

    Loading graph…

    Local graph

    Loading graph…

    Image