Skip to content

Commit 1a418fd

Browse files
miledxzsjbermanpre-commit-ci[bot]
committed
Update guidance and tooling for documentation (nginx#1431)
These changes add a README file to the site subfolder instructing a reader on how to build and contribute to the documentation. It removes a similar README from the developer documentation folder while incorporating a number of improvements. With this commit there are also changes to the Makefile, with the aim of clarifying the intent and usage of certain commands. Finally, the new README references and is referenced by the general CONTRIBUTION guidelines to reflect the standardised processes and reinforce our "Docs like Code" approach. Co-authored-by: Saylor Berman <s.berman@f5.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent c38defe commit 1a418fd

File tree

4 files changed

+178
-180
lines changed

4 files changed

+178
-180
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ Follow our [Installation Instructions](https://docs.nginx.com/nginx-gateway-fabr
4343
- We use [Go Modules](https://github.com/golang/go/wiki/Modules) for managing dependencies.
4444
- We use [Ginkgo](https://onsi.github.io/ginkgo/) and [Gomega](https://onsi.github.io/gomega/) for our BDD style unit
4545
tests.
46+
- The documentation website is found under `site/`.
4647

4748
## Contributing
4849

@@ -93,6 +94,7 @@ Before beginning development, familiarize yourself with the following documents:
9394
conventions to follow when writing Go code for the project.
9495
- [Architecture](https://docs.nginx.com/nginx-gateway-fabric/overview/gateway-architecture/): A high-level overview of the project's architecture.
9596
- [Design Principles](/docs/developer/design-principles.md): An overview of the project's design principles.
97+
- [NGINX Gateway Fabric Documentation](/site/README.md): An explanation of the documentation tooling and conventions.
9698

9799
## Contributor License Agreement
98100

docs/developer/documentation.md

Lines changed: 0 additions & 165 deletions
This file was deleted.

site/Makefile

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ifeq (, $(shell ${HUGO} version 2> /dev/null))
1212
ifeq (, $(shell docker version 2> /dev/null))
1313
$(error Docker and Hugo are not installed. Hugo (<0.91) or Docker are required to build the local preview.)
1414
else
15-
HUGO=docker run --rm -it -v ${CURDIR}:/src -p 1313:1313 ${HUGO_IMG} hugo --bind 0.0.0.0 -p 1313
15+
HUGO=docker run --rm -it -v ${CURDIR}:/src -p 1313:1313 ${HUGO_IMG} hugo
1616
endif
1717
endif
1818

@@ -43,7 +43,6 @@ else
4343
endif
4444
endif
4545

46-
4746
.PHONY: all all-staging all-dev all-local clean hugo-mod build-production build-staging build-dev docs-drafts docs deploy-preview
4847

4948
all: hugo-mod build-production
@@ -54,28 +53,25 @@ all-dev: hugo-mod build-dev
5453

5554
all-local: clean hugo-mod build-production
5655

57-
# Removes the public directory generated by the `hugo` command
56+
docs:
57+
${HUGO}
58+
5859
clean:
5960
if [[ -d ${PWD}/public ]] ; then rm -rf ${PWD}/public && echo "Removed public directory" ; else echo "Did not find a public directory to remove" ; fi
6061

62+
watch:
63+
${HUGO} --bind 0.0.0.0 -p 1313 server --disableFastRender
6164

62-
docs-drafts:
63-
${HUGO} server -D --disableFastRender
64-
65-
docs-local: clean
66-
${HUGO}
67-
68-
docs:
69-
${HUGO} server --disableFastRender
70-
71-
lint-markdown:
72-
${MARKDOWNLINT} -c .markdownlint.yaml -- content
65+
watch-drafts:
66+
${HUGO} --bind 0.0.0.0 -p 1313 server -D --disableFastRender
7367

7468
link-check:
7569
${MARKDOWNLINKCHECK} $(shell find content -name '*.md')
7670

71+
lint-markdown:
72+
${MARKDOWNLINT} -c .markdownlint.yaml -- content
7773

78-
## commands for use in Netlify CI
74+
# Commands used by Netlify CI
7975
hugo-mod:
8076
hugo mod get $(THEME_MODULE)@v$(THEME_VERSION)
8177

0 commit comments

Comments
 (0)