Skip to content

Commit

Permalink
Add RTD workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
kislyuk committed Feb 3, 2020
1 parent bb1850c commit e67642a
Showing 1 changed file with 21 additions and 15 deletions.
36 changes: 21 additions & 15 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import guzzle_sphinx_theme
import os

project = "argcomplete"
copyright = "Andrey Kislyuk and argcomplete contributors"
Expand All @@ -11,17 +11,23 @@
source_suffix = [".rst", ".md"]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
pygments_style = "sphinx"
html_theme_path = guzzle_sphinx_theme.html_theme_path()
html_theme = "guzzle_sphinx_theme"
html_theme_options = {
"project_nav_name": project,
"projectlink": "https://github.com/kislyuk/" + project,
}
html_sidebars = {
"**": [
"logo-text.html",
# "globaltoc.html",
"localtoc.html",
"searchbox.html"
]
}

if "readthedocs.org" in os.getcwd.split("/"):
with open("index.rst", "w") as fh:
fh.write("Documentation for this project has moved to https://kislyuk.github.io/" + project)
else:
import guzzle_sphinx_theme
html_theme_path = guzzle_sphinx_theme.html_theme_path()
html_theme = "guzzle_sphinx_theme"
html_theme_options = {
"project_nav_name": project,
"projectlink": "https://github.com/kislyuk/" + project,
}
html_sidebars = {
"**": [
"logo-text.html",
# "globaltoc.html",
"localtoc.html",
"searchbox.html"
]
}

0 comments on commit e67642a

Please sign in to comment.