Rendering DataView Queries Results on GitHub Pages

Things I have tried

Hi, I’m new to Obsidian but really enjoying it. I’m currently hosting my vault online with GitHub pages. I’m using the obsidian-mkdocs template for that. I also want to be able to show the results of DataView queries (e.g. list or tables of posts) on the GitHub pages. I’ve tested some basic queries but they only work on my local machine. On GitHub pages they render as code snippets.


Local Results

Results on GitHub pages

What I’m trying to do

Assuming it isn’t possible to have the client run the queries dynamically, is there a simple way of converting the query outputs from my local machine to similarly rendered markdown with working links (i.e. not just saving a screenshot)?

I don’t know how GitHub Pages works or similar.

But it’s logic that plugins don’t work outside Obsidian. You can see also a lot of complains /request to plugins work for Obsidian Publish.

Considering only the way to capture the rendered results, why not a copy of the html code? For example, if you create a table with dataview you can open the dev. tools and target the wanted table.

Then you can copy all the “div” that contains your table and “paste” the html code directly in your note.

When in preview mode, your “html” table becomes a similar dataview table.

This works inside Obsidian. I don’t know the behavior of the links in GitHub pages.

Thanks for the response. For anyone who looks at this copying the DIV element does work within Obsidian. Dev tools can be accessed using ‘CTRL-SHIFT-I’ Or ‘Option-cmd-i’ on mac. The tables made from the copied HTML do render on GitHub pages (see image). However, the page links don’t currently get converted to the correct URL for the corresponding page on the published website e.g. the note Concepts/Creative in the docs folder is found at Concepts/Creative%20Commons/ on GitHub pages but the links in the list and tables created from HTML DIVs point to Following the links go to a 404 Error page. Another limitation of the process is that the DIVs also have to be recopied whenever the table changes. However, I think I will try logging it as an issue on the obsidian-mkdocs repository in case the developer finds value in supporting DataView.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.