Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML loomine dockeriga #119

Open
agoluberg opened this issue Oct 4, 2019 · 0 comments
Open

HTML loomine dockeriga #119

agoluberg opened this issue Oct 4, 2019 · 0 comments

Comments

@agoluberg
Copy link
Contributor

Ma tegin praegu käsitsi läbi, aga tundub, et umbes selline värk võiks toimida. Vaata ka siia: https://gitlab.com/ddidier/docker-sphinx-doc

Kõigepealt juhendi järgi dockeri build.

Seejärel on vaja Makefile lisada lähtekoodi. Selle ma lasin sphinx-init skriptiga luua. Faili sisu on järgmine:


# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line.
SPHINXOPTS    =
SPHINXBUILD   = sphinx-build
SOURCEDIR     = .
BUILDDIR      = _build

# Put it first so that "make" without argument is like "make help".
help:
        @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# 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)

SPHINXPORT = 8000

livehtml:
        sphinx-autobuild -b html --host 0.0.0.0 --port $(SPHINXPORT) $(ALLSPHINXOPTS) "$(SOURCEDIR)" "$(BUILDDIR)/html"

Kui selline fail on olemas juurkaustas, siis saab html-i genereerida järgmiselt:

docker run -i -v /home/user/javadoc/:/doc -e USER_ID=$UID ddidier/sphinx-doc make html

Kus /home/user/javadoc on kaust, kuhu on kloonitud repo.

Võiks praeguse setup.py teha vastavalt ringi, et kutsutakse vajalikud käsud välja läbi dockeri. Too skript pannakse käima build masinas. Sealt kopeeritakse lihtsalt html vajalikku kohta (see jääb väljapoole skripti).

@ghost ghost assigned ghost and unassigned ghost Oct 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant