mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-09-16 07:16:04 +02:00
Implemented draft for py yml and optimized assets urls
This commit is contained in:
@@ -7,17 +7,26 @@ SPHINXBUILD ?= sphinx-build
|
||||
SPHINX_SOURCE_DIR ?= ../
|
||||
SPHINX_BUILD_DIR ?= ../docs
|
||||
|
||||
.PHONY: help install copy-images Makefile
|
||||
.PHONY: help install copy-images apidoc html Makefile
|
||||
|
||||
# Copy images before running any Sphinx command (except for help)
|
||||
copy-images:
|
||||
@echo "Copying images from ../images/ to ./assets/img/..."
|
||||
@echo "Copying images from ../assets/img/ to ./assets/img/..."
|
||||
cp -r ../assets/img/* ./assets/img/
|
||||
|
||||
# Generate reStructuredText files from Python modules using sphinx-apidoc
|
||||
apidoc:
|
||||
@echo "Running sphinx-apidoc..."
|
||||
sphinx-apidoc -f -o $(SPHINX_SOURCE_DIR)/modules $(SPHINX_SOURCE_DIR)
|
||||
|
||||
# "help" target does not copy images
|
||||
help:
|
||||
@$(SPHINXBUILD) -M help "$(SPHINX_SOURCE_DIR)" "$(SPHINX_BUILD_DIR)" $(SPHINXOPTS) $(O)
|
||||
|
||||
# HTML target depends on apidoc so that sphinx-apidoc runs first
|
||||
html: copy-images apidoc
|
||||
@$(SPHINXBUILD) -M html "$(SPHINX_SOURCE_DIR)" "$(SPHINX_BUILD_DIR)" $(SPHINXOPTS) $(O)
|
||||
|
||||
# Catch-all target: route all unknown targets to Sphinx using the new
|
||||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
||||
%: Makefile
|
||||
|
Reference in New Issue
Block a user