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 documentation Makefile and README, reflecting
changes to it across NGINX's open source repositories for consistency.
It removes unnecessary targets: Netlify is no longer used, nor was the
Makefile used for Netlify for quite some time.
The guidance for Makefile targets in the README is updated accordingly,
as well formatting instructions for how we use Hugo contemporaneously.
Copy file name to clipboardExpand all lines: docs/README.md
+16-17Lines changed: 16 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,38 +30,37 @@ To work on documentation, create a feature branch in a forked repository then ta
30
30
31
31
The documentation is published from the latest public release branch. If your changes require immediate publication, create a pull request to cherry-pick changes from `main` to the public release branch.
32
32
33
-
## Developing documentation locally
33
+
## Develop documentation locally
34
34
35
-
To build the documentation locally, run the `make` command inside this `/site/` directory:
35
+
To build the documentation locally, use the `make` command in the documentation folder with these targets:
36
36
37
37
```text
38
-
make docs - Builds the documentation set with the output as the '/public' directory
39
-
make clean - Removes the local '/public/' directory
40
-
make watch - Starts a local Hugo server for live previews
41
-
make watch-drafts - Starts a local Hugo server for live previews, including documentation marked with 'draft: true'
42
-
make link-check - Check for any broken links in the documentation
43
-
make lint-markdown - Runs markdownlint to identify possible markdown formatting issues
38
+
make docs - Builds the documentation
39
+
make watch - Runs a local Hugo server to automatically preview changes
40
+
make drafts - Runs a local Hugo server, and displays documentation marked as drafts
41
+
make clean - Removes the output 'public' directory created by Hugo
42
+
make hugo-get - Updates the go module file with the latest version of the theme
43
+
make hugo-tidy - Removes unnecessary dependencies from the go module file
44
+
make hugo-update - Runs the hugo-get and hugo-tidy targets in sequence
45
+
make lint-markdown - Runs markdownlint on the content folder
46
+
make link-check - Runs markdown-link-check on all Markdown files
44
47
```
45
48
46
-
The `watch` options automatically reload the Hugo server, allowing you to view updates as you work.
47
-
48
-
> **Note**: The documentation uses build environments to control the baseURL used for things like internal references and static resources. The configuration for each environment can be found in the `config` directory. When running Hugo you can specify the environment and baseURL, but it's unnecessary.
49
-
50
49
## Adding new documentation
51
50
52
-
### Using Hugo to generate a new documentation file
51
+
### Generate a new documentation file using Hugo
53
52
54
-
To create a new documentation file with the pre-configured Hugo front-matter for the task template, run the following command inside this `/site` directory:
53
+
To create a new documentation file containing the pre-configured Hugo front-matter with the task template, **run the following command in the documentation directory**:
55
54
56
-
`hugo new <SECTIONNAME>/<FILENAME>.md`
55
+
`hugo new <SECTIONNAME>/<FILENAME>.<FORMAT>`
57
56
58
57
For example:
59
58
60
59
```shell
61
60
hugo new getting-started/install.md
62
61
```
63
62
64
-
The default template (task) should be used for most pages. For other content templates, you can use the `--kind` flag:
63
+
The default template -- task -- should be used for most documentation. To create documentation using the other content templates, you can use the `--kind` flag:
65
64
66
65
```shell
67
66
hugo new tutorials/deploy.md --kind tutorial
@@ -119,7 +118,7 @@ Use the `img` [shortcode](#using-hugo-shortcodes) to add images into your docume
119
118
120
119
### Using Hugo shortcodes
121
120
122
-
[Hugo shortcodes](/docs/themes/f5-hugo/layouts/shortcodes/) are used to format callouts, add images, and reuse content across different pages.
121
+
[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.
0 commit comments