-
Notifications
You must be signed in to change notification settings - Fork 994
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
Fixes #37434 - Use nightly for develop manual links #10155
Fixes #37434 - Use nightly for develop manual links #10155
Conversation
app/controllers/links_controller.rb
Outdated
@@ -54,7 +54,8 @@ def foreman_org_path(sub_path) | |||
end | |||
|
|||
def documentation_url(section = "", options = {}) | |||
root_url = options[:root_url] || foreman_org_path("manuals/#{SETTINGS[:version].short}/index.html#") | |||
version = SETTINGS[:version].tag == 'develop' ? 'nightly' : SETTINGS[:version].short |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already have
version = SETTINGS[:version].tag == 'develop' ? 'nightly' : SETTINGS[:version].short |
Time to it to become a real method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about it too and will update.
Foreman has for the longest time had https://theforeman.org/manuals/$next redirect to https://theforeman.org/manuals/nightly in our Apache configuration. This means that on every branching we need to modify this. It also doesn't play well with caching and using pure static webservers. If Foreman uses nightly as the version, this whole redirect is no longer needed.
45a710e
to
86f2bfe
Compare
@ekohl I took the liberty to refactor this :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would ack this if I'd not have touched the code.
Foreman correctly generates "nightly" links since theforeman/foreman#10155
Thanks! |
Foreman correctly generates "nightly" links since theforeman/foreman#10155
Foreman has for the longest time had
https://theforeman.org/manuals/$next
redirect tohttps://theforeman.org/manuals/nightly
in our Apache configuration. This means that on every branching we need to modify this. It also doesn't play well with caching and using pure static webservers.If Foreman uses nightly as the version, this whole redirect is no longer needed.