Skip to content

Commit b679460

Browse files
committed
Updated internal version of files.
nginxinc/docs-platform#289
1 parent 7e9f360 commit b679460

File tree

6 files changed

+620
-349
lines changed

6 files changed

+620
-349
lines changed

.github/pull_request_template.md

Lines changed: 19 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,29 @@
11
### Proposed changes
22

3-
Write a clear and concise description that helps reviewers understand the purpose and impact of your changes. Use the
4-
following format:
3+
Describe the use case and detail of the change.
54

6-
Problem: Give a brief overview of the problem or feature being addressed.
5+
If this PR addresses an [issue](https://github.com/nginxinc/docs/issues) on GitHub, ensure that you link to it below.
76

8-
Solution: Explain the approach you took to implement the solution, highlighting any significant design decisions or
9-
considerations.
7+
**GitHub Issue**:
8+
Closes #<Issue>
109

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-
If this PR addresses an [issue](https://github.com/nginx/documentation/issues) on GitHub, ensure that you link to it here:
10+
### Checklist
1711

18-
Closes #ISSUE
12+
Before creating a PR, run through this checklist and mark each step as complete.
1913

20-
### Checklist
14+
- [ ] I have read the [`CONTRIBUTING`](https://github.com/nginxinc/docs/blob/main/CONTRIBUTING.md) document
15+
- [ ] I have viewed my changes in the documentation Deploy Preview
16+
- [ ] My PR is targeting the correct branch:
17+
- main: content that can be released immediately
18+
- product release branch: content that should be held for a future release
19+
- [ ] I have updated any relevant supporting documentation ([`README.md`](https://github.com/nginxinc/docs/blob/main/README.md) and the [`CHANGELOG.md`](https://github.com/nginxinc/docs/blob/main/CHANGELOG.md))
20+
- [ ] I have followed the [conventional commits guidelines](https://www.conventionalcommits.org/en/v1.0.0/#summary) for all commits on my branch
2121

22-
Before merging a pull request, run through this checklist and mark each as complete.
22+
When you're ready to merge a PR, run through this checklist and mark each step as complete.
2323

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](https://github.com/nginx/documentation/blob/main/templates/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`](https://github.com/nginx/documentation/blob/main/README.md) and [`CHANGELOG.md`](https://github.com/nginx/documentation/blob/main/CHANGELOG.md)
24+
- [ ] Review the doc for spelling errors.
25+
- [ ] Verify that all links in the doc work.
26+
- [ ] Verify that the doc follows the appropriate content template.
27+
- [ ] Add technical and docs reviewers. Refer to the appropriate CODEOWNERS file, which includes authorized teams of reviewers.
28+
- [ ] Share the PR for review in the [`#nginx-doc-reviews`](https://f5.enterprise.slack.com/archives/C04PYFULN91) channel in Slack.
3429

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](https://github.com/nginx/documentation/blob/main/templates/style-guide.md) for guidance about placeholder content.

CONTRIBUTING.md

Lines changed: 124 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,103 +1,156 @@
1-
# Contributing guidelines
1+
# Contributing Guidelines
22

3-
The following is a set of guidelines for community contributions to this
4-
project. We really appreciate your desire to contribute!
3+
The following is a set of guidelines for contributing to this project. We really appreciate that you are considering contributing!
54

6-
If you are an F5 employee, see the following additional guidance [For F5 Employees](./F5-NGINX-team-notes.md).
5+
## Setup
76

8-
## Table of contents
7+
You will need to install Hugo _or_ Docker to build and preview docs in your local development environment.
8+
Refer to the [Hugo installation instructions](https://gohugo.io/getting-started/installing/) for more information.
99

10-
- [Report a Bug](#report-a-bug)
11-
- [Suggest a Feature or Enhancement](#suggest-a-feature-or-enhancement)
12-
- [Open a Discussion](#open-a-discussion)
13-
- [Submit a Pull Request](#submit-a-pull-request)
14-
- Review our [Git style guide](#git-style-guide)
15-
- Review our Documentation [style guide](./templates/style-guide.md)
16-
- Review our [Contributing guidelines for writers](./CONTRIBUTING_DOCS.md)
17-
- [Issue Lifecycle](#issue-lifecycle)
18-
- [Content edited elsewhere](#content-edited-elsewhere)
19-
- [F5 Contributor License Agreement (CLA)](#f5-contributor-license-agreement)
10+
**NOTE**: We are currently running [Hugo v0.134.2](https://github.com/gohugoio/hugo/releases/tag/v0.134.2) in production.
2011

21-
## Report a bug
2212

23-
To report a bug, open an issue on GitHub with the label `bug` using the
24-
available bug report issue template. Before reporting a bug, make sure the
25-
issue has not already been reported.
13+
Although not a strict requirement, markdown-link-check is also used in documentation development.
2614

27-
## Suggest a feature or enhancement
15+
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.
2816

29-
To suggest a feature or enhancement, open an issue on GitHub with the label
30-
`feature` or `enhancement` using the available feature request issue template.
31-
Please ensure the feature or enhancement has not already been suggested.
17+
- [Installing Hugo](https://gohugo.io/getting-started/installing/)
18+
- [Installing markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli?tab=readme-ov-file#installation)
19+
- [Installing markdown-link-check](https://github.com/tcort/markdown-link-check?tab=readme-ov-file#installation).
3220

33-
## Open a Discussion
21+
The configuration files are as follows:
3422

35-
If you want to start a conversation with the community and maintainers,
36-
we encourage you to use
37-
[GitHub Discussions](https://github.com/nginx/documentation/discussions).
23+
- *Hugo*: `config/default/config.toml`
24+
- *markdownlint-cli*: `.markdownlint.json`
25+
- *markdown-link-check* `md-linkcheck-config.json`
3826

39-
## Submit a Pull Request
27+
## Local Docs Development
4028

41-
To contribute to F5 NGINX documentation, follow these steps:
29+
To build the documentation locally, use the `make` command in the documentation folder with these targets:
4230

43-
- Fork the NGINX repository
44-
- Create a branch
45-
- Implement your changes in your branch
46-
- Submit a pull request (PR) when your changes are ready for review
31+
```text
32+
make docs - Builds the documentation.
33+
make watch - Runs a Hugo server to automatically preview changes on a local browser. Use this if you want to preview
34+
the documentation locally before submitting a PR.
35+
make drafts - Runs a Hugo server, and displays documentation marked as drafts on a local browser. By default, drafts
36+
are not displayed.
37+
make hugo-get - Updates the go module file with the latest version of the theme.
38+
make hugo-tidy - Removes unnecessary dependencies from the go module file.
39+
make hugo-update - Runs the hugo-get and hugo-tidy targets in sequence.
40+
make lint-markdown - Runs [markdownlint](https://github.com/DavidAnson/markdownlint) on the content folder.
41+
make link-check - Runs [markdown-link-check](https://github.com/tcort/markdown-link-check) on all Markdown files. Requires a running instance of Docker.
42+
make clean - Removes the local `public` directory, which is the default output path used by Hugo.
43+
```
4744

48-
Alternatively, you're welcome to suggest improvements to highlight problems with
49-
our documentation as described in our [support](./SUPPORT.md) page.
45+
## Add new documentation
5046

51-
### Git style guide
47+
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.
5248

53-
- Keep a clean, concise and meaningful Git commit history on your branch, rebasing locally and squashing before you submit a PR
54-
- Follow the guidelines of writing a good commit message as described here <https://chris.beams.io/posts/git-commit/>
55-
and summarized in the next few points:
49+
We have templates for the following types of documentation:
50+
- Concept
51+
- Getting started
52+
- How-to guide
53+
- Installation guide
54+
- Reference
55+
- Release notes
56+
- Tutorial
5657

57-
- In the subject line, use the present tense ("Add feature" not "Added feature")
58-
- In the subject line, use the imperative mood ("Move cursor to..." not "Moves cursor to...")
59-
- Limit the subject line to 72 characters or less
60-
- Reference issues and pull requests liberally after the subject line
61-
- Add more detailed description in the body of the git message (`git commit -a` to give you more space and time in
62-
your text editor to write a good message instead of `git commit -am`)
58+
## How to format docs
6359

64-
#### Branch protection rules
60+
### Basic markdown formatting
6561

66-
This repository has the following branch protection rules in place:
62+
There are multiple ways to format text: for consistency and clarity, these are our conventions:
6763

68-
- **Pushing branches that contain the "internal/" prefix is not allowed.** This ensures internal development branches are not accidentally or purposefully pushed to this repo.
69-
- **Two approvers are required for all merges to main and release branches.** This ensures all code that is approved for release to production is appropriately reviewed. This rule applies to all branches with `*release*` in the branch name.
70-
- **Only NGINX DocOps Team members can create release branches.** This ensures the docs team is aware of all branches supporting specific product releases. This rule applies to all branches with `*release*` in the branch name.
71-
- **Pushes (force or otherwise) directly to main or release branches is not allowed.** Release branches serve as "main" for the release they are associated with. Restricting pushes directly to main and release branches ensures all content changes are reviewed and approved. This rule applies to all branches with `*release*` in the branch name and to "main".
64+
- Bold: Two asterisks on each side - `**Bolded text**`.
65+
- Italic: One underscore on each side - `_Italicized text_`.
66+
- Unordered lists: One dash - `- Unordered list item`.
67+
- Ordered lists: The 1 character followed by a stop - `1. Ordered list item`.
7268

73-
### Documentation style guide
69+
> **Note**: The ordered notation automatically enumerates lists when built by Hugo.
70+
Close every section with a horizontal line by using three dashes: `---`.
7471

75-
For detailed guidance, see our documentation [style guide](./templates/style-guide.md).
72+
### How to format internal links
7673

77-
## Issue lifecycle
74+
Internal links should use Hugo [ref and relref shortcodes](https://gohugo.io/content-management/cross-references/).
7875

79-
To ensure a balance between work carried out by the NGINX team while encouraging community involvement on this project, we use the following
80-
issue lifecycle:
76+
- Although file extensions are optional for Hugo, we include them as best practice for page anchors.
77+
- Relative paths are preferred, but just the filename is permissible.
78+
- Paths without a leading forward slash (`/`) are first resolved relative to the current page, then the remainder of the website.
8179

82-
- A new issue is created by a community member
83-
- An owner on the NGINX team is assigned to the issue; this owner shepherds the issue through the subsequent stages in the issue lifecycle
84-
- The owner assigns one or more [labels](https://github.com/nginxinc/oss-docs/issues/labels) to the issue
85-
- The owner, in collaboration with the community member, determines what milestone to attach to an issue. They may be milestones correspond to product releases
80+
Here are two examples:
8681

87-
## Additional NGINX documentation
82+
```md
83+
To install <software>, refer to the [installation instructions]({{< ref "install.md" >}}).
84+
To install <integation>, refer to the [integration instructions]({{< relref "/integration/thing.md#section" >}}).
85+
```
8886

89-
This repository does not include all of the source content for the NGINX documentation. Other relevant repositories include:
87+
### How to add images
9088

91-
- [NGINX Open Source](https://github.com/nginx/nginx) - source for [NGINX changelog](https://nginx.org/en/CHANGES)
92-
- [nginx.org](https://github.com/nginx/nginx.org) - source for https://nginx.org
93-
- [NGINX Unit](https://github.com/nginx/unit) - source for https://unit.nginx.org
94-
- [NGINX Ingress Controller](https://github.com/nginxinc/kubernetes-ingress/) - source for https://docs.nginx.com/nginx-ingress-controller
95-
- [NGINX Agent](https://github.com/nginx/agent) - source for https://docs.nginx.com/nginx-agent
89+
Use the `img` [shortcode](#using-hugo-shortcodes) to add images into your documentation.
9690

97-
In those repositories, you can find documentation source code in the `docs` or `site` subdirectories.
91+
1. Add the image to the `/static/img` directory.
92+
1. Add the `img` shortcode:
93+
`{{< img src="<img-file.png>" alt="<Alternative text>">}}`
94+
- **Alt text is required, and must describe in detail the content of the image.**
95+
- **Do not include a forward slash at the beginning of the file path.**
96+
- 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.
9897

99-
## F5 Contributor License Agreement
98+
> **Note**: The `img` shortcode accepts all of the same parameters as the Hugo [figure shortcode](https://gohugo.io/content-management/shortcodes/#figure).
10099
101-
F5 requires all external contributors to agree to the terms of the F5 CLA (available [here](https://github.com/f5/.github/blob/main/CLA/cla-markdown.md)) before any of their changes can be incorporated into an F5 Open Source repository.
100+
> **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).
102101
103-
If you have not yet agreed to the F5 CLA terms and submit a PR to this repository, a bot will prompt you to view and agree to the F5 CLA. You will have to agree to the F5 CLA terms through a comment in the PR before any of your changes can be merged. Your agreement signature will be safely stored by F5 and no longer be required in future PRs.
102+
### How to use Hugo shortcodes
103+
104+
[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.
105+
106+
For example, to use the `note` callout:
107+
108+
```md
109+
{{< note >}}Provide the text of the note here.{{< /note >}}
110+
```
111+
112+
The callout shortcodes support multi-line blocks:
113+
114+
```md
115+
{{< caution >}}
116+
You should probably never do this specific thing in a production environment.
117+
118+
If you do, and things break, don't say we didn't warn you.
119+
{{< /caution >}}
120+
```
121+
122+
Supported callouts:
123+
- `note`
124+
- `tip`
125+
- `important`
126+
- `caution`
127+
- `warning`
128+
129+
You can also create custom callouts using the `call-out` shortcode `{{< call-out "type" "header" "font-awesome icon >}}`. For example:
130+
131+
```md
132+
{{<call-out "important" "JWT file required for upgrade" "fa fa-exclamation-triangle">}}
133+
```
134+
135+
Here are some other shortcodes:
136+
137+
- `fa`: Inserts a Font Awesome icon
138+
- `collapse`: Make a section collapsible
139+
- `tab`: Create mutually exclusive tabbed window panes, useful for parallel instructions
140+
- `table`: Add scrollbars to wide tables for browsers with smaller viewports
141+
- `link`: Link to a file, prepending its path with the Hugo baseUrl
142+
- `openapi`: Loads an OpenAPI specification and render it as HTML using ReDoc
143+
- `include`: Include the content of a file in another file; the included file must be present in the '/content/includes/' directory
144+
- `raw-html`: Include a block of raw HTML
145+
- `readfile`: Include the content of another file in the current file, which can be in an arbitrary location.
146+
- `bootstrap-table`: formats a table using Bootstrap classes; accepts any bootstrap table classes as additional arguments, e.g. `{{< bootstrap-table "table-bordered table-hover" }}`
147+
148+
## Linting
149+
150+
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:
151+
152+
```bash
153+
markdownlint -c .markdownlint.yaml <content>
154+
```
155+
156+
> Note: You can run this tool on an entire directory or on an individual file.

0 commit comments

Comments
 (0)