Add file property to UI model of page
To make writing templates easier, Antora summarizes information about the page's virtual file into a UI model (e.g., page.url, page.attributes, etc) assigned to the page variable. (See https://docs.antora.org/antora-ui-default/templates/#template-variables) However, there are times when access to the original (i.e., complete) virtual file is needed. For example, the UI template may need access to the full set of AsciiDoc document attributes or it may need to access a property added by an extension.
To access the virtual file currently requires using a helper to look up the current page in the content catalog and turning off the UI modeler:
{{#with (resolvePage page.relativeSrcPath model=false)}}
{{/with}}
This call could be drastically simplified by attaching the virtual file to the file property on the page UI model.
{{#with page.file}}
{{/with}}
This property might be used to access the full set of AsciiDoc document attributes of a page:
{{#unless page.file.asciidoc.attributes.stem undefined}}
<insert mathjax script here>
{{/unless}}
The assignment of the virtual file complements the reference to the page's component version, which is assigned to the componentVersion property (and similarly, component).