Pass down page ID properties to AsciiDoc document
Pass down the page ID properties to the AsciiDoc document as document attributes. This allows the document to be reference its own identity, such as the version of the component to which the document belongs.
Consider passing the following information:
- component name
- component version
- module name
- edit URL
- origin information such as repository and ref?
We'll need to ensure that these attributes do not overwrite / conflict with existing attributes in the document. Therefore, they should be namespaced. To remain consistent with existing attribute names used in the integration, consider using the page-
prefix.
- page-component - name of component to which page belongs
- page-version - version of component to which page belongs
- page-module - name of module to which page belongs
- page-edit-url - the URL for editing the page
- page-origin-type - the type of the origin from which the page was sources (e.g., git)
- page-origin-branch / page-origin-tag - the name of the reference from which the page was sourced
- page-origin-worktree - set if the page was taken from the worktree
We should consider whether we want to expose the page-origin-
properties. Generally, the content in the pages should be agnostic to its origin. But there may be times when having this information is essential to accomplishing a use case and we don't have any particular reason to keep it hidden.