mirror of
https://github.com/tcsenpai/Zundler.git
synced 2025-06-06 11:35:40 +00:00
Update docs
This commit is contained in:
parent
a3e8d39a9e
commit
fa7e438b3d
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,3 +1,6 @@
|
|||||||
.eggs
|
.eggs
|
||||||
build
|
build
|
||||||
|
dist
|
||||||
tests
|
tests
|
||||||
|
_download
|
||||||
|
_version.py
|
||||||
|
123
Makefile
Normal file
123
Makefile
Normal file
@ -0,0 +1,123 @@
|
|||||||
|
ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
|
||||||
|
DOWNLOAD ?= $(ROOT_DIR)/_download
|
||||||
|
OUTPUT ?= $(ROOT_DIR)/docs/output
|
||||||
|
REF ?= main
|
||||||
|
|
||||||
|
define clone_repo =
|
||||||
|
if [ -d $(DOWNLOAD)/$(2) ] ; then \
|
||||||
|
git -C $(DOWNLOAD)/$(2) pull ; \
|
||||||
|
else \
|
||||||
|
git clone --depth 1 https://github.com/$(1)/$(2) $(DOWNLOAD)/$(2) ; \
|
||||||
|
fi
|
||||||
|
endef
|
||||||
|
|
||||||
|
define create_venv =
|
||||||
|
if [ ! -d $(DOWNLOAD)/$(1)/venv ] ; then \
|
||||||
|
python3 -m venv $(DOWNLOAD)/$(1)/venv ; \
|
||||||
|
fi
|
||||||
|
endef
|
||||||
|
|
||||||
|
# Arguments:
|
||||||
|
# 1: github account
|
||||||
|
# 2: github repo
|
||||||
|
define prepare =
|
||||||
|
$(call clone_repo,$(1),$(2))
|
||||||
|
$(call create_venv,$(2))
|
||||||
|
. $(DOWNLOAD)/$(2)/venv/bin/activate ; \
|
||||||
|
pip install git+file:////$(ROOT_DIR)@$(REF)
|
||||||
|
endef
|
||||||
|
|
||||||
|
|
||||||
|
help:
|
||||||
|
@echo help
|
||||||
|
|
||||||
|
|
||||||
|
sphinx: $(OUTPUT)/sphinx.html
|
||||||
|
|
||||||
|
|
||||||
|
$(OUTPUT)/sphinx.html: Makefile
|
||||||
|
$(call prepare,sphinx-doc,sphinx)
|
||||||
|
NAME=sphinx ; \
|
||||||
|
DOCS=doc ; \
|
||||||
|
. $(DOWNLOAD)/$$NAME/venv/bin/activate ; \
|
||||||
|
pip install $(DOWNLOAD)/$$NAME[docs] ; \
|
||||||
|
make -C $(DOWNLOAD)/$$NAME/$$DOCS zundler ; \
|
||||||
|
cp $(DOWNLOAD)/$$NAME/$$DOCS/_build/zundler/index.html $(OUTPUT)/$$NAME.html
|
||||||
|
|
||||||
|
|
||||||
|
cpython: $(OUTPUT)/cpython.html
|
||||||
|
|
||||||
|
|
||||||
|
$(OUTPUT)/cpython.html: Makefile
|
||||||
|
$(call prepare,python,cpython)
|
||||||
|
NAME=cpython ; \
|
||||||
|
DOCS=Doc ; \
|
||||||
|
. $(DOWNLOAD)/$$NAME/venv/bin/activate ; \
|
||||||
|
pip install -r $(DOWNLOAD)/$$NAME/$$DOCS/requirements.txt ; \
|
||||||
|
make -C $(DOWNLOAD)/$$NAME/$$DOCS BUILDER=zundler SPHINXOPTS='-D zundler_root_doc=index' build ; \
|
||||||
|
cp $(DOWNLOAD)/$$NAME/$$DOCS/build/zundler/index.html $(OUTPUT)/$$NAME.html
|
||||||
|
|
||||||
|
|
||||||
|
myst-parser: $(OUTPUT)/myst-parser.html
|
||||||
|
|
||||||
|
|
||||||
|
$(OUTPUT)/myst-parser.html: Makefile
|
||||||
|
$(call prepare,executablebooks,myst-parser)
|
||||||
|
NAME=myst-parser ; \
|
||||||
|
DOCS=docs ; \
|
||||||
|
. $(DOWNLOAD)/$$NAME/venv/bin/activate ; \
|
||||||
|
pip install $(DOWNLOAD)/$$NAME[linkify,rtd] ; \
|
||||||
|
make -C $(DOWNLOAD)/$$NAME/$$DOCS zundler ; \
|
||||||
|
cp $(DOWNLOAD)/$$NAME/$$DOCS/_build/zundler/index.html $(OUTPUT)/$$NAME.html
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
flask: $(OUTPUT)/flask.html
|
||||||
|
|
||||||
|
|
||||||
|
$(OUTPUT)/flask.html: Makefile
|
||||||
|
$(call prepare,pallets,flask)
|
||||||
|
NAME=flask ; \
|
||||||
|
DOCS=docs ; \
|
||||||
|
. $(DOWNLOAD)/$$NAME/venv/bin/activate && \
|
||||||
|
pip install -r $(DOWNLOAD)/$$NAME/requirements/docs.txt && \
|
||||||
|
pip install -e $(DOWNLOAD)/$$NAME && \
|
||||||
|
make -C $(DOWNLOAD)/$$NAME/$$DOCS zundler SPHINXOPTS='-D zundler_append_post="window.addEventListener(\"load\", function(){window.document.querySelector(\"#searchbox\").style.display=\"\"});"' && \
|
||||||
|
cp $(DOWNLOAD)/$$NAME/$$DOCS/_build/zundler/index.html $(OUTPUT)/$$NAME.html
|
||||||
|
|
||||||
|
|
||||||
|
setuptools: $(OUTPUT)/setuptools.html
|
||||||
|
|
||||||
|
|
||||||
|
$(OUTPUT)/setuptools.html: Makefile
|
||||||
|
$(call prepare,pypa,setuptools)
|
||||||
|
NAME=setuptools ; \
|
||||||
|
DOCS=docs ; \
|
||||||
|
. $(DOWNLOAD)/$$NAME/venv/bin/activate && \
|
||||||
|
pip install -e $(DOWNLOAD)/$$NAME[docs] && \
|
||||||
|
cd $(DOWNLOAD)/$$NAME/$$DOCS && \
|
||||||
|
sphinx-build -b zundler . _build/zundler && \
|
||||||
|
cp _build/zundler/index.html $(OUTPUT)/$$NAME.html
|
||||||
|
|
||||||
|
|
||||||
|
readthedocs: $(OUTPUT)/readthedocs.html
|
||||||
|
|
||||||
|
|
||||||
|
$(OUTPUT)/readthedocs.html: Makefile
|
||||||
|
$(call prepare,readthedocs,readthedocs.org)
|
||||||
|
NAME=readthedocs.org ; \
|
||||||
|
DOCS=docs ; \
|
||||||
|
. $(DOWNLOAD)/$$NAME/venv/bin/activate && \
|
||||||
|
pip install -r $(DOWNLOAD)/$$NAME/requirements/docs.txt && \
|
||||||
|
cd $(DOWNLOAD)/$$NAME/$$DOCS && \
|
||||||
|
sphinx-build -b zundler . _build/zundler && \
|
||||||
|
cp _build/zundler/index.html $(OUTPUT)/$$NAME.html
|
||||||
|
|
||||||
|
|
||||||
|
clean:
|
||||||
|
@rm -rf $(DOWNLOAD)
|
||||||
|
|
||||||
|
|
||||||
|
all: sphinx cpython myst-parser flask pygments setuptools
|
||||||
|
|
||||||
|
.PHONY: all clean sphinx cpython myst-parser flask pygments setuptools
|
14
docs/index.html
Normal file
14
docs/index.html
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<!DOCTYPE html><html><head></head><body>
|
||||||
|
|
||||||
|
Self-contained HTML files generated with <a href='https://github.com/AdrianVollmer/Zundler'>Zundler</a>:
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li> <a href='output/cpython.html'>CPython</a>
|
||||||
|
<li> <a href='output/flask.html'>Flask</a>
|
||||||
|
<li> <a href='output/myst-parser.html'>MyST Parser</a>
|
||||||
|
<li> <a href='output/sphinx.html'>Sphinx</a>
|
||||||
|
<li> <a href='output/setuptools.html'>Setuptools</a>
|
||||||
|
<li> <a href='output/readthedocs.org.html'>Read the Docs</a>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</body></html>
|
253
docs/output/cpython.html
Normal file
253
docs/output/cpython.html
Normal file
File diff suppressed because one or more lines are too long
253
docs/output/flask.html
Normal file
253
docs/output/flask.html
Normal file
File diff suppressed because one or more lines are too long
254
docs/output/myst-parser.html
Normal file
254
docs/output/myst-parser.html
Normal file
File diff suppressed because one or more lines are too long
253
docs/output/readthedocs.org.html
Normal file
253
docs/output/readthedocs.org.html
Normal file
File diff suppressed because one or more lines are too long
253
docs/output/setuptools.html
Normal file
253
docs/output/setuptools.html
Normal file
File diff suppressed because one or more lines are too long
253
docs/output/sphinx.html
Normal file
253
docs/output/sphinx.html
Normal file
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@
|
|||||||
<!DOCTYPE html><html><head></head><body>Hello, World</body></html>
|
|
Loading…
x
Reference in New Issue
Block a user