Skip to content

Commit 92e181e

Browse files
committedMar 26, 2025··
Update docs install docs
1 parent b9737b4 commit 92e181e

File tree

4 files changed

+25
-21
lines changed

4 files changed

+25
-21
lines changed
 

‎Makefile

+10-6
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@ help:
3030
@echo " test - run tests against local files"
3131
@echo " test-image - run tests against files in docker image"
3232
@echo " test-cdn - run CDN tests against TEST_DOMAIN"
33-
@echo " docs - generate Sphinx HTML documentation with server and live reload using Docker"
34-
@echo " livedocs - generate Sphinx HTML documentation with server and live reload"
35-
@echo " build-docs - generate Sphinx HTML documentation using Docker"
33+
@echo " docs - generate mkdocs HTML documentation with server and live reload using Docker"
34+
@echo " docs-setup - install dependencies required for building the docs"
35+
@echo " livedocs - generate mkdocs HTML documentation with server and live reload"
36+
@echo " build-docs - generate mkdocs HTML documentation using Docker"
3637
@echo " build-ci - build docker images for use in our CI pipeline"
3738
@echo " test-ci - run tests against files in docker image built by CI"
3839
@echo " compile-requirements - update Python requirements files using pip-compile"
@@ -131,10 +132,13 @@ docs: .docker-build-pull
131132
${DC} up docs
132133

133134
build-docs: .docker-build-pull
134-
${DC} run app make -C docs/ clean html
135+
${DC} run app make -C docs/ clean build
136+
137+
docs-setup:
138+
${MAKE} -C docs/ clean preflight
135139

136140
livedocs:
137-
${MAKE} -C docs/ clean livehtml
141+
${MAKE} -C docs/ clean serve
138142

139143
test_infra/fixtures/tls.json:
140144
${DOCKER} run -it --rm jumanjiman/ssllabs-scan:latest --quiet https://${TEST_DOMAIN}/en-US/ > "test_infra/fixtures/tls.json"
@@ -204,4 +208,4 @@ install-custom-git-hooks:
204208
uninstall-custom-git-hooks:
205209
rm .git/hooks/post-merge
206210

207-
.PHONY: all clean build pull docs livedocs build-docs lint run stop kill run-shell shell test test-image rebuild build-ci test-ci fresh-data djshell run-prod build-prod test-cdn compile-requirements check-requirements install-local-python-deps preflight clean-local-deps install-custom-git-hooks uninstall-custom-git-hooks run-local-task-queue
211+
.PHONY: all clean build pull docs docs-setup livedocs build-docs lint run stop kill run-shell shell test test-image rebuild build-ci test-ci fresh-data djshell run-prod build-prod test-cdn compile-requirements check-requirements install-local-python-deps preflight clean-local-deps install-custom-git-hooks uninstall-custom-git-hooks run-local-task-queue

‎docker-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ services:
133133
docs:
134134
image: mozmeao/bedrock_test:${GIT_COMMIT:-latest}
135135
platform: linux/amd64
136-
command: sphinx-autobuild "docs" "docs/_build/html" --host 0.0.0.0 --port 8100
136+
command: mkdocs serve -a "0.0.0.0:8100"
137137
ports:
138138
- "8100:8100"
139139
volumes:

‎docs/Makefile

+5-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
BUILDDIR = site
88

9-
.PHONY: help clean preflight serve
9+
.PHONY: help clean preflight serve build
1010

1111
help:
1212
@echo "Please use \`make <target>' where <target> is one of"
@@ -21,4 +21,7 @@ preflight:
2121
pip install -r ../requirements/docs.txt
2222

2323
serve:
24-
mkdocs serve
24+
mkdocs serve --open
25+
26+
build:
27+
mkdocs build

‎docs/docs/install.md

+9-12
Original file line numberDiff line numberDiff line change
@@ -272,26 +272,23 @@ $ make build-prod run-prod
272272

273273
### Documentation
274274

275-
This is a great place for coders and non-coders alike to contribute! Please note most of the documentation is currently in [reStructuredText](https://bashtage.github.io/sphinx-material/basics.html) but we also support [Markdown](https://www.markdownguide.org/) files.
275+
This is a great place for coders and non-coders alike to contribute!
276276

277277
If you see a typo or similarly small change, you can use the "Edit in GitHub" link to propose a fix through GitHub. Note: you will not see your change directly committed to the main branch. You will commit the change to a separate branch so it can be reviewed by a staff member before merging to main.
278278

279-
If you want to make a bigger change or [find a Documentation issue on the repo](https://github.com/mozilla/bedrock/labels/Documentation), it is best to edit and preview locally before submitting a pull request. You can do this with Docker or Local installations. Run the commands from your root folder. They will build documentation and start a live server to auto-update any changes you make to a documentation file.
280-
281-
Docker:
282-
283-
``` bash
284-
$ make docs
285-
```
286-
287-
Local:
279+
If you want to make a bigger change or [find a Documentation issue on the repo](https://github.com/mozilla/bedrock/labels/Documentation), it is best to edit and preview locally before submitting a pull request. Run the commands from your root folder. They will build documentation and start a live server to auto-update any changes you make to a documentation file.
288280

281+
#### Docker
289282
``` bash
290-
$ pip install -r requirements/docs.txt
283+
make docs
291284
```
292285

286+
#### Local
293287
``` bash
294-
$ make livedocs
288+
# docs-setup installs the docs requirements
289+
# only need to run this the first time
290+
make docs-setup
291+
make livedocs
295292
```
296293

297294
## Localization

0 commit comments

Comments
 (0)
Please sign in to comment.