Skip to content

Commit 292e21e

Browse files
Review 'contribution guide' in CONTRIBUTING.md (#4294)
* Introduce the purpose of style guide * Remove redundant code conventions * Review conventions --------- Co-authored-by: Maximilian Kolb <[email protected]>
1 parent c0b3e8f commit 292e21e

File tree

1 file changed

+25
-26
lines changed

1 file changed

+25
-26
lines changed

CONTRIBUTING.md

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ If you need help to get started, open an issue, ask the docs team on [Matrix](ht
66

77
As a contributor, I will:
88

9-
* Familiarize myself with the [Pull Request Checklist](#Pull-Request-Checklist) and [Foreman documentation minimalist style guide](#Foreman-documentation-minimalist-style-guide).
9+
* Familiarize myself with the [Pull Request Checklist](#Pull-Request-Checklist) and [Foreman documentation conventions guide](#Foreman-documentation-conventions-guide).
1010
* Open additional issues if my contribution is incomplete.
1111
* Put in my best effort to ensure that my contribution does not worsen the state of any build target.
1212
For example, this might include reviewing how my changes affect upstream build targets even when working on behalf of a downstream product.
@@ -59,39 +59,41 @@ Each PR should undergo style review.
5959
* [ ] The PR conforms with the team's style guidelines.
6060
* [ ] The PR introduces documentation that describes a user story rather than a product feature.
6161

62-
## Foreman documentation minimalist style guide
62+
## Foreman documentation conventions guide
63+
64+
The `Foreman documentation conventions guide` describes guidelines specific to working on Foreman documentation.
65+
It complements, but should not duplicate, the following resources:
66+
67+
* The AsciiDoc and RedHat style packages for the Vale linter.
68+
See [Vale for writers at Red Hat](https://redhat-documentation.github.io/vale-at-red-hat/docs/main/user-guide/introduction/).
69+
* [Red Hat supplementary style guide for product documentation](https://redhat-documentation.github.io/supplementary-style-guide/)
6370

6471
### Code conventions
6572

6673
Use the following markup conventions:
6774

68-
* Source files use UTF-8 character encoding.
69-
* Source files use [AsciiDoc](https://docs.asciidoctor.org/asciidoc/latest/) syntax.
70-
* A single line only contains one sentence.
71-
Please do not wrap lines by hand.
72-
This makes `git diff` much easier to read and helps when reviewing changes.
73-
* No trailing whitespace on lines and in files.
75+
* Use UTF-8 character encoding in source files.
76+
* Do not add trailing whitespace on lines and in files.
77+
Some editors can help with this.
78+
For example, VS Code has multiple settings related to handling whitespaces.
7479
Whitespace after partial files has to be handled in the file using the `include::` directive.
75-
* User input is surrounded by underscores (`_`) to indicate variable input, for example, `hammer organization create --name "_My Organization_" --label "_my_organization_"`.
76-
* Links to different guides are followed by the title of the guide in italics, for example `in _{ManagingHostsDocTitle}_`.
80+
* Surround user input with underscores (`_`) to indicate variable input, for example, `hammer organization create --name "_My_Organization_"`.
7781

7882
### Images
7983

80-
Each guide must have an `images/` subdirectory with `images/common` symlink into the `common/images/` directory.
81-
Images local to the guide shall be kept in the `images/` directory.
82-
Images which are supposed to be reused across guides shall be kept in the `images/common/` directory.
83-
Subdirectories can be created and are actually recommended.
84+
Each guide directory contains an `images/` subdirectory with `images/common` symlink into the `common/images/` directory.
8485

85-
To insert an image, use `image::common/global_image.png` or `image::local_image.png`.
86+
* Save images local to the guide to the `images/` directory.
87+
* Save images which are supposed to be reused across guides to the `images/common/` directory.
8688

87-
You should create upstream diagrams using [diagrams.net](https://www.diagrams.net/).
89+
You can create upstream diagrams using [diagrams.net](https://www.diagrams.net/).
8890
Place the editable diagram in `drawio` format in `guides/image-sources/`.
8991
For inclusion in the content, export diagrams to SVG and place them as described above.
9092

91-
### Using AsciiDoc attributes
93+
### AsciiDoc attributes for different build targets
9294

93-
The content in this repository is shared between the upstream Foreman community and branded downstream products such as Red Hat Satellite and orcharhino by ATIX.
94-
Therefore, never write "Foreman", "Satellite", or "orcharhino" words directly, but use the following attributes:
95+
Because the content in this repository is shared between the upstream Foreman community and branded downstream products, many terms need to be written using AsciiDoc attributes.
96+
For example, never write "Foreman", "Satellite", or "orcharhino" words directly, but use the following attributes:
9597

9698
| Attribute | Upstream value | Downstream by Red Hat | Downstream by ATIX |
9799
| -------- | -------------- | --------------------- | ------------------ |
@@ -101,7 +103,7 @@ Therefore, never write "Foreman", "Satellite", or "orcharhino" words directly, b
101103
| {SmartProxy} | Smart Proxy | Capsule | orcharhino Proxy |
102104
| {SmartProxyServer} | Smart Proxy server | Capsule Server | orcharhino Proxy Server |
103105

104-
Every build uses common base attributes, more are defined in the build specific attribute files:
106+
The attributes used in this repository are defined in the following files:
105107

106108
* [attributes.adoc](common/attributes.adoc): version definitions and includes for other attribute files.
107109
* [attributes-base.adoc](common/attributes-base.adoc): base attributes common for all builds.
@@ -119,19 +121,17 @@ To use them, use the "attributes" keyword:
119121
# ls {AttributeName}
120122
----
121123

122-
Avoid using phrases like "Starting from version 6.5 or 1.22" because it is not possible to easily translate these strings into all build variants.
123-
124-
#### Conditional content
124+
### Conditional content
125125

126-
If a piece of your content, such as a block, paragraph, warning, or chapter, is specific for a certain [build](#builds), use special build attributes to show or hide it.
126+
If a piece of your content, such as a block, paragraph, warning, or chapter, is specific for a certain build target, use AsciiDoc conditionals to show or hide it.
127127

128128
To show a piece of content only for the `katello` build:
129129

130130
ifdef::katello[]
131131
NOTE: This part is only relevant for Foreman with the Katello plugin.
132132
endif::[]
133133

134-
To hide a piece of content for `katello` that will be shown for all other builds:
134+
To hide a piece of content for `katello` but show it for all other builds:
135135

136136
ifndef::katello[]
137137
NOTE: This part is relevant for Foreman without the Katello plugin, but also Satellite and orcharhino.
@@ -152,7 +152,6 @@ In these cases use both `ifdef` and `ifeval`:
152152
endif::[]
153153
endif::[]
154154

155-
156155
### File structure
157156

158157
If you create a new file, use the file structure described here.

0 commit comments

Comments
 (0)