You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: contributing_to_docs/doc_guidelines.adoc
+66Lines changed: 66 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -457,6 +457,72 @@ If it makes more sense in context to refer to the major version of the product i
457
457
Other common attribute values are defined in the `modules/common-attributes.adoc` file. Where possible, generalize references to those values by using the common attributes. For example, use `{console-redhat-com}` to refer to Red Hat OpenShift Cluster Manager.
458
458
====
459
459
460
+
[id="conditional-content"]
461
+
== Conditional content
462
+
463
+
You can use ifdef and ifeval statements to control the way content displays in different distributions and assemblies.
464
+
465
+
NOTE: You can nest conditional statements that involve distribution and assembly context, but you must ensure that you close the if statements correctly.
466
+
467
+
Because we maintain separate branches for each OpenShift Container Platform version, do not use if statements that are based on product version to vary content.
468
+
469
+
[id="conditionals-for-distributions"]
470
+
=== Conditionals for distributions
471
+
472
+
Use ifdef and ifndef statements to control content based on distribution, as described in the previous section. For example, the following example renders differently in (`openshift-origin`) and OpenShift Container Platform (`openshift-enterprise`):
473
+
474
+
----
475
+
\ifdef::openshift-origin[]
476
+
You can link:https://www.keycloak.org/docs/latest/server_admin/index.html#openshift[configure a Keycloak] server as an OpenID
477
+
Connect identity provider for {product-title}.
478
+
\endif::[]
479
+
480
+
\ifdef::openshift-enterprise[]
481
+
You can
482
+
link:https://access.redhat.com/documentation/en-us/red_hat_single_sign-on/[configure Red Hat Single Sign-On]
483
+
as an OpenID Connect identity provider for {product-title}.
484
+
\endif::[]
485
+
----
486
+
487
+
In OKD, this section renders as the following text:
488
+
489
+
> You can link:https://www.keycloak.org/docs/latest/server_admin/index.html#openshift[configure a Keycloak] server as an OpenID
490
+
Connect identity provider for OKD.
491
+
492
+
In OpenShift Container Platform, this section renders as the following text:
493
+
494
+
> You can
495
+
link:https://access.redhat.com/documentation/en-us/red_hat_single_sign-on/[configure Red Hat Single Sign-On]
496
+
as an OpenID Connect identity provider for OpenShift Container Platform.
497
+
498
+
499
+
[id="conditionals-for-assemblies"]
500
+
=== Conditionals for different assemblies
501
+
502
+
Use a combination of ifdef and ifeval statements to control content that needs to vary between assemblies. These conditional statements rely on a combination of the the context attribute for each assembly and specific temporary attributes within each module to control content.
503
+
504
+
The following sample shows a simple example. In the assembly that contains the `context` attribute `updating-restricted-network-cluster`, an extra paragraph is displayed.
Note that you must set and unset each temporary attribute that you introduce to an assembly. Use the temporary attributes in the applicable ifdef and ifndef statements to vary text between the assemblies. The preceeding example uses `restricted` as the temporary attribute to display an additional paragraph for the assembly with the `updating-restricted-network-cluster` context attribute.
525
+
460
526
== Node names
461
527
462
528
Do not use internal company server names in commands or example output. Provide generic OpenShift Container Platform node name examples that are not provider-specific, unless required. Where possible, use the example.com domain name when providing fully qualified domain names (FQDNs).
0 commit comments