diff --git a/docs/_static/style.css b/docs/_static/style.css new file mode 100644 index 0000000..f34d322 --- /dev/null +++ b/docs/_static/style.css @@ -0,0 +1,3 @@ +code { + color: #222; +} \ No newline at end of file diff --git a/docs/_templates/caption.html b/docs/_templates/caption.html deleted file mode 100644 index a4527b5..0000000 --- a/docs/_templates/caption.html +++ /dev/null @@ -1,2 +0,0 @@ -

Instaloader

-

Download pictures (or videos) along with their captions and other metadata from Instagram.

diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html index 1d5c904..e722476 100644 --- a/docs/_templates/layout.html +++ b/docs/_templates/layout.html @@ -1,17 +1,11 @@ {% extends "!layout.html" %} {% block extrahead %} {{ super() }} - - -{% if READTHEDOCS %} - - -{% endif %} - + + {% if pagename == "index" %} + + {% else %} + + {% endif %} + {% endblock %} diff --git a/docs/_templates/links.html b/docs/_templates/links.html deleted file mode 100644 index b06cba1..0000000 --- a/docs/_templates/links.html +++ /dev/null @@ -1,23 +0,0 @@ -{% if next %} -

Next

- -{% endif %} -

Current Release

- -

Links

- - diff --git a/docs/_templates/navbar.html b/docs/_templates/navbar.html new file mode 100644 index 0000000..ecb9852 --- /dev/null +++ b/docs/_templates/navbar.html @@ -0,0 +1,58 @@ + diff --git a/docs/_templates/rtdmessage.html b/docs/_templates/rtdmessage.html deleted file mode 100644 index 6287a02..0000000 --- a/docs/_templates/rtdmessage.html +++ /dev/null @@ -1,3 +0,0 @@ -

New Documentation URL

-

Instaloader's Documentation has been moved to - https://instaloader.github.io.

\ No newline at end of file diff --git a/docs/conf.py b/docs/conf.py index b5ea5ce..2fbd999 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -20,6 +20,9 @@ import os import subprocess import sys + +import sphinx_bootstrap_theme + sys.path.insert(0, os.path.abspath('..')) # -- General configuration ------------------------------------------------ @@ -133,15 +136,20 @@ todo_include_todos = False # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = 'alabaster' +html_theme = 'bootstrap' +html_theme_path = sphinx_bootstrap_theme.get_html_theme_path() # 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 # documentation. # html_theme_options = { - 'show_powered_by': False, - 'sidebar_width': '290px' } + 'navbar_site_name': 'Site Contents', + 'navbar_pagenav_name': 'Page Contents', + 'navbar_pagenav': True, + 'navbar_sidebarrel': True, + 'nosidebar': True, + } # Add any paths that contain custom themes here, relative to this directory. # html_theme_path = [] @@ -190,10 +198,8 @@ html_static_path = ['_static'] # Custom sidebar templates, maps document names to template names. # -if not os.environ.get("READTHEDOCS"): - html_sidebars = {'**': ["caption.html", "globaltoc.html", "relations.html", "links.html"] } -else: - html_sidebars = {'**': ["caption.html", "rtdmessage.html", "globaltoc.html", "relations.html", "links.html"] } +#html_sidebars = {'**': ["relations.html", "links.html"] } +html_sidebars = {} # Additional templates that should be rendered to pages, maps page names to # template names. @@ -360,4 +366,7 @@ texinfo_documents = [ current_release = subprocess.check_output(["git", "describe", "--abbrev=0"]).decode("ascii")[1:-1] current_release_date = subprocess.check_output(["git", "log", "-1", "--tags", "--format=%ad", "--date=format:%e %b %Y"]).decode("ascii")[:-1] -html_context = {'current_release': current_release, 'current_release_date': current_release_date, 'READTHEDOCS': bool(os.environ.get('READTHEDOCS'))} +html_context = {'current_release': current_release, 'current_release_date': current_release_date} + +def setup(app): + app.add_stylesheet("style.css") \ No newline at end of file diff --git a/docs/requirements.txt b/docs/requirements.txt index 914f619..2827417 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,3 +1,4 @@ requests sphinx sphinx-autodoc-typehints +sphinx-bootstrap-theme