Emit the file URI where the site can be previewed offline
When an author runs the antora
command in a terminal, it would be helpful if the command showed the URL where the author can go to preview the site offline. Otherwise, the author is left feeling a bit lost as to where the files ended up and how to get to them.
$ antora site.yml
You can view your site offline at file:///path/to/docs-site/build/site
This information should not be printed if the quiet or silent flag is set, or stdout is not a TTY (not a desktop terminal).
The challenge with implementing this feature is making the information about where the files were published available (either to the site generator or to the CLI).
I think we should change the return value of the publishSite function as well as the destination provider function. The destination provider function should return a report, which is an object that describes where the files were written (and, perhaps in the future, which files were written). The publishSite function should then return an array of these reports. (Currently, the publishSite function returns undefined).
The publish report would mirror the destination object, except it can have additional fields. Here's an example of an fs report:
{
provider: 'fs',
path: '/absolute/path/to/output/dir',
url: 'file:///absolute/path/to/output/dir',
}
With this information, we can then add a report to the end of the site generator that shows the URL of the first fs destination (or all of them).