Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add instructions for creating a redirect #3615

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 21 additions & 0 deletions CONTRIBUTING.adoc
Expand Up @@ -440,6 +440,27 @@ presentations and links to documentation. A page "Jenkins for C/C++" would
still be relatively specific, and could easily include a section for Visual
C++/Windows specific content.

==== Adding a Redirect page

Sometimes we need a page in the site that automatically redirects us to another page.
Common cases for a page redirect include:

Links from core or a plugin to commonly requested information::
The Jenkins 'reverse proxy configuration' page or the 'How to report an issue' page.
Jenkins includes a hyperlink to a specific jenkins.io page and the jenkins.io page redirects to the preferred location.
The preferred location can be changed without modifying the sofware that includes the hyperlink.

Page replacement or removal::
Sometimes a page needs to be moved or removed.
When the user opens the moved page, the redirect automatically opens the new location.
When the user opens the removed page, the redirect can take them to a different location or to the `/404/index.html` "not found" page

Redirects are implemented with a `layout: redirect` and the property `redirect_url` assigned the URL to the destination of the redirect.
Redirects can be placed in any of the content locations (like `projects/` and `docs/`).
Redirects that need a shorter link are created by convention in the `content/redirect/` folder

Oleg Nenashev has provided a link:https://youtu.be/-cGeb2wtg4I[brief video tutorial] that shows how to create and test a redirect with jenkins.io.

==== Moving documentation from Jenkins Wiki

The Jenkins project is moving documentation pages from the link:https://wiki.jenkins.io[Jenkins Wiki] to link:https://jenkins.io[www.jenkins.io].
Expand Down