read-the-docs

Using github actions to publish documentation

人盡茶涼 提交于 2019-12-21 22:04:16
问题 What I considered: github offers github pages to host documentation in either a folder on my master branch or a dedicated gh-pages branch, but that would mean to commit build artifacts I can also let readthedocs build and host docs for me through webhooks, but that means learning how to configure Yet Another Tool at a point in time where I try to consolidate everything related to my project in github-actions I already have a docu-building process that works for me (using sphinx as the builder

Mock with submodules for ReadTheDocs

泪湿孤枕 提交于 2019-12-21 09:28:49
问题 I'm trying to document a Python project with ReadTheDocs. Initially, the build process would die when it got to: from osgeo import gdal, osr I've read the rtd faq and used mock for the osgeo module that was giving me trouble. Now the build process makes it past that import but chokes on: from osgeo.gdalconst import * With this rather unhelpful error: RuntimeError: sys.path must be a list of directory names I'm completely new to using mock but I think the problem is that osgeo is a mock module

Mock with submodules for ReadTheDocs

吃可爱长大的小学妹 提交于 2019-12-21 09:27:56
问题 I'm trying to document a Python project with ReadTheDocs. Initially, the build process would die when it got to: from osgeo import gdal, osr I've read the rtd faq and used mock for the osgeo module that was giving me trouble. Now the build process makes it past that import but chokes on: from osgeo.gdalconst import * With this rather unhelpful error: RuntimeError: sys.path must be a list of directory names I'm completely new to using mock but I think the problem is that osgeo is a mock module

How to add Sphinx-generated index to the sidebar when using Read the Docs theme?

有些话、适合烂在心里 提交于 2019-12-21 07:04:10
问题 I'd like to have a link to the automatically generated index in the sidebar when using sphinx-rtd-theme . I've tried adding it to the toctree: .. toctree:: first second Index <:ref:`genindex`> but this resulted in WARNING: toctree contains reference to nonexisting document u':ref:`geinindex`' from Sphinx and no other effect. I think I could simply hardcode the index in the theme layout.html file, but perhaps there is some better way, not involving modifying the standard theme? TIA for any

How to add Sphinx-generated index to the sidebar when using Read the Docs theme?

≡放荡痞女 提交于 2019-12-21 07:04:08
问题 I'd like to have a link to the automatically generated index in the sidebar when using sphinx-rtd-theme . I've tried adding it to the toctree: .. toctree:: first second Index <:ref:`genindex`> but this resulted in WARNING: toctree contains reference to nonexisting document u':ref:`geinindex`' from Sphinx and no other effect. I think I could simply hardcode the index in the theme layout.html file, but perhaps there is some better way, not involving modifying the standard theme? TIA for any

Show entire toctree in Read The Docs sidebar

本小妞迷上赌 提交于 2019-12-21 03:45:47
问题 It's my understanding the new Read The Docs theme generates the sidebar from the toctree with a depth of 2. My documentation is relatively deep, and a depth of 2 is not enough for it to be useful. How can I increase this limit, or preferably remove it entirely? If that's not reasonably possible, how can I use local ToC's instead of the global toctree? 回答1: Note: The previous answer was outdated. As @Ariel notes in a comment, the maxdepth is now configurable by setting navigation_depth in html

Change the colors of the Sphinx Read The Docs theme?

风流意气都作罢 提交于 2019-12-20 12:36:26
问题 I'm building documentation for my API library and I'm having readthedocs.io host the documentation, and is backed with Sphinx. I have the Read The Docs theme installed for Sphinx using pip install , and the Read the Docs website currently has the documentation running. I would like to change the colors of my documentation. I have done some searching through their GitHub repository GitHub.com and have seen some talk that editing the sass files. However, I can't seem to find where these files

Using Sphinx to automatically generate a separate document for each function

安稳与你 提交于 2019-12-17 16:36:18
问题 I've been building a Python module with many different functions. I'm using Sphinx and readthedocs to provide documentation. I've made decent progress, but currently I have one massive page that gives the documentation for all of my functions (in alphabetical order). I've looked at other projects which have a separate page for each function. In looking through their source, I find a separate .rst file has been created for each. I assume this is done automatically, and this page on generating

How do I set up custom styles for reStructuredText, Sphinx, ReadTheDocs, etc.?

独自空忆成欢 提交于 2019-12-17 12:44:49
问题 I want to extend the theme used by Sphinx and ReadTheDocs with my own custom styles. What is the best way I can do this so that my changes will stick? 回答1: Assumptions Your RTD doc set has something like the following structure: (root path) (some other stuff not germane to this discussion) _static/ _templates/ conf.py You're also building locally using sphinx-build or sphinx-autobuild using the default theme, but your deployed server might use the sphinx-rtd-theme instead. Use Case: Hatnotes

Removing the Edit on Github link when using Read The Docs & Sphinx with ReadTheDocs Theme

大憨熊 提交于 2019-12-12 15:14:02
问题 I'm trying to find out how to use the _template overrides option in Sphinx to override the default ReadTheDocs theme for hosting Sphinx documentation on http://readthedocs.org. Specifically, I'm wanting to remove/hide the "Edit on Github" link shown in the upper right hand corner of this theme. Any tips would be greatly appreciated! Thanks! I've reviewed the documentation here: http://www.sphinx-doc.org/en/stable/templating.html, however, I'm stumped and really need some help. Thank you! 回答1: