Skip to content

Commit

Permalink
feat: Allow mkdocs to livereload when using docker (argoproj#17383)
Browse files Browse the repository at this point in the history
* feat: Allow mkdocs to livereload when using docker

Signed-off-by: Carlos Santana <csantana23@gmail.com>

* update the docs

Signed-off-by: Carlos Santana <csantana23@gmail.com>

---------

Signed-off-by: Carlos Santana <csantana23@gmail.com>
Signed-off-by: Mangaal <angommeeteimangaal@gmail.com>
  • Loading branch information
csantanapr authored and Mangaal committed Mar 14, 2024
1 parent 405c8f6 commit 6a60857
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -528,8 +528,7 @@ serve-docs-local:

.PHONY: serve-docs
serve-docs:
docker run ${MKDOCS_RUN_ARGS} --rm -it -p 8000:8000 -v ${CURRENT_DIR}/site:/site -w /site --entrypoint "" ${MKDOCS_DOCKER_IMAGE} python3 -m http.server --bind 0.0.0.0 8000

docker run ${MKDOCS_RUN_ARGS} --rm -it -p 8000:8000 -v ${CURRENT_DIR}:/docs -w /docs --entrypoint "" ${MKDOCS_DOCKER_IMAGE} sh -c 'pip install -r docs/requirements.txt; mkdocs serve -a $$(ip route get 1 | awk '\''{print $$7}'\''):8000'

# Verify that kubectl can connect to your K8s cluster from Docker
.PHONY: verify-kube-connect
Expand Down
11 changes: 8 additions & 3 deletions docs/developer-guide/site.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,20 @@

## Developing And Testing

The website is built using `mkdocs` and `mkdocs-material`.
The website is built using `mkdocs` and `mkdocs-material`.

To test:

```bash
make build-docs
make serve-docs
```
Once running, you can view your locally built documentation at [http://0.0.0.0:8000/](http://0.0.0.0:8000/).
Once running, you can view your locally built documentation at [http://0.0.0.0:8000/](http://0.0.0.0:8000/).
Make a change to documentation and the website will rebuild and refresh the view.

Before submitting a PR build the website, to verify that there are no erros building the site
```bash
make build-docs
```

## Analytics

Expand Down

0 comments on commit 6a60857

Please sign in to comment.