From c88c3a40c634706ad29e8a0b0f061c6d8f8843e4 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Tue, 24 Dec 2013 17:23:38 -0500 Subject: [PATCH] Use the sphinx_rtd_theme --- docsite/Makefile | 2 -- docsite/README.md | 17 ++++++++++------- docsite/conf.py | 16 ++++++++++------ 3 files changed, 20 insertions(+), 15 deletions(-) diff --git a/docsite/Makefile b/docsite/Makefile index 173de31756a..56b84fbc88b 100644 --- a/docsite/Makefile +++ b/docsite/Makefile @@ -6,8 +6,6 @@ all: clean docs docs: clean modules ./build-site.py - cp _static/* htmlout/_static/ - cp _themes/solar/static/* htmlout/_static/ viewdocs: clean ./build-site.py view diff --git a/docsite/README.md b/docsite/README.md index dd4f460805a..bc6ee181399 100644 --- a/docsite/README.md +++ b/docsite/README.md @@ -5,12 +5,14 @@ This project hosts the source behind [ansibleworks.com/docs](http://www.ansiblew Contributions to the documentation are welcome. To make changes, submit a pull request that changes the reStructuredText files in the "rst/" directory only, and Michael can -do a docs build and push the static files. If you wish to verify output from the markup -such as link references, you may [install Sphinx] and build the documentation by running -`make viewdocs` from the `ansible/docsite` directory. To include module documentation -you'll need to run `make webdocs` at the top level of the repository. The generated -html files are in docsite/htmlout/ and really won't be formatted right until up -on ansibleworks.com. +do a docs build and push the static files. + +If you wish to verify output from the markup +such as link references, you may install sphinx and build the documentation by running +`make viewdocs` from the `ansible/docsite` directory. + +To include module documentation you'll need to run `make webdocs` at the top level of the repository. The generated +html files are in docsite/htmlout/. If you do not want to learn the reStructuredText format, you can also [file issues] about documentation problems on the Ansible GitHub project. @@ -19,7 +21,8 @@ Note that module documentation can actually be [generated from a DOCUMENTATION d in the modules directory, so corrections to modules written as such need to be made in the module source, rather than in docsite source. -[install Sphinx]: http://sphinx-doc.org/install.html +To install sphinx and the required theme, install pip and then "pip install sphinx sphinx_rtd_theme" + [file issues]: https://github.com/ansible/ansible/issues [module-docs]: http://www.ansibleworks.com/docs/developing_modules.html#documenting-your-module diff --git a/docsite/conf.py b/docsite/conf.py index 4b66a713826..5615ff135fc 100644 --- a/docsite/conf.py +++ b/docsite/conf.py @@ -16,13 +16,17 @@ import sys import os +# pip install sphinx_rtd_theme +import sphinx_rtd_theme +html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] + # If your extensions are in another directory, add it here. If the directory # is relative to the documentation root, use os.path.abspath to make it # absolute, like shown here. #sys.path.append(os.path.abspath('some/directory')) - -sys.path.insert(0, os.path.join('ansible', 'lib')) -sys.path.append(os.path.abspath('_themes')) +# +#sys.path.insert(0, os.path.join('ansible', 'lib')) +#sys.path.append(os.path.abspath('_themes')) VERSION='0.01' AUTHOR='AnsibleWorks' @@ -100,14 +104,14 @@ pygments_style = 'sphinx' # Options for HTML output # ----------------------- -html_theme_path = ['_themes'] -html_theme = 'solar' +#html_theme_path = ['_themes'] +html_theme = 'sphinx_rtd_theme' html_short_title = 'Ansible Documentation' # The style sheet to use for HTML and HTML Help pages. A file of that name # must exist either in Sphinx' static/ path, or in one of the custom paths # given in html_static_path. -html_style = 'solar.css' +#html_style = 'solar.css' # The name for this set of Sphinx documents. If None, it defaults to # " v documentation".