jobindjohn / obsidian-publish-mkdocs

A Template to Publish Obsidian/Foam Notes on Github Pages (uses MkDocs)
Creative Commons Zero v1.0 Universal
524 stars 37 forks source link

DataView support in obsidian-mkdocs #6

Open virtualarchitectures opened 2 years ago

virtualarchitectures commented 2 years ago

Hi,

As DataView is one of the most widely downloaded Obsidian plugins, is it viable to incorporate support into the the obsidian-mkdocs conversion template (either workaround or full solution?

I recently raised a request on the Obsidian forum about rendering DataView lists and tables on GitHub pages created with obsidian-mkdocs. See Rendering DataView Queries Results on GitHub Pages.

A workaround was proposed by opening the Developer Tools within Obsian and copying DIVs for the DataView lists and tables into the note. When the Vault is converted to GitHub pages the DataView lists and tables created from the copied DIVs render (see image), but the links don't point to the correct pages on GitHub. Clicking the links go to a 404 Error holding page.

In testing I found that the note Concepts/Creative Commons.md in the docs folder is found at <GitHubPageBaseURL>/<VaultName>/Concepts/Creative%20Commons/ on GitHub pages, but the links appearing in my converted list and tables created from HTML DIVs point to <GitHubPageBaseURL>/<VaultName>/<OriginNoteName e.g. DataView%20Test>/docs/Concepts/Creative%20Commons.md. The target url would need the <OriginNoteName>/docs/ string and .md file extenstion removed in order to work. Could this be automated?

image

ghost commented 2 years ago

Following