Use case or problem
When a Base is embedded into a note, there should be a way to serialize it to Markdown, so that (1) the Markdown file contains the data and not just the Base embed code
(2) the data may be published (e.g., via Obsidian Publish)
The Dataview plugin suffers from a similar issue, which is why I created a plugin called Dataview Serializer to have the data in the file, rather than just the query. The serialized version is updated automatically when the note is touched, or when a specific command is invoked.
The benefit of serialization is that the data would be in the Markdown files where Bases are embedded, and not ONLY within Obsidian.
Proposed solution
A way to enable serialization as part of the embed syntax:
![[File.base#View#Serialize]]
...base
filters:
and:
- file.hasTag("example")
views:
- type: table
name: Table
serialize: true
...
If there’s no willingness to implement something like this, then at least having a way to pass a Base definition/Base file reference to an API and getting back a Markdown version would enable implementing something like this through a community plugin.
Current workaround (optional)
N/A
3 Likes
Given this is a database table, would it make more sent to export this in csv which is already possible?
Publish support is on the roadmap
1 Like
The goal is really to have a Markdown version within the note.
Of course being able to export to CSV would be great, but it would be a different feature entirely.
Here the goal is to have the selected data be “burnt” to the note, so that if Obsidian disappears for some reason, there’s at least the last state within the note, safe and sound, in addition to the Base embed syntax or Base query.
The nice thing is that this approach doesn’t require any specific support in Obsidian Publish, and it would also work with other publishing mechanisms (e.g., Quartz, GitHub pages, …).
TBH, this is probably a tough feature to build as it implies a number of questions about what to update, when, when not, which view to serialize, etc. Might require additional syntax & complex logic.
The one reference example I can give is this plugin that I’ve built:
That’s one I’m using and that enables me to publish notes that contain Dataview queries with the actual data. That’s a specific use case, but I also see the value of having the data in the note(s)
export to CVS is already possible.
If the goal is to have a markdown version of the note. Are you asking to convert the output of an Obsidian Base to a Markdown table?