diff --git a/kamaji-api/doc/source/conf.py b/kamaji-api/doc/source/conf.py index 0951ce0..907e2c0 100644 --- a/kamaji-api/doc/source/conf.py +++ b/kamaji-api/doc/source/conf.py @@ -19,8 +19,17 @@ import django # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -sys.path.insert(0, os.path.abspath('../../')) +# documentation root, use os.path.abspath to make it absolute. + +if 'READTHEDOCS' in os.environ: + # We are building on readthedocs so our cwd is kamaji-api/doc/source + sys.path.insert(0, os.path.abspath('../../kamajiapi/')) +else: + sys.path.insert(0, os.path.abspath('../../')) + + +if "DJANGO_SETTINGS_MODULE" not in os.environ: + os.environ["DJANGO_SETTINGS_MODULE"] = "api.settings.dev_local" # Setup Django and load AppRegistry django.setup() @@ -121,7 +130,7 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'bootstrap' +html_theme = "bootstrap" # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the @@ -142,13 +151,13 @@ # (name, "http://example.com", True) # arbitrary absolute url # Note the "1" or "True" value above as the third argument to indicate # an arbitrary url. - 'navbar_links': [ - ("Kamaji Docs", "http://docs.i.pwny.se", True), - # ("Tools", "tools"), - ], + #'navbar_links': [ + # ("Kamaji Docs", "http://docs.i.pwny.se", True), + # # ("Tools", "tools"), + #], # Tab name for the current pages TOC. (Default: "Page") - 'navbar_pagenav_name': "Current Page", + #'navbar_pagenav_name': "Current Page", # Bootswatch (http://bootswatch.com/) theme. # @@ -163,7 +172,6 @@ } # Add any paths that contain custom themes here, relative to this directory. -#html_theme_path = [] html_theme_path = sphinx_bootstrap_theme.get_html_theme_path() # The name for this set of Sphinx documents. If None, it defaults to diff --git a/kamaji-api/requirements-docs.txt b/kamaji-api/requirements-docs.txt new file mode 100644 index 0000000..41d4c78 --- /dev/null +++ b/kamaji-api/requirements-docs.txt @@ -0,0 +1,2 @@ +-r requirements.txt +sphinx-bootstrap-theme==0.6.4