diff --git a/docs/source/_static/css/custom.css b/docs/source/_static/css/custom.css new file mode 100644 index 00000000..92846f2b --- /dev/null +++ b/docs/source/_static/css/custom.css @@ -0,0 +1,46 @@ +.wy-nav-content { + margin: 0; + background: #fcfcfc; + padding-top: 40px; +} + +.wy-side-nav-search { + display: block; + width: 300px; + padding: .809em; + padding-top: 0.809em; + margin-bottom: .809em; + z-index: 200; + background-color: #2980b9; + text-align: center; + color: #fcfcfc; + padding-top: 40px; +} + +div.banner { + position: fixed; + top: 10px; + left: 20px; + margin: 0; + z-index: 1000; + width: 1050px; + text-align: center; +} + +p.banner { + border-radius: 4px; + color: #004831; + background: #76b900; +} + +footer div p { + font-size: 80%; +} + +footer div p a { + color: var(--small-font-color); +} + +footer div p a:hover { + color: var(--small-font-color); +} \ No newline at end of file diff --git a/docs/source/_templates/footer.html b/docs/source/_templates/footer.html new file mode 100644 index 00000000..3ca50086 --- /dev/null +++ b/docs/source/_templates/footer.html @@ -0,0 +1,14 @@ +{% extends '!footer.html' %} +{% block contentinfo %} +{{ super() }} +
+Privacy Policy | +Manage My Privacy | +Do Not Sell or Share My Data | +Terms of Service | +Accessibility | +Corporate Policies | +Product Security | +Contact +
+{% endblock %} \ No newline at end of file diff --git a/docs/source/conf.py b/docs/source/conf.py index d2df96cc..ca07d8b3 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -9,6 +9,7 @@ import subprocess import sys +from datetime import datetime from natsort import natsorted # -- Path setup -------------------------------------------------------------- @@ -25,8 +26,13 @@ # -- Project information ----------------------------------------------------- +year_range = "2022" +year_now = str(datetime.now().year) +if year_range != year_now: + year_range = year_range + chr(8211) + year_now + project = "Merlin Dataloader" -copyright = "2022, NVIDIA" # pylint: disable=W0622 +copyright = year_range + ", NVIDIA" # pylint: disable=W0622 author = "NVIDIA" @@ -81,6 +87,7 @@ html_theme = "sphinx_rtd_theme" html_copy_source = False html_show_sourcelink = False +html_show_sphinx = False html_theme_options = { "navigation_depth": 3, "analytics_id": "G-NVJ1Y1YJHK", @@ -90,6 +97,7 @@ # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ["_static"] +html_css_files = ["css/custom.css"] # Configuration file for the Sphinx documentation builder. diff --git a/requirements/dev.txt b/requirements/dev.txt index 1f839d94..7c0f95ba 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -11,19 +11,6 @@ testbook moto>=2 cpplint>=1.5 -# docs -Sphinx<3.6 -jinja2<3.1 -markupsafe==2.0.1 -sphinx_markdown_tables==0.0.15 -sphinx-multiversion@git+https://github.com/mikemckiernan/sphinx-multiversion.git -sphinxcontrib-copydirs@git+https://github.com/mikemckiernan/sphinxcontrib-copydirs.git -sphinx-external-toc<0.4 -sphinx_rtd_theme -natsort<8.2 -myst-nb<0.14 -linkify-it-py<1.1 - # needed to avoid bug in sphinx-markdown-tables # https://github.com/ryanfox/sphinx-markdown-tables/issues/36 markdown==3.3.7 diff --git a/requirements/docs.txt b/requirements/docs.txt index f13b2097..a8f6e4ab 100644 --- a/requirements/docs.txt +++ b/requirements/docs.txt @@ -1,9 +1,3 @@ --r base.txt --r dev.txt - -tritonclient[all] -tensorflow<=2.9.0 - Sphinx==3.5.4 sphinx_rtd_theme==1.0.0 sphinx-multiversion@git+https://github.com/mikemckiernan/sphinx-multiversion.git @@ -12,6 +6,7 @@ recommonmark==0.7.1 Jinja2<3.1 natsort==8.0.1 myst-nb==0.13.2 +lxml<5.1 linkify-it-py==1.0.3 sphinx-external-toc==0.2.4 attrs==21.4.0 \ No newline at end of file diff --git a/setup.py b/setup.py index 99c5344c..f606dbf7 100644 --- a/setup.py +++ b/setup.py @@ -45,6 +45,7 @@ def read_requirements(filename): "torch": read_requirements("requirements/torch.txt"), "jax": read_requirements("requirements/jax.txt"), "dev": read_requirements("requirements/dev.txt"), + "docs": read_requirements("requirements/docs.txt"), } with open("README.md", encoding="utf8") as readme: