Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
Antora
Antora
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 172
    • Issues 172
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 35
    • Merge Requests 35
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Antora
  • AntoraAntora
  • Issues
  • #220

Closed
Open
Opened Mar 31, 2018 by Dan Allen@mojavelinuxOwner

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).

Edited Mar 30, 2020 by Dan Allen
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
M2
Milestone
M2
Assign milestone
Time tracking
None
Due date
None
Reference: antora/antora#220