Obsidian Publish support for plugins

Currently, the only way of getting the output from the preview window of a markdown file into Obsidian Publish is by compiling it manually to HTML and upload that HTML instead of publishing the Markdown file + any potential plugin output.

What would be great, would be for the Obsidian API to include new events/methods that allows plugins to expose functionality on how to compile themselves to HTML, that the Obsidian Publish plugin can then use to include the output when publishing a website.

This would make plugins like Dataview, Templater and many others able to be used together with Obsidian Publish too, which would open up completely new use cases for both Obsidian and the plugins.