cooklang / cooklang-obsidian

Edit and display CookLang recipes in Obsidian
MIT License
204 stars 16 forks source link

.cook files not appearing in dataview results #7

Open RichSteele opened 2 years ago

RichSteele commented 2 years ago

I have a simple query to return all recent changes in my vault:

LIST FROM #source-notes AND "notes"
WHERE status = "in-progress"
SORT file.name

However, .cook files are not returned from it. Guessing that dataview works from the cache and so the cooklang plugin needs to somehow inform either dataview or the cache of its files.

deathau commented 2 years ago

There isn't any official API to add files into the cache, and from my digging there doesn't seem to be an unexposed one, either. It seems like there's a hard-coded list of extensions that Obsidian allows into the cache and that's it.

Options:

  1. Introduce support for .cook.md files (with appropriate conversion utilities) in order to allow them into the cache as .md files (which breaks compatibility with anything else using CookLang). Discussion here: https://github.com/deathau/cooklang-obsidian/discussions/10
  2. Petition @lishid to create some third-party way of plugins adding custom file extensions into the cache.
lishid commented 2 years ago

Hmm I can try adding extensions for hooked plugin types into the cache extension list.