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

Fixes #37434 - Use nightly for develop manual links #10155

Merged
merged 1 commit into from
May 17, 2024

Conversation

ekohl
Copy link
Member

@ekohl ekohl commented May 10, 2024

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.

@@ -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
Copy link
Member

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?

Copy link
Member Author

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.
@evgeni evgeni force-pushed the 37434-use-nightly-for-manuals branch from 45a710e to 86f2bfe Compare May 17, 2024 12:49
@evgeni
Copy link
Member

evgeni commented May 17, 2024

@ekohl I took the liberty to refactor this :)

Copy link
Member

@evgeni evgeni left a 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.

evgeni added a commit to theforeman/foreman-infra that referenced this pull request May 17, 2024
Foreman correctly generates "nightly" links since theforeman/foreman#10155
@evgeni evgeni merged commit 0f9352a into theforeman:develop May 17, 2024
53 checks passed
@ekohl ekohl deleted the 37434-use-nightly-for-manuals branch May 17, 2024 14:05
@ekohl
Copy link
Member Author

ekohl commented May 17, 2024

@ekohl I took the liberty to refactor this :)

Thanks!

ekohl pushed a commit to theforeman/foreman-infra that referenced this pull request May 17, 2024
Foreman correctly generates "nightly" links since theforeman/foreman#10155
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants