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
  • #191

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

Allow static redirect page to be customized using a UI template

Allow the static redirect page to be customized using a Handlebars template loaded from the UI bundle.

Currently, the template used to generate a static redirect page for an alias (when the redirect facility is static) is baked in. Here's the contents of that template:

<!DOCTYPE html>
<meta charset="utf-8">${canonicalLink}
<script>location="${relativeUrl}"</script>
<meta http-equiv="refresh" content="0; url=${relativeUrl}">
<meta name="robots" content="noindex">
<title>Redirect Notice</title>
<h1>Redirect Notice</h1>
<p>The page you requested has been relocated to <a href="${relativeUrl}">${canonicalUrl || relativeUrl}</a>.</p>

However, site authors may want to be able to control the content of this page. The redirect producer should look for a template named redirect.hbs in the UI bundle and, if present, use it instead.

The UI model for this template should be as follows:

url - the absolute URL path to the target page
relativeUrl - the relative URL path to the target page
canonicalUrl - the fully-qualified redirect URL; only set if the playbook defines site.url
redirectFacility - the facility that provides the redirect behavior

We may want to use the template even when the redirect facility is not static. This would allow the site author to control how the rewrite rules are generated. The template would be able to differentiate between the facility by consulting the redirectFacility template variable. If necessary, this part can be moved to a separate issue.

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#191