-
Notifications
You must be signed in to change notification settings - Fork 90
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
Split proc_configuring-repositories.adoc into several files #3123
Conversation
The PR preview for a66f856 is available at theforeman-foreman-documentation-preview-pr-3123.surge.sh The following output files are affected by this PR: |
87e8a0d
to
cedf82d
Compare
After fixing one mistake, you can now see that the diff is empty. Just as intended. |
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.
Please rename the file to a) use "snip_" as prefix because the files don't contain any heading; and b) maybe use the build target in the file name: example: snip_configuring-repositories-katello.adoc
. Then, you can always, without any ifdef
macro, include snip_configuring-repositories-{build}.adoc
similar to https://github.com/theforeman/foreman-documentation/blob/master/guides/common/attributes.adoc?plain=1#L51
guides/common/modules/proc_configuring-upstream-rpm-repositories.adoc
Outdated
Show resolved
Hide resolved
guides/common/modules/proc_configuring-satellite-repositories.adoc
Outdated
Show resolved
Hide resolved
I'm not a huge fan of the idea to split off intros from procedure modules. As far as contributor experience goes, that's a change for the worse. Then again, I'm not a fan of splitting off assembly introductions into separate files either, and I still found a way to live with that, so... :) The idea behind modularity is to enable reuse -- so you're supposed to split off "reusable" pieces of content, pieces that can stand on their own and that make sense on their own[1]. Because you can't reuse [1] "A module must make sense and provide value on its own, even when read separately from the other modules. The templates included in this manual help ensure this." |
I agree
While it's true, there is also a point of maintainability. In effect the modules really aren't reusable between build flavors (except Another way we could structure it is to create Then [id="configuring-repositories_{context}"]
= Configuring repositories
include::modules/proc_configuring-repositories-{build}.adoc[] |
3e87c57
to
0927f17
Compare
Updated as discussed. |
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 have kept the procedure and used a snippet snip_configuring-repositories-{build}.adoc
instead. For now, we don't nest assemblies AFAIK and I'd like to keep it like this. However, I don't want to block this PR either.
Also unrelated: I don't like the current way of using level 2 headings ... Again, not blocking your PR.
What do you think Anet and Avital?
Yesterday during the meeting it was mentioned that was can be allowed. I interpreted it as something we can do. But I'm fine with refactoring. |
I might not know what others mean by nested assemblies, but I can see plenty of them. One example: 13.3. Using repository sources. So basically anything like ASSEMBLY 3. I'm not a fan, but I haven't been able to provide reasons for avoiding them that people who are fans would consider valid. (Yet. I'm not giving up.) |
I was wrong: |
GHA fail: asciidoctor: ERROR: common/assembly_configuring-repositories.adoc: line 4: include file not found: /home/runner/work/foreman-documentation/foreman-documentation/guides/doc-Configuring_Load_Balancer/common/modules/proc_configuring-repositories-katello.adoc |
0927f17
to
25dd59e
Compare
Solved with a symlink |
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.
one tiny suggestion. No diff in rendered HTML is exactly what we expect. So LGTM 👍
The procedure to enable repositories is very specific to every build flavor. Trying to squeeze this into a single file makes it very complicated. This makes maintenance easier and doesn't really duplicate that much. It effectively transforms the repository setup to an assembly that can be included.
25dd59e
to
a66f856
Compare
The procedure to enable repositories is very specific to every build flavor. Trying to squeeze this into a single file makes it very complicated. This makes maintenance easier and doesn't really duplicate that much.
This PR is split off from #3104 to verify it's just an internal refactor and doesn't have any impact on the resulting guides. It may also be easier to review this standalone, but I'll leave that up to others.
Please cherry-pick my commits into: