From 5a38a76c83bb1f8067c9d66a3095c09e366f14d2 Mon Sep 17 00:00:00 2001 From: Simon Mo Date: Tue, 8 Sep 2020 16:25:23 -0700 Subject: [PATCH] [Doc] Use sphinx_book_theme (#10379) --- doc/requirements-doc.txt | 3 +- doc/requirements-rtd.txt | 1 - doc/source/_static/css/custom.css | 43 ++++++++++++++++++++--------- doc/source/_static/favicon.ico | Bin 0 -> 15406 bytes doc/source/conf.py | 23 +++++++++------ doc/source/ray-overview/basics.rst | 8 +----- doc/source/rllib-algorithms.rst | 2 ++ doc/source/rllib-toc.rst | 2 ++ doc/source/rllib.rst | 2 ++ 9 files changed, 53 insertions(+), 31 deletions(-) create mode 100644 doc/source/_static/favicon.ico diff --git a/doc/requirements-doc.txt b/doc/requirements-doc.txt index 83e0979e5..b464f2cce 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 5245aa83a..1c6cd5322 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 68935539b..81b84d2e0 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 0000000000000000000000000000000000000000..04e72e7643ebda3ae55e74a683f650b9b3ebf7c8 GIT binary patch literal 15406 zcmeI33y{}U6~~W3mT5)hqs)@*g<0zOz(z8)i9svVOv)lh3mm8vwJZe8U`%;9Ks?ll z$L|0C-^E&HFwv1IPzD*O$b(`FeZ<=9ef;~kaijh-ZowBdyDy-d1bOUin}_ZmEFNy}=A?UO+U-?ORf2jAtC*OBfbt)zXQ>SFsQ z<>ii+w)J&sy96CSg1;oRr~DMOYb$4fBV!d{8AV<$-kK8YMR~1g$giXipCG>h+U(}` z#da|=HlnY#E@j^k9sF0*W($0kjNujaMb-lz;je?fL46ACL*67;jsC*-Hu*uuUR8gZ znzDH!_N*el+YS6RMFe zx4)p>zv%Z$^1&?_j({M4(-ru04o#{@xilp`F?e-_%!-lsr2L0<;6OLv7@Sg$r z(SCfO$)~+_#rC~pfq^-DVO@zGMDJea&}8Pr;~vXCt;vPPfW0TG&#Zg523>sL;p~vM z2Lr88IsN^Ubk(Qqqd`Yi+Rhb?x^$owDyRRGoUWApAn0IC_=)fTZvw4QdF4#I2wiW0 zV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>;~8~e{`qxC44KmM+4>kd?J2H2uhautUt&ejgIyOzck)hz?(*ro_Gsa) z;~r~>)0wfW7?0?#R$1m2evgCq$qvVjUj(-c*w9vZJpW$9dBlxD`OSgtZ z-B7Pb_{-!QLH<-?(ERq{Kcun8Zd{#CMDS1ax-x;&qw)mXZec4xcg5nMBl*_(4_iR7h`51dl zQ9Wt*)>(F5uI%uwI(U*f8@&yNdY#Xyce=bh$!w8$KfE-w2|2%I=yN#Um`%UEe8>jeS7A2cNT{ zVmrnz6WS?9)?(j}L$vK3V`6VUmAWOqe*K%p-olH#dE!OReth#G?d{qRYKp8kwDnGo zej~vfjn?pxIMeFwY=f_Fz>jaydcTlF%%I2-b3!}iVCn@u@gZa|pWS`8 zfAgM%+~AvkY%5;!^GUJ0bjhC8n#;&Y)@bGj_A1etJhqek7M@Y?Cci&Q=25xtbMVOn z^(8hmetXrr%iO;XJ?_0ydXc|RI%yl<#cYS({Ei*#j?1-Wb_(fTlYVBmlWvXY(A+&I#vPYsOKfr({nhUjG?^(9wa+hTn2@~|9F5%eZsX>`EIXry6ntpwG&>8QSs>pg zX^t;qtvsu}b-xvPZjVmccbWG^;9E%S_B`d^GZ((k_Z;l))+YM#iu~xU=xXn_T6@8o z2B%`^cr8@Sqqxn{;MusNwD7+P&8L6bN5MCY^t#8n2h5w4z#C|a3pXFD_vC!=;~%Gk zdo@XG%1&?&$5$@mY;v*U5NOGs&i@T4*2qWpvEWsF1m?uIiPf@V1kUA*f#!qycCf10 zzI-e&<)eeSc(=!=*ssO!xOATz>M0M%NA|Jc<$Qftz{lCLSFTR_rx;E4*Bt1dTi?;& z`1(~~OV%8GCC208w6r}T?C|Nnszv`|{*Ea7`Mbv3csFzQPIrgIJredFN(y)A%Qkni zJxlg-XRKuX)H*L8(Vg1AeR5|9zmDD^-j1+wTRIhQf_I`HgT&W^&*NLnk 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 @@ html_static_path = ['_static'] #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 b61fc2ae8..963c2ed2e 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 32bc0a7a9..3ff0c76cd 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