obsidian-export
obsidian-export copied to clipboard
Add dataview support
When I export an Obsidian note with a https://github.com/blacksmithgu/obsidian-dataview query snippet, I get an .md file with the dataview query, not the query results because dataview executes queries within the Obsidian apps.
Is there any way to make Obsidian Export talk to the dataview plugin to render query results? I publish my own Obsidian vault to a static site thanks to Obsidian Export, and I would love to use dataview but right now I can't because I know that some of my published notes will be broken. Popular frameworks like LYT Kit v6 are now also using dataview, so I expect that more and more people would benefit from this feature.
Adding @blacksmithgu in case he has any idea about how we could do this.
And more context on this issue: https://forum.obsidian.md/t/hybrid-of-dataview-and-textexpand/16656
I am working on dataview export functionality currently that replaces dataview blocks with markdown equivalents, so that may help in this context.
I am working on dataview export functionality currently that replaces dataview blocks with markdown equivalents, so that may help in this context.
That's great news, thanks Michael. Do you have any available spec or docs about how it would work? If not, no worries, I will wait. I was curious to see if there is anything that can be done in parallel to make obsidian-export work with that feature.
At a high level, the export functionality will support:
- A simple user UI for converting specific views or ALL views to plain Markdown.
- A programmatic API for converting a query to raw Markdown.
Obsidian Export would probably need to add a little functionality to call the API on dataview blocks to convert them to raw markdown; alternatively, users would render all of their views to markdown and then call export.
In the meantime... see https://forum.obsidian.md/t/dataviewjs-snippet-showcase/17847/225?u=lise for a way to create a static dataview table using a templater template.