Headers generated with dataviewjs not shown in outline

Sorry for the late response, but the gist of the combined approach is this:

  • Mark the query within a comment block (or similar)
  • Make a Templater command which:
    • Reads that query block
    • Executes the query (through Dataview)
    • Replaces, if present, the previous result block

Given that Templater command, you would now be able to re-run the query whenever you feel like it, and it’ll replace the query result with the latest run of the query, and it’ll populate the metadata of links, backlinks, and so on as if it were written statically in the note itself.

The link below discusses this approach in slightly more detail, but it’s still very much a work-in-progess kind of deal.