Skip to content

Option to show up- and downstream source links

After internal discussion, we realized that for downstream derivatives of the Apertis website (e.g. Apertis pro), it makes sense to always present a link to the downstream pages source (i.e. of the "View/Edit in GitLab" link at the bottom of the page). Even if the page comes directly from upstream, the link should point to the downstream source, stating however in this case, that the page originates from upstream (accompanied with a link to the respective sources upstream).

There are two reasons for doing so:

  • it becomes clear where the user should make their contributions (for upstream pages, contributions should first be reviewed by e.g. the Apertis pro team)
  • it's easier to distinguish between pages coming directly from upstream and pages that only exist downstream

For downstream derivatives of the Apertis website, this commit therefore introduces the option to show links to the downstream and upstream page source simultaneously

This commit is an improvement of commit #46701896 and #feeb6eea

Feature summary:

  • for clarity altSourceLink variable is renamed to downstreamSourceLink
  • for clarity useAltSourceLink is renamed to isDownstreamPage
  • if downstreamSourceLink is set (in config.toml), the "View/Edit in GitLab" automatically redirects to the downstream page source (as defined by downstreamSourceLink)
  • if downstreamSourceLink is set and isDownstreamPage is NOT set to true (in a page's front matter), an additional "Upstream Page Source" link to the upstream page source is shown next to the "View/Edit in GitLab" link

Signed-off-by: Sietze van Buuren Sietze.vanBuuren@de.bosch.com

Edited by Sietze van Buuren

Merge request reports