Last active
January 30, 2019 16:32
-
-
Save mr-ubik/8f3680cc3e665cda9e69db60320fa44a to your computer and use it in GitHub Desktop.
Sphynx Docs setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
session_name: PROJECT | |
environment: | |
SPHINX_HOST: "0.0.0.0" | |
SPHINX_PORT: "8000" | |
windows: | |
- window_name: "Sphinx" | |
layout: "main-vertical" | |
start_directory: "${PWD}" | |
focus: true | |
panes: | |
- shell_command: | |
- source venv/bin/activate | |
- cd docs | |
- xdg-open http://$SPHINX_HOST:$SPHINX_PORT | |
- make HOST=$SPHINX_HOST PORT=$SPHINX_PORT livehtml | |
- focus: true | |
shell_command: | |
- cd docs/source | |
- $EDITOR . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pip install \ | |
sphinx \ | |
sphinx-autobuild \ | |
sphinx-autodoc-typehints \ | |
sphinx-rtd-theme \ | |
pydocstyle \ | |
doc8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Minimal makefile for Sphinx documentation | |
# Autobuild support | |
# You can set these variables from the command line. | |
SPHINXOPTS = | |
SPHINXBUILD = sphinx-build | |
SOURCEDIR = source | |
BUILDDIR = build | |
PORT = 8000 | |
HOST = localhost | |
# Put it first so that "make" without argument is like "make help". | |
help: | |
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | |
.PHONY: help Makefile | |
livehtml: | |
sphinx-autobuild -H $(HOST) -p $(PORT) -b html "$(SOURCEDIR)" "$(BUILDDIR)"/html $(SPHINXOPTS) | |
# Catch-all target: route all unknown targets to Sphinx using the new | |
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | |
%: Makefile | |
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment