Get AI summaries of any video or article — Sign up free
Obsidian   Publish with Dataview thumbnail

Obsidian Publish with Dataview

Josh Plunkett·
5 min read

Based on Josh Plunkett's video on YouTube. If you like this content, support the original creators by watching, liking and subscribing to their content.

TL;DR

Dataview queries can’t run on Obsidian Publish because Publish doesn’t support plugins, so raw queries may appear as unreadable text.

Briefing

Obsidian Publish can’t run plugins like Dataview directly, which means Dataview tables often show up as unreadable query text on a published site. The workaround is to convert Dataview query results into plain Markdown files during editing—then publish those generated Markdown notes—so the website displays real tables instead of raw queries.

The setup hinges on two community plugins: Dataview (by Michael Brennan) to define the queries, and Templater to automate turning those query results into Markdown at the moment you trigger a template. Because Publish doesn’t support plugins, the Dataview query must be executed inside Obsidian first, and its output must be written to a file that Publish can serve. The workflow also avoids fragile edits to existing pages: generated tables live in their own dedicated notes, which can be overwritten safely whenever the underlying data changes.

A key example uses a Dataview query that builds a “player list” table from a specific folder, filtering by properties such as player status (e.g., only “active” players). When a player note is added or their status changes, the Dataview query updates automatically inside Obsidian. The problem appears only at publishing time—without this conversion step, the published page can’t interpret the Dataview query and instead shows armored text. The template solves that by mapping Dataview results into Markdown and writing them into a new note (or replacing an existing one) every time the template runs.

The process starts by installing Dataview and Templater, then confirming Templater’s hotkey (Alt+E in this walkthrough) and the template folder location. Next comes adopting a template pattern originally documented by Joshua on joshua.io: a Templater script that contains embedded Dataview query blocks. In the script, the green-highlighted sections define which Dataview queries get executed and where their outputs are written. The user then copies an existing working Dataview query (for example, “recently edited” or “recent new files”) and injects it into the template under a new generated file name.

Once the template is configured, publishing becomes a two-step rhythm. The normal “Publish changes” button is less useful for Dataview-driven content because the generated Markdown must be refreshed via the template first. The user triggers the template (named “update publish files” in the example), which regenerates the Markdown notes, then publishes those updated files. On the website, the table appears as a real Markdown table with working links.

Finally, the approach scales by creating one generated note per Dataview query and embedding those notes into other pages using Templater/Markdown inclusion syntax (the walkthrough emphasizes using a separate note plus an “exclamation mark” include-style link). This keeps the main published pages stable while the generated table notes can be rewritten repeatedly. The result is a practical, repeatable way to get Dataview-powered “Recently Added/Recently Edited” style tables working on an Obsidian Publish site despite Publish’s lack of plugin support.

Cornell Notes

Obsidian Publish can’t execute Dataview directly, so Dataview queries must be converted into plain Markdown before publishing. The workflow uses Dataview (to define the query) plus Templater (to run the query inside Obsidian and write the results into a generated Markdown note). A template script contains embedded Dataview query blocks; when triggered (Alt+E in the walkthrough), it replaces or creates notes like “player list” or “recently edited” with real Markdown tables. Those generated notes are then published, and other pages embed them via an include-style link, keeping the main pages from being overwritten by template code.

Why do Dataview tables break on an Obsidian Publish site, and what’s the core fix?

Publish doesn’t support plugins, so Dataview queries can’t be evaluated on the published site. The fix is to run Dataview inside Obsidian first and have Templater write the query results out as Markdown tables in separate notes. Publish then serves those Markdown files normally, so visitors see tables instead of raw query text.

What roles do the two required plugins play in the workflow?

Dataview (by Michael Brennan) is used to author the query that selects and formats data (for example, building a “player list” table from a folder and filtering by a property like status). Templater automates execution of those queries and converts the results into Markdown by writing them into generated notes. Without Templater, the query output wouldn’t be materialized into Publish-friendly Markdown.

How does the template approach keep published pages safe from repeated rewrites?

Instead of embedding Dataview query code directly into a page that users will view, the workflow generates a dedicated note per Dataview table (e.g., a separate “player list” note). The template overwrites only that generated note when the query changes. Other published pages then embed that note, so the main page content doesn’t need to be re-coded inside the template.

What does the “player list” example demonstrate about Dataview query behavior?

The example uses a Dataview query that creates a table from a folder of player notes and includes metadata columns (basic stats). It also filters by a property such as “active.” When a player is added or their status changes, the generated table updates accordingly—players drop out when they no longer match the filter.

How does the workflow handle updating content after data changes?

After editing underlying notes, the user refreshes the generated Markdown by triggering the Templater template (hotkey Alt+E, template name like “update publish files”). That step regenerates the Markdown notes, and then Publish is run so the updated generated files reach the website. The walkthrough notes that relying only on “Publish changes” can miss the Dataview-to-Markdown regeneration step.

How are generated tables embedded into other published pages?

The walkthrough emphasizes embedding the generated note into a page using an include-style syntax (described as using an “exclamation mark” link concept). The embedded result looks like a table in the page, but it’s actually coming from the separate generated Markdown note, which is why it can be rewritten safely.

Review Questions

  1. What limitation of Obsidian Publish forces Dataview tables to be converted into Markdown, and how does the template-based workflow address it?
  2. Describe the difference between a native Dataview table and a table embedded from a generated note, and why that distinction matters for updating content.
  3. If a Dataview query changes, what exact sequence of actions ensures the published site reflects the new results?

Key Points

  1. 1

    Dataview queries can’t run on Obsidian Publish because Publish doesn’t support plugins, so raw queries may appear as unreadable text.

  2. 2

    Use Dataview to define the table query, then use Templater to execute the query and write the results into Markdown files.

  3. 3

    Store each Dataview output table in its own generated note so the template can overwrite it without damaging main pages.

  4. 4

    Trigger the Templater template (Alt+E in the walkthrough) to regenerate Markdown tables before publishing updated files.

  5. 5

    Embed generated table notes into other pages using an include-style link (the walkthrough highlights the exclamation mark concept).

  6. 6

    Scale by creating one generated note per Dataview query you want visible on the published site.

  7. 7

    Treat “Publish changes” as secondary for Dataview-driven content; the template run is the step that materializes Dataview output into Publishable Markdown.

Highlights

The workaround turns live Dataview queries into static Markdown tables at edit time, making them compatible with Obsidian Publish.
A Templater template script can embed Dataview query blocks, then replace or create notes containing the rendered table output.
Keeping each table in a separate generated note prevents template rewrites from forcing large edits to existing published pages.
Updating “Recently Added/Recently Edited” style sections becomes reliable once regeneration happens via the template before publishing.

Topics

Mentioned

  • TTRPG