I have to reorganize a documentation from a flat-file structure (all adoc files in one directory) to subdirectory structure. But instead of leaving a 404 behind a would like to make an automatic redirection:
./pages/somefile.adoc → ./pages/subdir/somefile.adoc
For wiki pages there is a macro which does a redirection. Can I do something like that in Antorra as well? Something like
<head>
<meta http-equiv='refresh' content='0; URL=/subdir/newaddress.adoc/'>
</head>
<body>
<p>Page moved to <a href="/subdir/newaddress.adoc">tsubdir/newaddress.adoc</a>.</p>
</body>
The only thing to remember is the alias definition goes on the new page, not the old one.
Using your provided example:
pages/somefile.adoc is deleted
and in pages/subdir/somefile.adoc, you add the :page-aliases: directive.
Something like:
= Fedora Server Installation Guide
Peter Boy; Kevin Fenzi; Jan Kuparinen
:page-authors: {author}, {author_2}, {author_3}
:page-aliases: pages/installation-an-introduction.adoc
Right, sorry, my example was not the best one.
The aliases syntax uses the same rules as a standard xref link.
Long story short, you don’t need the pages/ part since this is the default location for antora to look at adoc documents.
Your current alias is still valid, but for this url (notice the extra /pages/): https://docs.stg.fedoraproject.org/en-US/fedora-server/pages/installation-an-introduction/