Search in rendered templates

Currently, when I search within a page (or across pages) it only searches the actual contents of the md files, however, some of my pages are almost entirely templates - would it be feasible/a good idea to offer a different type of search, or a search option (obviously you can’t replace on template output) but that would allow you to search through template output instead of the raw page data?

Leaving aside implementation challenges, isn’t your template output very derivative? Meaning: just a curation of content elsewhere in your space where search would find it anyway?

Yes and no - in theory the point of templates is to aggregate, filter, and process and sort (for example all of the undone tasks in my space. And potentially modify or transform some things. In many cases a space-wide search would work, but literally finding a string in the rendered DOM would be nice,

1 Like

I would be happy with a similar feature as well. I think it’d be useful to be able to search on the page in a rendered template, but it’d also be useful to view the rendered template outside of SB.

E.g. I could have a page that uses a bunch of queries to output a list of tasks from other pages, and then I could find that .md file on my disk and copy/paste it somewhere else or share it/etc.

I have no idea how it would work implementation-wise, but what I’m thinking of is similar to how org-mode and org-babel handle rendering output below a code block.

I found the thread :sweat_smile:

1 Like

Just finished Baking Live Queries, which could help with that. But if you want to keep both the live query and its contents simultaneously, I’m not sure how to approach it best.

You can’t have your cake and eat it too

Why, oh why didn’t I put it into documentation for baking :sob:

2 Likes