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 175
    • Issues 175
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 39
    • Merge Requests 39
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Antora
  • AntoraAntora
  • Issues
  • #132

Closed
Open
Opened Jan 29, 2018 by Dan Allen@mojavelinuxOwner

Allow a component to be promoted to the site root

There are two goals we want to accomplish:

  • Provide a start page / entry point for the site
  • Hide the component folder for a component, often when the site only has a single component

Add configuration to the playbook that allows a component to be promoted to the root of the site. This simply means that the path segment for the component is dropped from the URL. In other words, /my-component/index.html becomes /index.html. We'll call this the site component.

NOTE: None of the source-to-source references to this component change. This only affects how the publication URL is computed.

The proposed configuration is as follows:

site:
  component: my-component

The only caveat is that, in order for the site component to occupy the root of the site, it must be versionless (or have a versionless entry). Otherwise, /my-component/1.0/index.html just becomes /1.0/index.html. To solve this problem, we may also allow the version to be specified:

site:
  component: 1.0@my-component

In this case, /my-component/1.0/index.html would become /index.html. So it's really promoting a single component version. But what about the other versions of that component? Do they get promoted at all?

Another way to think about it is to have a start page for the site, which defaults to the start page for the greatest version of the site component. In other words:

site:
  component: my-component
  # if not defined here, use the start page for the greatest version of site component
  start_page: 1.0@my-component::index.adoc

So when the visitor navigates to the docs domain, the visitor is redirected automatically to the start page (/index.html -> /1.0/index.html).

Edited Jan 29, 2018 by Dan Allen
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
TBD
Milestone
TBD
Assign milestone
Time tracking
None
Due date
None
Reference: antora/antora#132