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_DOCS.md
+24-3Lines changed: 24 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,7 @@ We have templates for the following types of documentation:
64
64
65
65
## How to format docs
66
66
67
-
### Basic markdown formatting
67
+
### Basic Markdown formatting
68
68
69
69
There are multiple ways to format text: for consistency and clarity, these are our conventions:
70
70
@@ -133,12 +133,14 @@ Supported callouts:
133
133
-`caution`
134
134
-`warning`
135
135
136
-
You can also create custom callouts using the `call-out` shortcode `{{< call-out "type" "header" "font-awesome icon >}}`. For example:
136
+
You can also create custom callouts using the `call-out` shortcode `{{< call-out "type position" "header" "font-awesome icon >}}`. For example:
137
137
138
138
```md
139
-
{{<call-out "important" "JWT file required for upgrade" "fa fa-exclamation-triangle">}}
139
+
{{<call-out "important side-callout" "JWT file required for upgrade" "fa fa-exclamation-triangle">}}
140
140
```
141
141
142
+
By default, all custom callouts are included inline, unless you add `side-callout` which places the callout to the right of the content.
143
+
142
144
Here are some other shortcodes:
143
145
144
146
-`fa`: Inserts a Font Awesome icon
@@ -152,6 +154,25 @@ Here are some other shortcodes:
152
154
-`readfile`: Include the content of another file in the current file, which can be in an arbitrary location.
153
155
-`bootstrap-table`: formats a table using Bootstrap classes; accepts any bootstrap table classes as additional arguments, e.g. `{{< bootstrap-table "table-bordered table-hover" }}`
154
156
157
+
### How to use Hugo includes
158
+
159
+
As mentioned above, [Hugo includes](https://gohugo.io/contribute/documentation/#include) are a custom shortcode that allows you to reference reusable content stored in the [`/content/includes` directory](https://github.com/nginx/documentation/tree/main/content/includes).
160
+
161
+
For example, if the [`controller/add-existing-instance.md`](https://github.com/nginx/documentation/blob/main/content/includes/controller/add-existing-instance.md) file contains instructions on adding an instance to the NGINX Controller, you can reuse it on multiple pages by adding:
162
+
163
+
```md
164
+
{{< include "controller/add-existing-instance.md" >}}
165
+
```
166
+
167
+
The `controller/add-existing-instance.md` file is included in the following pages on the NGINX Docs Site:
168
+
169
+
-[Add an NGINX App Protect Instance](https://github.com/nginx/documentation/blob/main/content/controller/infrastructure/instances/add-nap-instance.md?plain=1#L35)
170
+
-[Manage Your NGINX Instances](https://github.com/nginx/documentation/blob/main/content/controller/infrastructure/instances/manage-instances.md?plain=1#L29)
171
+
-[Trial NGINX Controller with NGINX Plus](https://github.com/nginx/documentation/blob/main/content/controller/admin-guides/install/try-nginx-controller.md?plain=1#L277)
172
+
-[Trial NGINX Controller with App Security](https://github.com/nginx/documentation/blob/main/content/controller/admin-guides/install/try-nginx-controller-app-sec.md?plain=1#L290)
173
+
174
+
This ensures that content is defined once and referenced in multiple places without duplication.
175
+
155
176
## Linting
156
177
157
178
To run the markdownlint check, run the following command, which uses the .markdownlint.yaml file to specify rules. For `<content>`, specify the path to your Markdown files:
0 commit comments