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

Implement the releases as a data source #2845

Merged
merged 2 commits into from
May 31, 2024
Merged

Conversation

ekohl
Copy link
Member

@ekohl ekohl commented Feb 28, 2024

Previously there was one huge file for all the versions in the navigation. In addition to that, there were individual release pages. This was difficult to maintain.

The new way uses Nanoc data sources to essentially act as a database. Based on that, the various release pages are generated from a single source. For that, guides are identified by tags so they can be renamed without affecting the website. The releases on the index page are also generated.

That allows easy copying when a release is branched and provides an easy overview which builds belong to which release.

There is still some room for improvement. A lot of content in the release file overlaps with the content in guides. If it could be extracted from guides, that would reduce maintenance even further.

This is a more native way of implementing #2840. The primary benefit is that it's aware of the release files and pages are live rerendered when a change is made.

This is a draft because not all release have implemented the tags.

Please cherry-pick my commits into:

  • Foreman 3.10/Katello 4.12
  • Foreman 3.9/Katello 4.11 (planned Satellite 6.15)
  • Foreman 3.8/Katello 4.10
  • Foreman 3.7/Katello 4.9 (Satellite 6.14)
  • Foreman 3.6/Katello 4.8
  • Foreman 3.5/Katello 4.7 (Satellite 6.13; orcharhino 6.6/6.7)
  • Foreman 3.4/Katello 4.6 (EL8 only)
  • Foreman 3.3/Katello 4.5 on EL7 & EL8 (Satellite 6.12 on EL8 only; orcharhino 6.4/6.5 on EL8 only)
  • We do not accept PRs for Foreman older than 3.3.

@ekohl ekohl marked this pull request as draft February 28, 2024 19:14
Copy link

github-actions bot commented Feb 28, 2024

The PR preview for 79ca6d3 is available at theforeman-foreman-documentation-preview-pr-2845.surge.sh

The following output files are affected by this PR:

show diff

show diff as HTML

@ekohl
Copy link
Member Author

ekohl commented Feb 28, 2024

This is a draft because not all release have implemented the tags.

And in addition to that: the release pages also contain links to guides with similar names. The links on overview are also broken. But I'm calling it a day.

@ekohl ekohl marked this pull request as ready for review March 11, 2024 16:30
@ekohl
Copy link
Member Author

ekohl commented Mar 11, 2024

I have dropped the dynamic per-release page and moved to static pages. fb3e7f9 is a commit I wrote that does it mostly, but I'm not happy with it yet and I don't want to block the whole effort on it.

Please take a look and let me know what you think.

Copy link
Contributor

@Lennonka Lennonka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Brilliant, I love it!
Not sure I'm qualified to comment on the code.
Have you tested it locally?

Copy link
Contributor

@maximiliankolb maximiliankolb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Ewoud!

I had a look at the adoc and json files; they look sane to me. If you feel confident, please merge and let's try it out!

web/releases/3.8.json Outdated Show resolved Hide resolved
web/releases/3.7.json Show resolved Hide resolved
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.

needs a rebase after 967b8c8 but otherwise 👍

@maximiliankolb maximiliankolb added the Waiting on contributor Requires an action from the author label May 16, 2024
Some rules are now recursive or use a more concise syntax, making it
easier to understand what's going on.
README.md Outdated Show resolved Hide resolved
@ekohl
Copy link
Member Author

ekohl commented May 29, 2024

Updated the README to change the nightly.json and nightly.adoc files. Also added katello to nightly.json so on branching you only need to update the value instead of adding a line.

Previously there was one huge file for all the versions in the
navigation. In addition to that, there were individual release pages.
This was difficult to maintain.

The new way uses Nanoc data sources[1] to essentially act as a database.
Based on that the various release pages are generated from a single
source. For that, guides are identified by tags so they can be renamed
without affecting the website. The releases on the index page are also
generated.

That allows easy copying when a release is branched and provides an easy
overview which builds belong to which release.

There is still some room for improvement. A lot of content in the
release file overlaps with the content in guides. If it could be
extracted from guides, that would reduce maintenance even further.

[1]: https://nanoc.app/doc/data-sources/
@evgeni evgeni merged commit d5fd29d into theforeman:master May 31, 2024
7 of 8 checks passed
@ekohl ekohl deleted the data-sources branch May 31, 2024 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants