Process aliases found in files collection at end of classifyContent
Some extensions, such as Atlas, need to define an alias before pages are added to the content catalog. The content classifier should recognize these entries and set them up properly.
When an alias is created, it creates an object reference to the virtual file of a page. This reference is stored in the rel
property of the alias' virtual file. Antora should allow an alias to be defined without the rel
property (or, at least, enough of rel
to satisfy ContentCatalog#addFile
). That file would include a ref
property somewhere, perhaps rel.ref
. The content classifier will transform this reference into an object reference after all pages are added. In other words, it would be a deferred assignment.
When this would happen is just before the site start page is registered.
Here's how an alias entry would look:
{
out: undefined,
path: 'modules/ROOT/pages/the-alias.adoc',
src: { component: 'acme', version: '1.0', module: 'ROOT', family: 'alias', relative; 'the-alias.adoc' },
pub: { url: '/acme/1.0/the-alias.html' },
rel: {
src: {},
ref: 'the-page.adoc',
},
}
Now an extension can define an alias at this stage without having to do any heavy lifting (such as parsing the value of the ref
property).
Open question: Should the information be rel: 'the-page.adoc'
? (Probably yes?)