Skip to content

Commit

Permalink
makefile: Add docs-live target
Browse files Browse the repository at this point in the history
This enables faster iteration on documentation.

Signed-off-by: Matheus Nascimento <[email protected]>
  • Loading branch information
Matheus Nascimento authored and godlygeek committed Jul 23, 2024
1 parent 8b739c5 commit 2fe9891
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@ docs: ## Generate documentation
$(MAKE) -C docs clean
$(MAKE) -C docs html

.PHONY: docs-live
docs-live: ## Serve documentation on localhost:8000, with live-reload
$(MAKE) -C docs clean
$(MAKE) -C docs livehtml

.PHONY: gh-pages
gh-pages: ## Publish documentation on GitHub Pages
$(eval GIT_REMOTE := $(shell git remote get-url $(UPSTREAM_GIT_REMOTE)))
Expand Down
12 changes: 12 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Minimal makefile for Sphinx documentation
#

SPHINXAUTOBUILD = sphinx-autobuild

# You can set these variables from the command line.
SPHINXOPTS = -n -W --keep-going
SPHINXBUILD = sphinx-build
Expand All @@ -22,3 +24,13 @@ html:
$(SPHINXBUILD) -W -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."

.PHONY: man
man:
$(SPHINXBUILD) -b man -D exclude_patterns= $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The man pages are in $(BUILDDIR)/man."

.PHONY: livehtml
livehtml:
$(SPHINXAUTOBUILD) -a $(ALLSPHINXOPTS) $(BUILDDIR)/html

0 comments on commit 2fe9891

Please sign in to comment.