jackyzha0 / quartz

🌱 a fast, batteries-included static-site generator that transforms Markdown content into fully functional websites
https://quartz.jzhao.xyz
MIT License
6.88k stars 2.48k forks source link

Support for Dataview JS Snippets #102

Open therealfakemoot opened 2 years ago

therealfakemoot commented 2 years ago

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?

geoffreygarrett commented 2 years ago

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

pranavm7 commented 2 years ago

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!

pablillocea commented 1 year ago

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

jackyzha0 commented 12 months ago

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

deeplook commented 8 months ago

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.

aarnphm commented 8 months ago

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.

saberzero1 commented 7 months ago

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.

HyperEpsilon commented 7 months ago

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?

aarnphm commented 7 months ago

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.

saberzero1 commented 7 months ago

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.

azurast commented 6 months ago

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!

Quasaur commented 4 months ago

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.

It looks like GitHub Publisher, referred to in this YouTube Short (https://www.youtube.com/shorts/gXgW0EL1ko0) has VANISHED...!?!?!?!?

saberzero1 commented 4 months ago

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.

It looks like GitHub Publisher, referred to in this YouTube Short (https://www.youtube.com/shorts/gXgW0EL1ko0) has VANISHED...!?!?!?!?

It appears the GitHub Publisher for Obsidian has been renamed to Enveloppe, see below for details.

https://github.com/orgs/Enveloppe/discussions/349