quartz icon indicating copy to clipboard operation
quartz copied to clipboard

Support for Dataview JS Snippets

Open therealfakemoot opened this issue 2 years ago • 13 comments

Is your feature request related to a problem? Please describe. Currently, Quartz cannot render Dataview query or javascript blocks.

Describe the solution you'd like If it's possible, it'd be pretty nice for dataview query blocks to get rendered out into the page.

Describe alternatives you've considered Unfortunately, alternatives are slim. Dataview is a plugin, and even worse, it works at runtime.

The "alternative" to dataview is building tables/lists by hand with hard links, and choosing not to use them for my cases which was a deliberate design decision.

Additional context

Here is an issue on the dataview tracker talking about how to bake this into dataview directly, might be relevant?

therealfakemoot avatar Apr 07 '22 18:04 therealfakemoot

Has anyone investigated this further? I would love this feature.

geoffreygarrett avatar Jul 03 '22 18:07 geoffreygarrett

Hey! I just read up on dataview from the links in the post. It seems like a very powerful feature. Although implementing that within Quartz may be a little complicated, I was wondering if a feature to add regex search would be the quickest way to help? Please let me know if it would be an adequate solution for the short-term. Thanks!

pranavm7 avatar Jul 16 '22 08:07 pranavm7

Are there any news on this issue? I think it would be very useful to implement this feature.

pablillocea avatar Oct 09 '23 10:10 pablillocea

note for future: https://www.npmjs.com/package/obsidian-dataview seems to provide a nice API surface for doing dataview things

jackyzha0 avatar Oct 14 '23 16:10 jackyzha0

I've just stumbled over this excellent project (big thanks!), published my vault and immediately noticed the lack of support for dataviews which are so essential in many vaults. Is this anywhere on the roadmap? Else I'm not sure how to work around this.

deeplook avatar Feb 12 '24 10:02 deeplook

I've just stumbled over this excellent project (big thanks!), published my vault and immediately noticed the lack of support for dataviews which are so essential in many vaults. Is this anywhere on the roadmap? Else I'm not sure how to work around this.

Feel free to check out the discord. iirc some people in the community figure out how to render the dataview into svg and publish it with quartz and GitHub Publisher.

aarnphm avatar Feb 13 '24 08:02 aarnphm

I've just stumbled over this excellent project (big thanks!), published my vault and immediately noticed the lack of support for dataviews which are so essential in many vaults. Is this anywhere on the roadmap? Else I'm not sure how to work around this.

I personally worked around this by using a plugin to parse the Dataview queries before uploading to my Quartz repository. You can check it out here.

saberzero1 avatar Feb 14 '24 20:02 saberzero1

I personally worked around this by using a plugin to parse the Dataview queries before uploading to my Quartz repository. You can check it out here.

This may be a foolish question, but I don't see anything on that plugin about being able to parse Dataview queries. Is that just a feature that is built into the plugin, but not mentioned anywhere?

HyperEpsilon avatar Feb 27 '24 23:02 HyperEpsilon

I think we have this discussion on Discord, but we will probably not support this, atm, since Dataview is not an official Obsidian plugin.

But feel free to write a plugin for quartz if you want this.

aarnphm avatar Feb 28 '24 02:02 aarnphm

I personally worked around this by using a plugin to parse the Dataview queries before uploading to my Quartz repository. You can check it out here.

This may be a foolish question, but I don't see anything on that plugin about being able to parse Dataview queries. Is that just a feature that is built into the plugin, but not mentioned anywhere?

https://github.com/saberzero1/quartz-syncer/blob/main/src/compiler/DataviewCompiler.ts

I'll update the documentation.

I think we have this discussion on Discord, but we will probably not support this, atm, since Dataview is not an official Obsidian plugin.

But feel free to write a plugin for quartz if you want this.

Dataview is currently very tightly coupled with Obsidian. Parsing Dataview queries outside of Obsidian is nearly impossible without reimplementing the entire parser, as Dataview uses a lot of build-in Obsidian functionality, which in turn is closed-source.

The easiest way to circumvent this is by parsing the queries in Obsidian through a plugin, before passing it to Quartz as markdown.

saberzero1 avatar Feb 28 '24 10:02 saberzero1

I personally worked around this by using a plugin to parse the Dataview queries before uploading to my Quartz repository. You can check it out here.

This may be a foolish question, but I don't see anything on that plugin about being able to parse Dataview queries. Is that just a feature that is built into the plugin, but not mentioned anywhere?

https://github.com/saberzero1/quartz-syncer/blob/main/src/compiler/DataviewCompiler.ts

I'll update the documentation.

I think we have this discussion on Discord, but we will probably not support this, atm, since Dataview is not an official Obsidian plugin. But feel free to write a plugin for quartz if you want this.

Dataview is currently very tightly coupled with Obsidian. Parsing Dataview queries outside of Obsidian is nearly impossible without reimplementing the entire parser, as Dataview uses a lot of build-in Obsidian functionality, which in turn is closed-source.

The easiest way to circumvent this is by parsing the queries in Obsidian through a plugin, before passing it to Quartz as markdown.

hi, just wondering how do i make the dataview compiler work? thanks in advance!

azurast avatar Mar 23 '24 23:03 azurast