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
This commit updates the Hugo guidance to accurately reflect the usage of
our most common shortcodes, and guides people away from the ones that
have been removed or will be removed soon based on Mainframe changes.
The guidance is not fully inclusive: we have not yet determined where
full documentation for all theme elements should live (Such as a
publicly-facing design system), but it should cover the most commonly
used shortcodes.
The pull request template has also been updated in the same manner,
attempting to focus on critical information for contributors. The
checklist was previously quite long: it has been reduced to essential
elements, and reframed as a direct, personal commitment.
The detail underneath the "Proposed changes" has been shifted to inline,
hidden guidance, following a similar pattern in our Hugo archetypes.
Some information from the old checklist has been moved there, but it
otherwise covers the same ground as the old guidance.
It refers to and reinforces our standards asserted by our Git
conventions documentation, and will not create visual noise within the
PR should the contributor choose not to remove it.
Before merging a pull request, run through this checklist and mark each as complete.
23
+
Before sharing this pull request, I completed the following checklist:
23
24
24
-
-[ ] I have read the [contributing guidelines](https://github.com/nginx/documentation/blob/main/CONTRIBUTING.md)
25
-
-[ ] I have signed the [F5 Contributor License Agreement (CLA)](https://github.com/f5/.github/blob/main/CLA/cla-markdown.md)
26
-
-[ ] I have rebased my branch onto main
27
-
-[ ] I have ensured my PR is targeting the main branch and pulling from my branch from my own fork
28
-
-[ ] I have ensured that the commit messages adhere to [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/#summary)
29
-
-[ ] I have ensured that documentation content adheres to [the style guide](/documentation/style-guide.md)
30
-
-[ ] If the change involves potentially sensitive changes[^1], I have assessed the possible impact
31
-
-[ ] If applicable, I have added tests that prove my fix is effective or that my feature works
32
-
-[ ] I have ensured that existing tests pass after adding my changes
33
-
-[ ] If applicable, I have updated [`README.md`](/README.md)
25
+
-[ ] I read the [Contributing guidelines](/CONTRIBUTING.md)
26
+
-[ ] My branch adheres to the [Git conventions](/documentation/git-conventions.md)
27
+
-[ ] My content changes adhere to the [F5 NGINX Documentation style guide](/documentation/style-guide.md)
28
+
-[ ] If my changes involve potentially sensitive information[^1], I have assessed the possible impact
29
+
-[ ] I have waited to ensure my changes pass tests, and addressed any discovered issues
34
30
35
-
[^1]: Potentially sensitive changes include anything involving code, personally identify information (PII), live URLs or significant amounts of new or revised documentation. Please refer to [our style guide](/documentation/style-guide.md) for guidance about placeholder content.
31
+
[^1]: Potentially sensitive information includes personally identify information (PII), authentication credentials, and live URLs. Refer to the [style guide](/documentation/style-guide.md) for guidance about placeholder content.
Copy file name to clipboardExpand all lines: documentation/closed-contributions.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,19 @@ We work in public by default, so this process should only be used on a case by c
11
11
12
12
For standard content releases, review the [Contributing guidelines](/CONTRIBUTING.md).
13
13
14
+
## Referencing internal information
15
+
16
+
During the last stage of this process, or while making any public pull request, you may need to reference something internal.
17
+
18
+
As mentioned in our pull request template checklist, you should not link to internal resources: they are considered "sensitive content", defined previously.
19
+
20
+
Instead, include the key outputs of the internal resource as part of describing context:
21
+
22
+
> "Following an internal discussion, the instructions for foo have been clarified"
23
+
> "The phrasing of bar has been changed based on an internal requirement"
24
+
25
+
This allows you to retain the necessary context for a change without exposing a potentially important resource to the public.
26
+
14
27
## Overview
15
28
16
29
This repository (https://github.com/nginx/documentation) is where we work by default. It has a one-way sync to an internal repository, used for closed content.
Copy file name to clipboardExpand all lines: documentation/writing-hugo.md
+38-45Lines changed: 38 additions & 45 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -87,53 +87,58 @@ To install <integation>, refer to the [integration instructions]({{< ref "/integ
87
87
88
88
### How to use Hugo shortcodes
89
89
90
-
[Hugo shortcodes](https://github.com/nginxinc/nginx-hugo-theme/tree/main/layouts/shortcodes) are used to format callouts, add images, and reuse content across different pages.
90
+
[Hugo shortcodes](https://github.com/nginxinc/nginx-hugo-theme/tree/main/layouts/shortcodes) are used to provide extra functionality and special formatting to Markdown content.
91
91
92
-
For example, to use the `note` callout:
92
+
This is an example of a call-out shortcode:
93
93
94
94
```md
95
-
{{< note >}} Provide the text of the note here .{{< /note >}}
95
+
{{< call-out "note" >}} Provide the text of the note here .{{< /call-out >}}
96
96
```
97
97
98
-
The callout shortcodes support multi-line blocks:
98
+
Here are some other shortcodes:
99
+
100
+
-`include`: Include the content of a file in another file: read the [Re-use content with includes](#re-use-content-with-includes) instructions
-`table`: Add scrollbars to wide tables for browsers with smaller viewports
129
-
-`link`: Link to a file, prepending its path with the Hugo baseUrl
130
-
-`openapi`: Loads an OpenAPI specification and render it as HTML using ReDoc
131
-
-`include`: Include the content of a file in another file; the included file must be present in the '/content/includes/' directory
132
-
-`raw-html`: Include a block of raw HTML
133
-
-`readfile`: Include the content of another file in the current file, which can be in an arbitrary location.
134
-
-`bootstrap-table`: formats a table using Bootstrap classes; accepts any bootstrap table classes as additional arguments, e.g. `{{< bootstrap-table "table-bordered table-hover" }}`
139
+
Finally, you can use an optional third parameter to add a [Lucide icon](https://lucide.dev/icons/) using its name.
135
140
136
-
### Add code to documentation pages
141
+
####Add code to documentation pages
137
142
138
143
For command, binary, and process names, we sparingly use pairs of backticks (\`\<some-name\>\`): `<some-name>`.
139
144
@@ -145,22 +150,9 @@ You can also use the `ghcode` shortcode to embed a single file directly from Git
145
150
146
151
An example of this can be seen in [/content/ngf/get-started.md](https://github.com/nginx/documentation/blob/af8a62b15f86a7b7be7944b7a79f44fd5e526c15/content/ngf/get-started.md?plain=1#L233C1-L233C128), which embeds a YAML file.
147
152
153
+
#### Re-use content with includes
148
154
149
-
### Add images to documentation pages
150
-
151
-
Use the `img` shortcode to add images to documentation pages. It has the same parameters as the Hugo [figure shortcode](https://gohugo.io/content-management/shortcodes/#figure).
- Do not include a forward slash at the beginning of the file path or it will [break the image](https://gohugo.io/functions/relurl/#input-begins-with-a-slash).
157
-
158
-
> **Important**: We have strict guidelines for using images. Review them in our [style guide](/documentation/style-guide.md#guidelines-for-screenshots).
159
-
160
-
161
-
### How to use Hugo includes
162
-
163
-
Hugo includes are a custom shortcode that allows you to embed content stored in the [`/content/includes` directory](https://github.com/nginx/documentation/tree/main/content/includes).
155
+
The includes are a custom shortcode that allows you to embed content stored in the [`/content/includes` directory](https://github.com/nginx/documentation/tree/main/content/includes).
164
156
165
157
It allows for content to be defined once and display in multiple places without duplication, creating consistency and simplifying the maintenance of items such as reference tables.
166
158
@@ -180,12 +172,13 @@ This particular include file is used in the following pages:
180
172
181
173
View the [Guidelines for includes](/templates/style-guide.md#guidelines-for-includes) for instructions on how to write effective include files.
182
174
183
-
##Linting
175
+
#### Add images to documentation pages
184
176
185
-
To use markdownlint to check content, run the following command:
177
+
Use the `img` shortcode to add images to documentation pages. It has the same parameters as the Hugo [figure shortcode](https://gohugo.io/content-management/shortcodes/#figure).
- Do not include a forward slash at the beginning of the file path or it will [break the image](https://gohugo.io/functions/relurl/#input-begins-with-a-slash).
190
183
191
-
The content path can be an individual file or a folder.
184
+
> **Important**: We have strict guidelines for using images. Review them in our [style guide](/documentation/style-guide.md#guidelines-for-screenshots).
0 commit comments