Skip to content

Commit

Permalink
setup readthedocs
Browse files Browse the repository at this point in the history
  • Loading branch information
StoneT2000 committed Mar 2, 2024
1 parent d04c2dc commit feac378
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 7 deletions.
32 changes: 32 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.9"
# You can also specify other tool versions:
# nodejs: "19"
# rust: "1.64"
# golang: "1.19"

# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/source/conf.py

# Optionally build your docs in additional formats such as PDF and ePub
# formats:
# - pdf
# - epub

# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: docs/requirements.txt
12 changes: 5 additions & 7 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = [
"sphinx_rtd_theme",
"sphinx.ext.autodoc",
"sphinx.ext.mathjax",
"sphinx.ext.viewcode",
"sphinx_copybutton",
"myst_parser",
"sphinx_subfigure",
Expand All @@ -35,14 +35,12 @@
# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = "sphinx_rtd_theme"
# html_static_path = ["_static"]
html_theme = "sphinx_book_theme"

# replace "view page source" with "edit on github" in Read The Docs theme
# * https://github.com/readthedocs/sphinx_rtd_theme/issues/529
html_context = {
"display_github": True,
"github_user": "haosulab",
"github_repo": "ManiSkill2",
"github_version": "main/docs/source/",
}
"github_version": "main",
"conf_py_path": "/source/"
}
12 changes: 12 additions & 0 deletions docs/source/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
sphinx==6.2.1
sphinx-autobuild
sphinx-book-theme
# For spelling
sphinxcontrib.spelling
# Type hints support
sphinx-autodoc-typehints
# Copy button for code snippets
sphinx_copybutton
# Markdown parser
myst-parser
sphinx-subfigure

0 comments on commit feac378

Please sign in to comment.