diff --git a/README.rst b/README.rst index d097a9e98e..916eb1a861 100644 --- a/README.rst +++ b/README.rst @@ -155,6 +155,43 @@ You can also run them in parallel: tox -- -n auto tests/integ +Building Sphinx docs +~~~~~~~~~~~~~~~~~~~~ + +Setup a Python environment with ``sphinx`` and ``sagemaker``: + +:: + + conda create -n sagemaker python=3.7 + conda activate sagemaker + conda install sphinx==2.2.2 + pip install sagemaker --user + +Install the Read The Docs theme: + +:: + + pip install sphinx_rtd_theme --user + + +Clone/fork the repo, ``cd`` into the ``sagemaker-python-sdk/doc`` directory and run: + +:: + + make html + +You can edit the templates for any of the pages in the docs by editing the .rst files in the ``doc`` directory and then running ``make html`` again. + +Preview the site with a Python web server: + +:: + + cd _build/html + python -m http.server 8000 + +View the website by visiting http://localhost:8000 + + MXNet SageMaker Estimators -------------------------- diff --git a/doc/conf.py b/doc/conf.py index a60d919712..3e58480978 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -13,7 +13,6 @@ """Placeholder docstring""" from __future__ import absolute_import -import os import pkg_resources import sys from datetime import datetime @@ -83,10 +82,8 @@ def __getattr__(cls, name): autodoc_default_flags = ["show-inheritance", "members", "undoc-members"] autodoc_member_order = "bysource" -if "READTHEDOCS" in os.environ: - html_theme = "default" -else: - html_theme = "haiku" +html_theme = "sphinx_rtd_theme" + html_static_path = [] htmlhelp_basename = "%sdoc" % project