-
Notifications
You must be signed in to change notification settings - Fork 86
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
Conversation
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: |
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. |
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. |
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.
Brilliant, I love it!
Not sure I'm qualified to comment on the code.
Have you tested it locally?
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.
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!
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.
needs a rebase after 967b8c8 but otherwise 👍
Some rules are now recursive or use a more concise syntax, making it easier to understand what's going on.
Updated the README to change the |
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/
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: