Browse Source

fix: add live-reload to make docs.serve (#5676)

Gustavo Fernandes de Carvalho 4 months ago
parent
commit
12833a4fda
2 changed files with 5 additions and 2 deletions
  1. 2 2
      hack/api-docs/Makefile
  2. 3 0
      hack/api-docs/mkdocs.yml

+ 2 - 2
hack/api-docs/Makefile

@@ -96,7 +96,7 @@ clean:
 # serve runs mkdocs as a local webserver for interactive development.
 # This will serve the live copy of the docs on 127.0.0.1:8000.
 .PHONY: serve
-serve: build
+serve: image generate
 	$(DOCKER) run \
 		-it \
 		--sig-proxy=true \
@@ -105,4 +105,4 @@ serve: build
 		-p $(SERVE_BIND_ADDRESS):8000:8000 \
 		--rm \
 		$(MKDOCS_IMAGE) \
-		$(SHELL) -c "cd /repo && mkdocs serve -f hack/api-docs/mkdocs.yml -a 0.0.0.0:8000"
+		$(SHELL) -c "cd /repo && mkdocs serve -f hack/api-docs/mkdocs.yml -a 0.0.0.0:8000 --livereload"

+ 3 - 0
hack/api-docs/mkdocs.yml

@@ -5,6 +5,9 @@ site_dir: ../../site
 docs_dir: ../../docs
 edit_uri: ./edit/main/docs/
 remote_branch: gh-pages
+watch:
+  - ../../docs
+  - ../../overrides
 theme:
   name: material
   palette: