Skip to content

Commit 9793bd9

Browse files
author
nginx
committed
Pre OSS commit
2 parents 52b2ea9 + ed2ddda commit 9793bd9

File tree

11 files changed

+500
-58
lines changed

11 files changed

+500
-58
lines changed

.github/CODEOWNERS

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@
1414
# Each line is a file pattern followed by one or more owners.
1515

1616
# DocOps
17-
* @nginxinc/nginx-docs
17+
* @nginx/nginx-docs
1818
# NGINX Plus
19-
content/nginx/* @nginxinc/plus-docs-approvers
19+
content/nginx/* @nginx/plus-docs-approvers
2020
# NGINX Agent
21-
content/nginx/nms/agent/* @nginxinc/agent-docs-approvers
21+
content/nginx/nms/agent/* @nginx/agent-docs-approvers
2222
# NGINX One
23-
content/nginx-one/* @nginxinc/one-docs-approvers
23+
content/nginx-one/* @nginx/one-docs-approvers
2424
# NGINX Instance Manager
25-
content/nms/nim/* @nginxinc/nim-docs-approvers
26-
content/nim/* @nginxinc/nim-docs-approvers
25+
content/nms/nim/* @nginx/nim-docs-approvers
26+
content/nim/* @nginx/nim-docs-approvers
2727
# NGINX App Protect WAF
28-
content/nap-waf/* @nginxinc/nap-docs-approvers
29-
data/nap-waf/* @nginxinc/nap-docs-approvers
28+
content/nap-waf/* @nginx/nap-docs-approvers
29+
data/nap-waf/* @nginx/nap-docs-approvers
3030
# NGINX App Protect DoS
31-
content/nap-dos/* @nginxinc/dos-docs-approvers
31+
content/nap-dos/* @nginx/dos-docs-approvers

.github/pull_request_template.md

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,34 @@
11
### Proposed changes
22

3-
Describe the use case and detail of the change. If this PR addresses an issue on GitHub, make sure to include a link to that issue using one of the [supported keywords](https://docs.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue) in this PR's description or commit message.
3+
Write a clear and concise description that helps reviewers understand the purpose and impact of your changes. Use the
4+
following format:
5+
6+
Problem: Give a brief overview of the problem or feature being addressed.
7+
8+
Solution: Explain the approach you took to implement the solution, highlighting any significant design decisions or
9+
considerations.
10+
11+
Testing: Describe any testing that you did.
12+
13+
Please focus on (optional): If you any specific areas where you would like reviewers to focus their attention or provide
14+
specific feedback, add them here.
15+
16+
Closes #ISSUE
417

518
### Checklist
619

7-
Before creating a PR, run through this checklist and mark each as complete:
20+
Before creating a PR, run through this checklist and mark each as complete.
821

922
- [ ] I have read the [contributing guidelines](/CONTRIBUTING.md).
1023
- [ ] I have signed the [F5 Contributor License Agreement (CLA)](https://github.com/f5/.github/blob/main/CLA/cla-markdown.md).
1124
- [ ] If applicable, I have added tests that prove my fix is effective or that my feature works.
1225
- [ ] If applicable, I have checked that any relevant tests pass after adding my changes.
1326
- [ ] I have updated any relevant documentation ([`README.md`](/README.md) and [`CHANGELOG.md`](/CHANGELOG.md)).
27+
- [ ] I have rebased my branch onto main
28+
- [ ] I will ensure my PR is targeting the main branch and pulling from my branch from my own fork
29+
- [ ] If the change involves:
30+
- Code
31+
- Anything that resembles Personally identifying information (PII)
32+
- URLs
33+
- Significant new/revised content
34+
The change will require at least two (2) approvals before merging. One requirement: use placeholders such as `<JWT Token>` in place of PII

.gitignore

Lines changed: 45 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,45 @@
1-
# Any private crt and keys #
2-
############################
3-
*.crt
4-
*.key
5-
*~
6-
\#*
7-
8-
# OS Specific #
9-
###############
10-
Thumbs.db
11-
.DS_Store
12-
.vscode
13-
14-
# Logs #
15-
########
16-
*.log
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
**/.DS_Store
3+
4+
# dependencies
5+
6+
# testing
7+
/coverage
8+
*/test-results
9+
*/playwright-report
10+
11+
# production
12+
./public
13+
14+
# misc
15+
*.pem
16+
17+
# local env files
18+
.env*.local
19+
20+
# watchdocs
21+
watchdocs.json
22+
23+
# Local Hugo artifacts
24+
public/*
25+
.hugo_build.lock
26+
resources/
27+
*.orig
28+
29+
# Local development artifacts
30+
.markdownlint.json
31+
**/.vscode/
32+
**/.idea/
33+
34+
# Local Netlify artifacts
35+
.netlify/plugins/*
36+
.netlify/
37+
38+
# Local Lighthouse artifacts
39+
lighthouse-reports
40+
41+
*.pyc
42+
build
43+
*.swp
44+
*.mo
45+
node_modules

.markdownlint.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
default: true
2+
3+
MD002: false
4+
5+
MD003: false
6+
7+
MD004:
8+
style: dash
9+
10+
MD009: false
11+
12+
MD010: false
13+
14+
MD012: false
15+
16+
MD013:
17+
line_length: 5000
18+
heading_line_length: 60
19+
code_block_line_length: 80
20+
code_blocks: true
21+
tables: false
22+
headings: true
23+
headers: true
24+
strict: false
25+
stern: false
26+
27+
MD022: false
28+
29+
MD024:
30+
siblings_only: true
31+
32+
MD029: false
33+
34+
MD033: false
35+
36+
MD034: false
37+
38+
MD041: false
39+
40+
MD046: false
41+
42+
MD051: false

CONTRIBUTING_DOCS.md

Lines changed: 144 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,165 @@
1-
# Contributing guidelines for experts
1+
# Contributing guidelines for writers
22

3-
If you want to contribute, know Git, and can work from the command line, this page can help you. As noted in the [README](./README.md), we create source content for our documentation in Markdown.
3+
If you want to contribute to our content, know Git, and can work from the command line, this page can help you. As noted in the [README](./README.md), we create source content for our documentation in Markdown.
44

55
Once you add and/or edit our Markdown source files, you can build the content locally as described on this page.
66
Before you [Submit a Pull Request](#submit-a-pull-request), we recommend that you first:
77

8-
- Set up our [Static site generator](#static-site-generator)
9-
- If you want to add images, review how to [Include images](#include-images)
10-
- Learn how to [Build documentation locally](#build-documentation-locally)
8+
- Set up our [Static site generator](#setup)
9+
- This will help you [build docs on your local system](#local-docs-development)
10+
- Learn about [Local docs development](#local-docs-development)
1111

12-
## Static site generator
12+
If you're an employee of F5/NGINX, also read [For F5/NGINX Employees](./F5-NGINX-team-notes.md).
1313

14-
You will need to install Hugo to build and preview docs in your local development environment.
14+
## Setup
15+
16+
You will need to install Hugo _or_ Docker to build and preview docs in your local development environment.
1517
Refer to the [Hugo installation instructions](https://gohugo.io/getting-started/installing/) for more information.
1618

17-
**NOTE**: We are currently running [Hugo v0.134.2](https://github.com/gohugoio/hugo/releases/tag/v0.134.2) in production.
19+
**NOTE**: We are currently running [Hugo v0.134.3](https://github.com/gohugoio/hugo/releases/tag/v0.134.3) in production.
1820

19-
## Include images
2021

21-
When you set up an image, this is the standard format:
22+
Although not a strict requirement, markdown-link-check is also used in documentation development.
2223

23-
{{< img src="path/to/images/file-name.png" alt="descriptive text for screenreaders" >}}
24+
If you have [Docker](https://www.docker.com/get-started/) installed, there are fallbacks for all requirements in the [Makefile](Makefile), meaning you don't need to install them.
2425

25-
You'll find images in the [static](../static) subdirectory, in a directory associated with the documentation. For example, if you've set up the `file-name.png`
26-
image, you should copy that file to the `static/path/to/images` directory.
26+
- [Installing Hugo](https://gohugo.io/getting-started/installing/)
27+
- [Installing markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli?tab=readme-ov-file#installation)
28+
- [Installing markdown-link-check](https://github.com/tcort/markdown-link-check?tab=readme-ov-file#installation).
2729

28-
## Build documentation locally
30+
The configuration files are as follows:
2931

30-
To build and preview docs in your local development environment, you need to install Hugo.
31-
Refer to the [Hugo installation instructions](https://gohugo.io/getting-started/installing/) for more information.
32+
- *Hugo*: `config/default/config.toml`
33+
- *markdownlint-cli*: `.markdownlint.json`
34+
- *markdown-link-check* `md-linkcheck-config.json`
35+
36+
## Local Docs Development
37+
38+
To build the documentation locally, use the `make` command in the documentation folder with these targets:
39+
40+
```text
41+
make docs - Builds the documentation.
42+
make watch - Runs a Hugo server to automatically preview changes on a local browser. Use this if you want to preview
43+
the documentation locally before submitting a PR.
44+
make drafts - Runs a Hugo server, and displays documentation marked as drafts on a local browser. By default, drafts
45+
are not displayed.
46+
make hugo-get - Updates the go module file with the latest version of the theme.
47+
make hugo-tidy - Removes unnecessary dependencies from the go module file.
48+
make hugo-update - Runs the hugo-get and hugo-tidy targets in sequence.
49+
make lint-markdown - Runs [markdownlint](https://github.com/DavidAnson/markdownlint) on the content folder.
50+
make link-check - Runs [markdown-link-check](https://github.com/tcort/markdown-link-check) on all Markdown files. Requires a running instance of Docker.
51+
make clean - Removes the local `public` directory, which is the default output path used by Hugo.
52+
```
53+
54+
## Add new documentation
55+
56+
We provide template files for different types of documentation. The templates, including instructions to use them and examples, are located in the [templates](templates) directory.
57+
58+
We have templates for the following types of documentation:
59+
- Concept
60+
- Getting started
61+
- How-to guide
62+
- Installation guide
63+
- Reference
64+
- Release notes
65+
- Tutorial
66+
67+
## How to format docs
68+
69+
### Basic markdown formatting
70+
71+
There are multiple ways to format text: for consistency and clarity, these are our conventions:
72+
73+
- Bold: Two asterisks on each side - `**Bolded text**`.
74+
- Italic: One underscore on each side - `_Italicized text_`.
75+
- Unordered lists: One dash - `- Unordered list item`.
76+
- Ordered lists: The 1 character followed by a stop - `1. Ordered list item`.
77+
78+
> **Note**: The ordered notation automatically enumerates lists when built by Hugo.
79+
Close every section with a horizontal line by using three dashes: `---`.
80+
81+
### How to format internal links
82+
83+
Internal links should use Hugo [ref and relref shortcodes](https://gohugo.io/content-management/cross-references/).
84+
85+
- Although file extensions are optional for Hugo, we include them as best practice for page anchors.
86+
- Relative paths are preferred, but just the filename is permissible.
87+
- Paths without a leading forward slash (`/`) are first resolved relative to the current page, then the remainder of the website.
88+
89+
Here are two examples:
90+
91+
```md
92+
To install <software>, refer to the [installation instructions]({{< ref "install.md" >}}).
93+
To install <integation>, refer to the [integration instructions]({{< relref "/integration/thing.md#section" >}}).
94+
```
95+
96+
### How to add images
97+
98+
Use the `img` [shortcode](#using-hugo-shortcodes) to add images into your documentation.
99+
100+
1. Add the image to the `/static/img` directory.
101+
1. Add the `img` shortcode:
102+
`{{< img src="<img-file.png>" alt="<Alternative text>">}}`
103+
- **Alt text is required, and must describe in detail the content of the image.**
104+
- **Do not include a forward slash at the beginning of the file path.**
105+
- This will break the image when it's rendered: read about the [Hugo relURL Function](https://gohugo.io/functions/relurl/#input-begins-with-a-slash) to learn more.
106+
107+
> **Note**: The `img` shortcode accepts all of the same parameters as the Hugo [figure shortcode](https://gohugo.io/content-management/shortcodes/#figure).
108+
109+
> **Important**: We have strict guidelines regarding the use of images in our documentation. Make sure that you keep the number of images to a minimum and that they are relevant to the content. Review the guidelines in our [style guide](/templates/style-guide.md#guidelines-for-screenshots).
110+
111+
### How to use Hugo shortcodes
112+
113+
[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.
114+
115+
For example, to use the `note` callout:
116+
117+
```md
118+
{{< note >}}Provide the text of the note here.{{< /note >}}
119+
```
120+
121+
The callout shortcodes support multi-line blocks:
122+
123+
```md
124+
{{< caution >}}
125+
You should probably never do this specific thing in a production environment.
126+
127+
If you do, and things break, don't say we didn't warn you.
128+
{{< /caution >}}
129+
```
130+
131+
Supported callouts:
132+
- `note`
133+
- `tip`
134+
- `important`
135+
- `caution`
136+
- `warning`
137+
138+
You can also create custom callouts using the `call-out` shortcode `{{< call-out "type" "header" "font-awesome icon >}}`. For example:
139+
140+
```md
141+
{{<call-out "important" "JWT file required for upgrade" "fa fa-exclamation-triangle">}}
142+
```
32143

33-
## Submit a Pull Request
144+
Here are some other shortcodes:
34145

35-
Follow this plan to contribute a change to NGINX source code:
146+
- `fa`: Inserts a Font Awesome icon
147+
- `collapse`: Make a section collapsible
148+
- `tab`: Create mutually exclusive tabbed window panes, useful for parallel instructions
149+
- `table`: Add scrollbars to wide tables for browsers with smaller viewports
150+
- `link`: Link to a file, prepending its path with the Hugo baseUrl
151+
- `openapi`: Loads an OpenAPI specifcation and render it as HTML using ReDoc
152+
- `include`: Include the content of a file in another file; the included file must be present in the '/content/includes/' directory
153+
- `raw-html`: Include a block of raw HTML
154+
- `readfile`: Include the content of another file in the current file, which can be in an arbitrary location.
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" }}`
36156

37-
- Fork the NGINX repository
38-
- Create a branch
39-
- Implement your changes in this branch
40-
- Submit a pull request (PR) when your changes are tested and ready for review
157+
## Linting
41158

42-
### Add new docs
159+
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:
43160

44-
Consistent with the [Diataxis](https://diataxis.fr) framework, our documentation includes the following content types:
161+
```bash
162+
markdownlint -c .markdownlint.yaml <content>
163+
```
45164

46-
- concept: Helps a customer learn about a specific feature or feature set.
47-
- tutorial: Walks a customer through an example use case scenario; results in a functional PoC environment.
48-
- reference: Describes an API, command line tool, config options, etc.; should be generated automatically from source code.
49-
- openapi: Contains front-matter and shortcode for rendering an openapi.yaml spec.
165+
> Note: You can run this tool on an entire directory or on an individual file.

F5-NGINX-team-notes.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
11
# For F5/NGINX Employees
22

3-
This repository is a functional mirror. If you want to make a change to F5/NGINX
4-
documentation, use the private source repository.
3+
This repository is a functional mirror. We want to do as much of our work as possible in the
4+
public repository. However, if you are working with:
5+
6+
- Security content, including personally identifying information (PII).
7+
- Content / features that are not yet ready to be announced.
8+
9+
Make changes to the `docs-internal` repository. When you create a branch, start it with:
10+
`internal/`.
11+
12+
- The public `docs` repository will reject branches that start with `internal/`.
13+
- The `docs-internal` repository will accept branches _only_ if it includes `internal/`.
14+
15+
If you need to review a pull request and are an employee of F5/NGINX, ask a member of @nginx/nginx-docs for help.
516

617
We encourage you to work with community contributors. If you participate in
718
PRs, issues, discussions, and more, follow these guidelines:
@@ -11,4 +22,7 @@ PRs, issues, discussions, and more, follow these guidelines:
1122
- Avoid references and links to internal content.
1223
- Do not include information about future releases, changes, or features, unless
1324
specifically authorized.
14-
- Do not include information that is proprietary to and/or private within F5/NGINX.
25+
- Do not include anything that even resembles PII.
26+
- Do not include information that is proprietary to and/or private within F5/NGINX.
27+
28+
To protect F5/NGINX, the ability to merge pull requests is strictly limited to employees of F5/NGINX.

0 commit comments

Comments
 (0)