diff --git a/doc/requirements-doc.txt b/doc/requirements-doc.txt index 83e0979e5db3..b464f2cce233 100644 --- a/doc/requirements-doc.txt +++ b/doc/requirements-doc.txt @@ -24,7 +24,8 @@ sphinx-gallery sphinx-jsonschema sphinx-tabs sphinx-version-warning -sphinx_rtd_theme +# TODO(simon): Use sphinx book theme released version +git+https://github.com/executablebooks/sphinx-book-theme.git@0a87d26e214c419d2e6efcadddab4be8ae7b2c21 tabulate uvicorn werkzeug diff --git a/doc/requirements-rtd.txt b/doc/requirements-rtd.txt index 5245aa83a68f..1c6cd5322c80 100644 --- a/doc/requirements-rtd.txt +++ b/doc/requirements-rtd.txt @@ -7,5 +7,4 @@ alabaster>=0.7,<0.8,!=0.7.5 commonmark==0.8.1 recommonmark==0.5.0 sphinx<2 -sphinx-rtd-theme<0.5 readthedocs-sphinx-ext<1.1 diff --git a/doc/source/_static/css/custom.css b/doc/source/_static/css/custom.css index 68935539b552..81b84d2e0b8d 100644 --- a/doc/source/_static/css/custom.css +++ b/doc/source/_static/css/custom.css @@ -1,32 +1,49 @@ /*Extends the docstring signature box.*/ .rst-content dl:not(.docutils) dt { - display: block; - padding: 10px; - word-wrap: break-word; - padding-right: 100px; + display: block; + padding: 10px; + word-wrap: break-word; + padding-right: 100px; } /*Lists in an admonition note do not have awkward whitespace below.*/ .rst-content .admonition-note .section ul { - margin-bottom: 0px + margin-bottom: 0px; } /*Properties become blue (classmethod, staticmethod, property)*/ .rst-content dl dt em.property { - color: #2980B9; - text-transform: uppercase + color: #2980b9; + text-transform: uppercase; } -.rst-content .section ol p, .rst-content .section ul p { - margin-bottom: 0px; +.rst-content .section ol p, +.rst-content .section ul p { + margin-bottom: 0px; } div.sphx-glr-bigcontainer { - display: inline-block; - width: 100% + display: inline-block; + width: 100%; } - -td.tune-colab, th.tune-colab { +td.tune-colab, +th.tune-colab { border: 1px solid #dddddd; text-align: left; padding: 8px; } + +/* Adjustment to Sphinx Book Theme */ +.table td { + /* Remove row spacing */ + padding: 0; +} + +table { + /* Force full width for all table */ + width: 136% !important; +} + +img.inline-figure { + /* Override the display: block for img */ + display: inherit !important; +} diff --git a/doc/source/_static/favicon.ico b/doc/source/_static/favicon.ico new file mode 100644 index 000000000000..04e72e7643eb Binary files /dev/null and b/doc/source/_static/favicon.ico differ diff --git a/doc/source/conf.py b/doc/source/conf.py index 8ff9e7f274cc..3307113657cb 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -125,7 +125,7 @@ def __getattr__(cls, name): ), } -versionwarning_body_selector = "div.document" +versionwarning_body_selector = "#main-content" sphinx_gallery_conf = { "examples_dirs": ["../examples", "tune/_tutorials"], # path to example scripts @@ -233,33 +233,38 @@ def __getattr__(cls, name): # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -import sphinx_rtd_theme -html_theme = 'sphinx_rtd_theme' -html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] +html_theme = "sphinx_book_theme" # 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 = {} +html_theme_options = { + "repository_url": "https://github.com/ray-project/ray", + "use_repository_button": True, + "use_issues_button": True, + "use_edit_page_button": True, + "path_to_docs": "doc/source", + "home_page_in_toc": True, +} # Add any paths that contain custom themes here, relative to this directory. #html_theme_path = [] # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". -#html_title = None +html_title = f"Ray v{release}" # A shorter title for the navigation bar. Default is the same as html_title. #html_short_title = None # The name of an image file (relative to this directory) to place at the top # of the sidebar. -#html_logo = None +html_logo = "images/ray_logo.png" # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. -#html_favicon = None +html_favicon = "_static/favicon.ico" # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, @@ -280,7 +285,7 @@ def __getattr__(cls, name): #html_use_smartypants = True # Custom sidebar templates, maps document names to template names. -html_sidebars = {'**': ['index.html']} +# html_sidebars = {'**': ['index.html']} # Additional templates that should be rendered to pages, maps page names to # template names. diff --git a/doc/source/ray-overview/basics.rst b/doc/source/ray-overview/basics.rst index b61fc2ae87a9..963c2ed2e0a3 100644 --- a/doc/source/ray-overview/basics.rst +++ b/doc/source/ray-overview/basics.rst @@ -1,10 +1,4 @@ -.. raw:: html - - - Fork me on GitHub - - .. image:: https://github.com/ray-project/ray/raw/master/doc/source/images/ray_header_logo.png **Ray provides a simple, universal API for building distributed applications.** @@ -13,7 +7,7 @@ Ray accomplishes this mission by: 1. Providing simple primitives for building and running distributed applications. 2. Enabling end users to parallelize single machine code, with little to zero code changes. -3. Including a large ecosystem of applications, libraries, and tools on top of the core Ray to enable complex applications. +3. Including a large ecosystem of applications, libraries, and tools on top of the core Ray to enable complex applications. **Ray Core** provides the simple primitives for application building. diff --git a/doc/source/rllib-algorithms.rst b/doc/source/rllib-algorithms.rst index 32bc0a7a93cd..3ff0c76cd43b 100644 --- a/doc/source/rllib-algorithms.rst +++ b/doc/source/rllib-algorithms.rst @@ -600,9 +600,11 @@ Tuned examples: `SimpleContextualBandit `__. .. |tensorflow| image:: tensorflow.png + :class: inline-figure :width: 24 .. |pytorch| image:: pytorch.png + :class: inline-figure :width: 24