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

How to build with the ReadTheDocs Docker container #9

Open
westurner opened this issue Feb 9, 2020 · 5 comments
Open

How to build with the ReadTheDocs Docker container #9

westurner opened this issue Feb 9, 2020 · 5 comments

Comments

@westurner
Copy link

The RTD containers have multiple versions of Python and e.g. all of LaTeX installed:
https://hub.docker.com/r/readthedocs/build/

An excerpted Dockerfile and Makefile for building docs with the ReadTheDocs container:
https://gist.github.com/westurner/9827e4d2665d08832ad37343085721d3

@ammaraskar
Copy link
Owner

Hey @westurner, sorry for the late reply. Could you give me a quick explanation of what the use case here is? Do you have an example of a full repo where someone utilizes the RTD containers for their documentation builds?

From my other project: https://pycraft.readthedocs.io/en/latest/, most of the setup is done so that it just looks like a plain-old sphinx project https://github.com/ammaraskar/pyCraft/tree/master/docs and then RTD handles the building portion.

Is this so you can build the documentation with different versions of Python or automatically handle installing LaTeX etc?

@westurner
Copy link
Author

westurner commented Feb 16, 2020 via email

@duhd1993
Copy link

duhd1993 commented Feb 15, 2021

Sphinx team also provides a docker image with latex. It’s smaller than the RTD one, but just enough for most use cases. I’d like to see the action allowing customization of Image used. Not sure if it’s doable. Might be easier to just fork and change the image name.

@westurner
Copy link
Author

westurner commented Feb 15, 2021

To build MyST Markdown (with docutils and Sphinx roles and directives), jupyter-book has these
https://github.com/executablebooks/jupyter-book/blob/947b30f077dae7e39e34861360850dde3db67745/setup.py#L65 install_requires edit: and also docs/requirements.txt ::

install_requires=[
        "pyyaml",
        "docutils>=0.15",
        "sphinx>=2,<4",
        "linkify-it-py~=1.0.1",
        "myst-nb~=0.11.1",
        "jupytext~=1.8.0",
        "click",
        "setuptools",
        "nbformat",
        "nbconvert<6",
        "jsonschema",
        "sphinx_togglebutton",
        "sphinx-copybutton",
        "sphinx-comments",
        "sphinxcontrib-bibtex~=2.1.0",
        "sphinx_book_theme>=0.0.39",
        "sphinx-thebe>=0.0.6",
        "sphinx-panels~=0.5.2",
        "nested-lookup~=0.2.21",
    ],

@westurner
Copy link
Author

Have you seen anything for hosting multiple versions of docs with just GitHub Pages?

Could set the BUILDDIR to /docs/_build/html/./en/{revtag}/ and then add the /index.html and /en/latest/index.html pages with a templated HTML meta and/or JS redirect to the configured latest revtag URL: /en/v1.0.5/

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

3 participants