diff --git a/doc/source/_static/css/custom.css b/doc/source/_static/css/custom.css index d0510ee3142e..5713de86d9b5 100644 --- a/doc/source/_static/css/custom.css +++ b/doc/source/_static/css/custom.css @@ -1,915 +1,196 @@ -/* override default colors used in the Sphinx theme */ -:root { - --tabs-color-label-active: #0475DE; - --tabs-color-label-hover: #0475DE; - --buttons-color-blue: #0475DE; - --tabs-color-label-inactive: #9E9E9E; - --tabs-color-overline: #e0e0e0; - --tabs-color-underline: #e0e0e0; - --border-color-gray: #e0e0e0; - --background-color-light-gray:#fafafa; - --background-color-disabled: #9E9E9E; - --pst-color-link: 4, 117, 222; - --pst-color-primary: 4, 117, 222; - --pst-color-text-secondary: #616161; - --blue: #0475DE; - --sidebar-top: 5em; -} - -/* Remove flicker for announcement top bar replacement */ -.header-item.announcement { - background-color: white; - color: white; - padding: 0; -} - -/* Make the book theme secondary nav stick below the new main top nav */ -.header-article { - top: 58px; - z-index: 900 !important; -} - -.toctree-l1.has-children { - font-weight: bold; -} - -.toctree-l2 { - font-weight: normal; -} - -div.navbar-brand-box { - padding-top: 4em; -} - -td p { - margin-left: 0.75rem; -} - -table.longtable.table.autosummary { - table-layout: fixed; -} - -.table.autosummary td { - width: 100%; -} - -tr.row-odd { - background-color: #f9fafb; -} - -/* For Algolia search box - * overflow-y: to flow-over horizontally into main content - * height: to prevent topbar overlap -*/ -#site-navigation { - overflow-y: auto; - height: calc(100vh - var(--sidebar-top)); - position: sticky; - top: var(--sidebar-top) !important; -} - -/* Center the algolia search bar*/ -#search-input { - text-align: center; -} -.algolia-autocomplete { - width: 100%; - margin: auto; -} - -/* Hide confusing "<-" back arrow in navigation for larger displays */ -@media (min-width: 768px) { - #navbar-toggler { - display: none; - } -} - -/* Make navigation scrollable on mobile, by making algolia not overflow */ -@media (max-width: 768px) { - #site-navigation { - overflow-y: scroll; - } - - .algolia-autocomplete .ds-dropdown-menu{ - min-width: 250px; - } -} - -/* sphinx-panels overrides the content width to 1140 for large displays.*/ -@media (min-width: 1200px) { - .container, .container-lg, .container-md, .container-sm, .container-xl { - max-width: 1400px !important; - } -} - -.bottom-right-promo-banner { - position: fixed; - bottom: 100px; - right: 20px; - width: 270px; -} - -@media (max-width: 1500px) { - .bottom-right-promo-banner { - display: none; - } -} - -@media screen and (max-width: 767px) { - .remove-mobile { - display: none; - } - } - - @media screen and (max-width: 767px) { - .row-2-column { - flex-direction: column; - margin-top: 20px; - } - } - -/* Make Algolia search box scrollable */ -.algolia-autocomplete .ds-dropdown-menu { - height: 60vh !important; - overflow-y: scroll !important; -} - -.bd-sidebar__content { - overflow-y: unset !important; -} - -.bd-sidebar__top { - display: flex; - flex-direction: column; -} - -.bd-sidebar li { - position: relative; - word-wrap: break-word; -} - -nav.bd-links { - flex: 1; -} - -nav.bd-links::-webkit-scrollbar-thumb { - background-color: #ccc; -} - -nav.bd-links::-webkit-scrollbar { - width: 5px; -} - -dt:target, span.highlighted { - background-color: white; -} - -div.sphx-glr-bigcontainer { - display: inline-block; - width: 100%; -} - -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 on the left */ - padding-left: 0; -} - -.table thead th { - /* Remove row spacing on the left */ - padding-left: 0; -} - -img.inline-figure { - /* Override the display: block for img */ - display: inherit !important; -} - -#version-warning-banner { - /* Make version warning clickable */ - z-index: 1; - margin-left: 0; - /* 20% is for ToC rightbar */ - /* 2 * 1.5625em is for horizontal margins */ - width: calc(100% - 20% - 2 * 1.5625em); -} - -/* allow scrollable images */ -.figure { - max-width: 100%; - overflow-x: auto; -} -img.horizontal-scroll { - max-width: none; -} - -.clear-both { - clear: both; - min-height: 100px; - margin-top: 15px; -} - -.buttons-float-left { - width: 150px; - float: left; -} - -.buttons-float-right { - width: 150px; - float: right; -} - -.card-body { - padding: 0.5rem !important; -} - -/* custom css for pre elements */ -pre { - /* Wrap code blocks instead of horizontal scrolling. */ - white-space: pre-wrap; - box-shadow: none; - border-color: var(--border-color-gray); - background-color: var(--background-color-light-gray); - border-radius:0.25em; -} - -/* notebook formatting */ -.cell .cell_output { - max-height: 250px; - overflow-y: auto; - font-weight: bold; -} - -/* Yellow doesn't render well on light background */ -.cell .cell_output pre .-Color-Yellow { - color: #785840; -} - -/* Newlines (\a) and spaces (\20) before each parameter */ -.sig-param::before { - content: "\a\20\20\20\20"; - white-space: pre; -} - -/* custom css for outlined buttons */ -.btn-outline-info:hover span, .btn-outline-primary:hover span { - color: #fff; -} - -.btn-outline-info, .btn-outline-primary{ - border-color: var(--buttons-color-blue); -} - -.btn-outline-info:hover, .btn-outline-primary:hover{ - border-color: var(--buttons-color-blue); - background-color: var(--buttons-color-blue); -} - -.btn-outline-info.active:not(:disabled):not(.disabled), .btn-outline-info:not(:disabled):not(.disabled):active, .show>.btn-outline-info.dropdown-toggle { - border-color: var(--buttons-color-blue); - background-color: var(--buttons-color-blue); - color: #fff; -} - -.btn-info, .btn-info:hover, .btn-info:focus { - border-color: var(--buttons-color-blue); - background-color: var(--buttons-color-blue); -} - -.btn-info:hover{ - opacity: 90%; -} - -.btn-info:disabled{ - border-color: var(--background-color-disabled); - background-color: var(--background-color-disabled); - opacity: 100%; -} - -.btn-info.active:not(:disabled):not(.disabled), .btn-info:not(:disabled):not(.disabled):active, .show>.btn-info.dropdown-toggle { - border-color: var(--buttons-color-blue); - background-color: var(--buttons-color-blue); -} - - -.topnav { - background-color: white; - border-bottom: 1px solid rgba(0, 0, 0, .1); - display: flex; - align-items: center; -} - -/* Content wrapper for the unified nav link / menus */ -.top-nav-content { - max-width: 1400px; - width: 100%; - margin-left: auto; - margin-right: auto; - padding: 0 1.5rem; - display: flex; - align-items: center; - justify-content: space-between; -} - -@media (max-width: 900px) { - /* If the window is too small, hide the custom sticky navigation bar at the top of the page. - Also make the pydata-sphinx-theme nav bar, which usually sits below the top nav bar, stick - to the top of the page. - */ - .top-nav-content { - display: none; - } - div.header-article.row.sticky-top.noprint { - position: sticky; - top: 0; - } -} - -/* Styling the links and menus in the top nav */ -.top-nav-content a { - text-decoration: none; - color: black; - font-size: 17px; -} - -.top-nav-content a:hover { - color: #007bff; -} - -/* The left part are the links and menus */ -.top-nav-content > .left { - display: flex; - white-space: nowrap; -} - -.top-nav-content .left > * { - margin-right: 8px; -} - -.top-nav-content .left > a, -.top-nav-content .left > .menu > a { - text-align: center; - padding: 14px 16px; - border-bottom: 2px solid white; -} - -.top-nav-content .menu:hover > a, -.top-nav-content .left > a:hover { - border-bottom: 2px solid #007bff; -} - -/* Special styling for the Ray logo */ -.top-nav-content .left > a.ray-logo { - width: 90px; - padding: 10px 0; -} -.top-nav-content .left > a.ray-logo:hover { - border-bottom: 2px solid white; -} - -/* Styling the dropdown menus */ -.top-nav-content .menu { - display: flex; -} -.top-nav-content .menu > a > .down-caret { - margin-left: 8px; -} -.top-nav-content .menu > ul { - display: none; -} - -.top-nav-content > button.try-anyscale > span { - margin: 0 12px; -} - -.top-nav-content .menu:hover > ul { - display: flex; - flex-direction: column; - align-items: flex-start; - box-shadow: 0 5px 15px 0 rgb(0 0 0 / 10%); - padding: 15px; - width: 330px; - position: absolute; - z-index: 2000; - background-color: white; - top: 58px; -} - -.top-nav-content .menu:hover > ul > li { - list-style: none; - padding: 5px 0; -} - -.top-nav-content .menu:hover > ul > li span { - display: block; -} - -.top-nav-content .menu:hover > ul > li span.secondary { - color: #787878; -} - -/* Styling the "Try Anyscale" button */ -.top-nav-content > button.try-anyscale { - float: right; - border-radius: 6px; - background-color: #e7f2fa; - padding-left: 12px; - padding-right: 12px; - margin-left: 12px; - height: 40px; - border: none; - white-space: nowrap; -} - -@media (max-width: 1000px) { - .top-nav-content > button.try-anyscale { - display: none; - } -} - -/* custom css for tabs*/ -.tabbed-set>label,.tabbed-set>label:hover { - border-bottom: 1px solid var(--border-color-gray); - color:var(--tabs-color-label-inactive); - font-weight: 500; -} - -.tabbed-set>input:checked+label{ - border-bottom: 0.125em solid; - color:var(--tabs-color-label-active); -} - - -.tabbed-label{ - margin-bottom:0; -} - -/* custom css for jupyter cells */ -div.cell div.cell_input{ - border: 1px var(--border-color-gray) solid; - background-color: var(--background-color-light-gray); - border-radius:0.25em; - border-left-color: var(--green); - border-left-width: medium; -} - -/* custom css for table */ -table { - border-color: var(--border-color-gray); -} - -/* custom css for topic component */ -div.topic{ - border: 1px solid var(--border-color-gray); - border-radius:0.25em; -} - -.topic { - background-color: var(--background-color-light-gray); -} - -/* custom css for card component */ -.card{ - border-color: var(--border-color-gray); -} - -.card-footer{ - background-color: var(--background-color-light-gray); - border-top-color: var(--border-color-gray); -} - -/* custom css for section navigation component */ -.bd-toc nav>.nav { - border-left-color: var(--border-color-gray); -} - -/* custom css for up and down arrows in collapsible cards */ -details.dropdown .summary-up, details.dropdown .summary-down { - top: 1em; -} - -/* remove focus border in collapsible admonition buttons */ -.toggle.admonition button.toggle-button:focus { - outline: none; -} - -/* custom css for shadow class */ -.shadow { - box-shadow: 0 0.2rem 0.5rem rgb(0 0 0 / 5%), 0 0 0.0625rem rgb(0 0 0 / 10%) !important; -} - -/* custom css for text area */ -textarea { - border-color: var(--border-color-gray); -} - -/* custom css for footer */ -footer { - margin-top: 1rem; - padding:1em 0; - border-top-color: var(--border-color-gray); -} - -.footer p{ - color: var(--pst-color-text-secondary); -} - -/* Make the hover color of tag/gallery buttons differ from "active" */ -.tag.btn-outline-primary:hover { - background-color: rgba(20, 99, 208, 0.62) !important; -} - -span.rst-current-version > span.fa.fa-book { - /* Move the book icon away from the top right - * corner of the version flyout menu */ - margin: 10px 0px 0px 5px; -} - - -/*Extends the docstring signature box.*/ -.rst-content dl:not(.docutils) dt { - 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: 0; -} - -/*Properties become blue (classmethod, staticmethod, property)*/ -.rst-content dl dt em.property { - color: #2980b9; - text-transform: uppercase; -} - -.rst-content .section ol p, -.rst-content .section ul p { - margin-bottom: 0; -} - - -/* Adjustment to Version block */ -.rst-versions { - z-index: 1200 !important; -} - -.image-header { - display: flex; - flex-direction: row; - align-items: center; - padding-left: 16px; - padding-right:16px; - gap: 16px; -} - -.info-box { - box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.05); - border-radius: 8px; - padding: 20px; -} - -.info-box:hover{ - box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.1); -} - -.no-underline{ - text-decoration: none; -} -.no-underline:hover{ - text-decoration: none; -} - -.icon-hover:hover{ - height: 30px ; - width: 30px; -} - -.info-box-2 { - background-color: #F9FAFB; - border-radius: 8px; - padding-right: 16px; - padding-left: 16px; - padding-bottom: 24px; - padding-top: 4px; -} - - -.bold-link { - color: #000000 !important; - font-weight: 600; -} - -.community-box { - border: 1px solid #D2DCE6; - border-radius: 8px; - display: flex; - margin-bottom: 16px; -} - -.community-box:hover { - box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.05); - text-decoration: none; -} - -.community-box p { - margin-top: 1rem !important; -} - -.tab-pane pre { - margin: 0; - padding: 0; - max-height: 252px; - overflow-y: auto; -} - -.grid-container { - display: grid; - grid-template-columns: repeat(auto-fit, minmax(300px,1fr)); - grid-gap: 16px; -} - -.grid-item { -padding: 20px; -} - - -.nav-pills { - background-color: #F9FAFB; - color: #000000; - padding: 8px; - border-bottom:none; - border-radius: 8px; -} - -.nav-pills .nav-link.active { - background-color: #FFFFFF !important; - box-shadow: 0px 3px 14px 2px rgba(3,28,74,0.12); - border-radius: 8px; - padding: 20px; - color: #000000; - font-weight: 500; -} - -.searchDiv { - width: 100%; - position: relative; - display: block; -} - -.searchTerm { - width: 80%; - border: 2px solid var(--blue); - padding: 5px; - height: 45px; - border-radius: 5px; - outline: none; -} - -.searchButton { - width: 40px; - height: 45px; - border: 1px solid var(--blue); - background: var(--blue); - color: #fff; - border-radius: 5px; - cursor: pointer; - font-size: 20px; -} - -/*Resize the wrap to see the search bar change!*/ -.searchWrap { - width: 100%; - position: relative; - margin: 15px; - top: 50%; - left: 50%; - transform: translate(-50%, -10%); - text-align: center; -} - -.sd-card { - border: none !important; -} - -.tag { - margin-bottom: 5px; - font-size: small; -} - -/* Override float positioning of next-prev buttons so that - they take up space normally, and we can put other stuff at - the bottom of the page. */ -.prev-next-area { - display: flex; - flex-direction: row; -} -.prev-next-area a.left-prev { - margin-right: auto; - width: fit-content; - float: none; -} -.prev-next-area a.right-next { - margin-left: auto; - width: fit-content; - float: none; -} - -/* CSAT widgets */ -#csat-inputs { - display: flex; - flex-direction: row; +/* Override default colors used in the Sphinx theme. See +* https://pydata-sphinx-theme.readthedocs.io/en/stable/user_guide/styling.html#css-theme-variables +* for more information. `important!` is needed below to override +* dark/light theme specific values, which normally take precedence over the PST defaults. +* */ +html { + --anyscale-blue: #0641AC; + --ray-blue: #3C8AE9; /* Ray blue color - use this for all ray branding */ + --pst-color-primary: var(--ray-blue) !important; + --pst-color-link-hover: var(--ray-blue) !important; + --pst-color-inline-code-links: var(--ray-blue) !important; + + /* Transparent highlight color; default yellow is hard on the eyes */ + --pst-color-target: #FFFFFF00 !important; +} + +/* Hide the "Hide Search Matches" button (we aren't highlighting search terms anyway) */ +#searchbox { + display: none; +} + +/* Top navbar styling */ +.navbar-toplevel p { + margin: 0; + padding-inline-start: 0; +} +.ref-container > p { + height: 100%; +} +div.navbar-dropdown { + display: none; + position: relative; + left: -50%; + color: var(--pst-color-text-muted); +} +span.navbar-link-title { + color: var(--pst-color-text-base); +} +.navbar-sublevel p a.reference { + text-decoration: none; + color: var(--pst-color-text-muted); +} +.navbar-sublevel p a.reference:hover > span.navbar-link-title { + text-decoration: underline; + color: var(--pst-color-link-hover); +} +.navbar-toplevel li { + display: inline-flex; + justify-content: center; align-items: center; + height: 100%; + padding: 0em 1em; } - -.csat-hidden { - display: none !important; +ul.navbar-toplevel li:hover > div.navbar-dropdown { + display: block; } - -#csat-feedback-label { - color: #000; - font-weight: 500; +ul.navbar-toplevel > li:hover { + border-bottom: } - -.csat-button { - margin-left: 16px; - padding: 8px 16px 8px 16px; - border-radius: 4px; - border: 1px solid #D2DCE6; - background: #FFF; +ul.navbar-toplevel { display: flex; flex-direction: row; - align-items: center; justify-content: center; - cursor: pointer; - width: 85px; -} - -#csat-textarea-group { + align-items: center; + margin: 0; + height: 100%; +} +.navbar-content ul.navbar-sublevel { + position: absolute; + background: var(--pst-color-on-background); + white-space: pre; + padding: 0em 1em; display: flex; flex-direction: column; + align-items: baseline; + box-shadow: 0 5px 15px 0 rgb(0 0 0 / 10%); } - -#csat-submit { - margin-left: auto; - font-weight: 700; - border: none; - margin-top: 12px; - cursor: pointer; -} - -#csat-feedback-received { +div.navbar-content a { display: flex; - flex-direction: row; - align-items: center; + flex-direction: column; + align-items: start; + white-space: pre; justify-content: center; } - -.csat-button-active { - border: 1px solid #000; +div.navbar-content { + height: 100%; } - -.csat-icon { - margin-right: 4px; +nav.navbar-nav { + height: 100%; } - -footer.col.footer { +.ref-container { display: flex; flex-direction: row; + justify-content: center; + align-items: center; + gap: 0.5em; + height: 100%; } - -footer.col.footer > p { - margin-left: auto; +.navbar-header-items__end { + /* Prevent the anyscale button from wrapping */ + flex-flow: nowrap !important; } -#csat { - min-width: 60%; +/* Highlight active nav bar link; offset content to compensate for border size */ +li.active-link { + border-bottom: 4px solid var(--ray-blue); } - -#csat-textarea { - resize: none; +li.active-link > .ref-container { + transform: translateY(2px); } - -/* Ray Assistant */ - -.container-xl.blurred { - filter: blur(5px); +/* Ray logo */ +.navbar-brand.logo > svg { + width: 120px; } - -.chat-widget { - position: fixed; - bottom: 10px; - right: 10px; - z-index: 1000; +.navbar-brand.logo > svg path#ray-text { + fill: var(--pst-color-text-base); } - -.chat-popup { - display: none; - position: fixed; - top: 20%; - left: 50%; - transform: translate(-50%, -20%); - width: 50%; - height: 70%; - background-color: white; - border: 1px solid #ccc; - border-radius: 10px; - box-shadow: 0 5px 10px rgba(0,0,0,0.1); - z-index: 1001; - max-height: 1000px; - overflow: hidden; - padding-bottom: 40px; +.navbar-brand.logo > svg path#ray-logo { + fill: var(--ray-blue); } -.chatFooter { - position: absolute; - bottom: 0; - right: 0; - width: 100%; - background-color: #f8f9fa; +/* Anyscale branding */ +#anyscale-logo > path { + fill: var(--anyscale-blue); } - -#openChatBtn { - background-color: #000; - color: #fff; - width: 70px; - height: 70px; - border-radius: 10px; - border: none; - display: flex; - align-items: center; - justify-content: center; +#try-anyscale { + color: var(--pst-color-text-base); + background-color: var(--pst-color-surface); + border-radius: 6px; + white-space: nowrap; + padding: 0px 12px; + height: 40px; + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; + gap: 1em; + border: 1px solid var(--pst-color-border); } -#closeChatBtn { - border: none; - background-color: transparent; - color: #000; - font-size: 1.2em; +/* Center the search button in the sidebar */ +div.sidebar-primary-item:nth-child(1) { + display: flex; + flex-direction: row; + justify-content: center; } -#closeChatBtn:hover { - color: #888; +/* Disable the "Back to top" button that appears if you scroll down */ +button#pst-back-to-top { + display: none !important; } -.chatHeader { - display: flex; - justify-content: space-between; - align-items: center; +/* Hide the rtd-footer-container; we aren't using it */ +#rtd-footer-container { + display: none; } -.chatContentContainer { - padding: 15px; - max-height: calc(100% - 80px); - overflow-y: auto; +.bottom-right-promo-banner { + position: fixed; + bottom: 100px; + right: 20px; + width: 270px; } -.chatContentContainer input { - margin-top: 10px; - margin-bottom: 10px; +@media (max-width: 1500px) { + .bottom-right-promo-banner { + display: none; + } } -#result{ - padding: 15px; - border-radius: 10px; - margin-top: 10px; - margin-bottom: 10px; - background-color: #f8f9fa; - max-height: calc(100% - 20px); - overflow-y: auto; +/* Nav sidebar styles */ +/* Sidebar checkboxes are toggled by clicking on the label; hide actual checkboxes */ +.sidebar-checkbox { + display: none; } - -.chatContentContainer textarea { - flex-grow: 1; - min-width: 50px; - max-height: 40px; - resize: none; +.sidebar-checkbox[type="checkbox"]:checked ~ dd { + display: none; } -.searchBtn { - white-space: nowrap; +/* Fix some spacing issues associated with competition with PST styles */ +.sidebar-content dl { + margin-bottom: 0; } - -.input-group { - display: flex; - align-items: stretch; +.sidebar-content ol li > p:first-child, ul li > p:first-child { + margin-top: 0 !important; } -/* Kapa Ask AI button */ -#kapa-widget-container figure { - padding: 0 !important; - } - - .mantine-Modal-root figure { - padding: 0 !important; - } \ No newline at end of file +/* Set autosummary API docs to have fixed two-col format, with alternating different background +* on rows */ +table.autosummary { + table-layout: fixed; +} +table.autosummary .row-odd { + background-color: var(--pst-color-surface); +} diff --git a/doc/source/_static/img/LandingPageBG.jpg b/doc/source/_static/img/LandingPageBG.jpg deleted file mode 100644 index 63daa159a8f4..000000000000 Binary files a/doc/source/_static/img/LandingPageBG.jpg and /dev/null differ diff --git a/doc/source/_static/js/custom.js b/doc/source/_static/js/custom.js index b4cee62b852d..d3da273bb762 100644 --- a/doc/source/_static/js/custom.js +++ b/doc/source/_static/js/custom.js @@ -28,128 +28,11 @@ window.addEventListener("scroll", loadVisibleTermynals); createTermynals(); loadVisibleTermynals(); -// Reintroduce dropdown icons on the sidebar. This is a hack, as we can't -// programmatically figure out which nav items have children anymore. +// Send GA events any time a code block is copied document.addEventListener("DOMContentLoaded", function() { - let navItems = document.querySelectorAll(".bd-sidenav li"); - - const defaultStyle = {"fontWeight": "bold"} - - const stringList = [ - {"text": "User Guides"}, - {"text": "Examples"}, - // Ray Core - {"text": "Ray Core"}, - {"text": "Ray Core API"}, - // Ray Cluster - {"text": "Ray Clusters"}, - {"text": "Deploying on Kubernetes"}, - {"text": "Deploying on VMs"}, - {"text": "Applications Guide"}, - {"text": "Ray Cluster Management API"}, - {"text": "Getting Started with KubeRay"}, - {"text": "KubeRay Ecosystem"}, - {"text": "KubeRay Benchmarks"}, - {"text": "KubeRay Troubleshooting"}, - // Ray Data - {"text": "Ray Data"}, - {"text": "Ray Data API"}, - {"text": "Integrations"}, - // Ray Train - {"text": "Ray Train"}, - {"text": "More Frameworks"}, - {"text": "Advanced Topics"}, - {"text": "Internals"}, - {"text": "Ray Train API"}, - // Ray Tune - {"text": "Ray Tune"}, - {"text": "Ray Tune Examples"}, - {"text": "Ray Tune API"}, - // Ray Serve - {"text": "Ray Serve"}, - {"text": "Ray Serve API"}, - {"text": "Production Guide"}, - {"text": "Advanced Guides"}, - {"text": "Deploy Many Models"}, - // Ray RLlib - {"text": "Ray RLlib"}, - {"text": "Ray RLlib API"}, - // More libraries - {"text": "More Libraries"}, - {"text": "Ray Workflows (Alpha)"}, - // Monitoring/debugging - {"text": "Monitoring and Debugging"}, - // References - {"text": "References"}, - {"text": "Use Cases", "style": {}}, // Don't use default style: https://github.com/ray-project/ray/issues/39172 - // Developer guides - {"text": "Developer Guides"}, - {"text": "Getting Involved / Contributing"}, - ]; - - Array.from(navItems).filter( - item => stringList.some(({text}) => item.innerText === text) && ! item.classList.contains('current') - ).forEach((item, i) => { - if (item.classList.contains('toctree-l1')) { - const { style } = stringList.find(({text}) => item.innerText == text) - - // Set the style on the menu items - Object.entries(style ?? defaultStyle).forEach(([key, value]) => { - item.style[key] = value - }) - - } - item.innerHTML += - `` - + '' - + '' - }) -}); - -// Dynamically adjust the height of all panel elements in a gallery to be the same as -// that of the max-height element. -document.addEventListener("DOMContentLoaded", function() { - let images = document.getElementsByClassName("fixed-height-img"); - let maxHeight = 0; - - for (let i = 0; i < images.length; i++) { - if (images[i].height > maxHeight) { - maxHeight = images[i].height; - } - } - - for (let i = 0; i < images.length; i++) { - let margin = Math.floor((maxHeight - images[i].height) / 2); - images[i].style.cssText = "margin-top: " + margin + "px !important;" + - "margin-bottom: " + margin + "px !important;" - } -}); - -// Remember the scroll position when the page is unloaded. -window.onload = function() { - let sidebar = document.querySelector("#site-navigation"); - - window.onbeforeunload = function() { - let scroll = sidebar.scrollTop; - localStorage.setItem("scroll", scroll); - } - - let storedScrollPosition = localStorage.getItem("scroll"); - if (storedScrollPosition) { - sidebar.scrollTop = storedScrollPosition; - localStorage.removeItem("scroll"); - } -}; - -// When the document is fully loaded -document.addEventListener("DOMContentLoaded", function() { - // find all the code blocks' copy buttons let codeButtons = document.querySelectorAll(".copybtn"); for (let i = 0; i < codeButtons.length; i++) { const button = codeButtons[i]; - // and add a click event listener to each one for Google Analytics. button.addEventListener("click", function() { gtag("event", "code_copy_click", { "send_to": "UA-110413294-1", @@ -161,3 +44,16 @@ document.addEventListener("DOMContentLoaded", function() { }); } }); + +document.addEventListener("DOMContentLoaded", function() { + let anyscaleButton = document.getElementById("try-anyscale") + anyscaleButton.onclick = () => { + gtag("event", "try_anyscale", { + "send_to": "UA-110413294-1", + "event_category": "TryAnyscale", + "event_label": "TryAnyscale", + "value": 1, + }); + window.open('https://www.anyscale.com', '_blank'); + } +}); diff --git a/doc/source/_static/js/docsearch.js b/doc/source/_static/js/docsearch.js deleted file mode 100644 index e8851333e4ab..000000000000 --- a/doc/source/_static/js/docsearch.js +++ /dev/null @@ -1,35 +0,0 @@ -docsearch({ - apiKey: '6c42f30d9669d8e42f6fc92f44028596', - indexName: 'docs-ray', - appId: 'LBHF0PABBL', - inputSelector: '#search-input', - debug: false, - algoliaOptions: { - hitsPerPage: 10, - }, - autocompleteOptions: { - autoselect: false, - }, - handleSelected: function (input, event, suggestion, datasetNumber, context) { - if (context.selectionMethod === 'click') { - input.setVal(''); - const windowReference = window.open(suggestion.url, "_self"); - windowReference.focus(); - } - } -}); - -const searchInput = document.getElementById("search-input"); -searchInput.addEventListener("keydown", function (e) { - if (e.code === "Enter") { - var searchForm = document.getElementsByClassName("bd-search")[0]; - const text = searchInput.value; - - const pageUrl = window.location.href - const res = pageUrl.split("/"); - const version = (res.length <= 3) ? "latest" : res[4]; - - searchForm.action = "https://docs.ray.io/en/" + version + "/search.html?q=" + text; - searchForm.submit(); - } -}); diff --git a/doc/source/_static/js/top-navigation.js b/doc/source/_static/js/top-navigation.js deleted file mode 100644 index d09beac95b36..000000000000 --- a/doc/source/_static/js/top-navigation.js +++ /dev/null @@ -1,148 +0,0 @@ -// Remove the black background from the announcement banner. We abuse the -// sphinx-book-theme announcement feature to place a navigation bar on top of the -// documentation. This javascript file replaces the announcement banner with the -// navigation bar. -document.getElementsByClassName("announcement")[0].classList.remove("header-item") - -// Make the new navigation bar sticky, but remove that property on the -// top bar that ships with the sphinx-book-theme. -document.getElementsByClassName("announcement")[0].classList.add("sticky-top") - -// Get the right relative URL for a given path -function getNavURL(url) { - references = document.getElementsByClassName("reference internal") - for (let i = 0; i < references.length; i++) { - if (references[i].href.includes(url)) { - return references[i].href - } - } -} - -is_examples = window.location.href.endsWith("ray-overview/examples.html") -is_get_started = window.location.href.endsWith("ray-overview/getting-started.html") -is_use_cases = window.location.href.endsWith("ray-overview/use-cases.html") -is_libraries = window.location.href.includes("/ray-core/") || - window.location.href.includes("/data/") || - window.location.href.includes("/train/") || - window.location.href.includes("/tune/") || - window.location.href.includes("/serve/") || - window.location.href.includes("/rllib/") -is_ecosystem = window.location.href.endsWith("ray-overview/ray-libraries.html") -is_documentation = !(is_get_started || is_use_cases || is_examples || is_libraries || is_ecosystem) - -downCaret = '' -rayLogoSvg = "" - -topNavContent = document.createElement("div"); -topNavContent.setAttribute("class", "top-nav-content") - -// The left part that contains links and menus -topNavContentLeft = document.createElement("div"); -topNavContentLeft.setAttribute("class", "left") - -//-- The Ray link -linkRay = document.createElement("a") -linkRay.setAttribute("href", "https://ray.io") -linkRay.setAttribute("class", "ray-logo") -linkRay.innerHTML += rayLogoSvg; -topNavContentLeft.append(linkRay) - -//-- The Get started link -getStartedLink = document.createElement("a") -getStartedLink.innerText = "Get started" -getStartedLink.setAttribute("href", getNavURL("ray-overview/getting-started.html")) -if (is_get_started) { - getStartedLink.style.borderBottom = "2px solid #007bff" -} -topNavContentLeft.append(getStartedLink) - -//-- The Blog link -// blogLink = document.createElement("a") -// blogLink.innerText = "Blog" -// blogLink.setAttribute("href", "https://www.anyscale.com/blog") -// topNavContentLeft.append(blogLink) - -//-- The Use Cases link -useCasesLink = document.createElement("a") -useCasesLink.innerText = "Use cases" -useCasesLink.setAttribute("href", getNavURL("ray-overview/use-cases.html")) -if (is_use_cases) { - useCasesLink.style.borderBottom = "2px solid #007bff" -} -topNavContentLeft.append(useCasesLink) - -//-- Example gallery link -let examplesLink = document.createElement("a") -examplesLink.innerText = "Examples" -// since we surgically remove the nav bar for the examples, we need to resort to a trick. -let examplesURL = getNavURL("ray-overview/use-cases.html").replace("use-cases.html", "examples.html").replace(/#$/, "") -examplesLink.setAttribute("href", examplesURL) -if (is_examples) { - examplesLink.style.borderBottom = "2px solid #007bff" -} -topNavContentLeft.append(examplesLink) - -//-- The Libraries menu -librariesMenu = document.createElement("div") -librariesMenu.setAttribute("class", "menu") -librariesMenu.innerHTML = "Libraries" + downCaret + "" -librariesList = document.createElement("ul") -librariesList.innerHTML += "
  • Ray CoreScale general Python applications
  • " -librariesList.innerHTML += "
  • Ray DataScale data ingest and preprocessing
  • " -librariesList.innerHTML += "
  • Ray TrainScale machine learning training
  • " -librariesList.innerHTML += "
  • Ray TuneScale hyperparameter tuning
  • " -librariesList.innerHTML += "
  • Ray ServeScale model serving
  • " -librariesList.innerHTML += "
  • Ray RLlibScale reinforcement learning
  • " -librariesMenu.append(librariesList) -if (is_libraries) { - librariesMenu.style.borderBottom = "2px solid #007bff" -} -topNavContentLeft.append(librariesMenu) - -//-- The Documentation link -documentationLink = document.createElement("a") -documentationLink.innerText = "Docs" -documentationLink.setAttribute("href", getNavURL("ray-overview/index.html").replace("ray-overview/index.html", "index.html")) -if (is_documentation) { - documentationLink.style.borderBottom = "2px solid #007bff" -} -topNavContentLeft.append(documentationLink) - -//-- The Resources menu -learnMenu = document.createElement("div") -learnMenu.setAttribute("class", "menu") -learnMenu.innerHTML = "Resources" + downCaret + "" -learnList = document.createElement("ul") -learnList.innerHTML += "
  • Discussion ForumGet your Ray questions answered
  • " -learnList.innerHTML += "
  • TrainingHands-on learning
  • " -learnList.innerHTML += "
  • BlogUpdates, best practices, user-stories
  • " -learnList.innerHTML += "
  • EventsWebinars, meetups, office hours
  • " -learnList.innerHTML += "
  • Success StoriesReal-world workload examples
  • " -learnList.innerHTML += "
  • EcosystemLibraries integrated with Ray
  • " -learnList.innerHTML += "
  • CommunityConnect with us
  • " -learnMenu.append(learnList) -topNavContentLeft.append(learnMenu) - -topNavContent.append(topNavContentLeft) - -// The right part that contains the Anyscale trial button -anyscaleButton = document.createElement("button"); -anyscaleButton.setAttribute("class", "try-anyscale"); -anyscaleLogoSvg = - ''; -anyscaleButton.innerHTML = - anyscaleLogoSvg + - 'Managed Ray on Anyscale'; -anyscaleButton.onclick = function () { - gtag("event", "try_anyscale", { - "send_to": "UA-110413294-1", - "event_category": "TryAnyscale", - "event_label": "TryAnyscale", - "value": 1, - }); - window.open('https://www.anyscale.com', '_blank'); -}; - -topNavContent.append(anyscaleButton) - -document.getElementsByClassName("topnav")[0].append(topNavContent) diff --git a/doc/source/_templates/breadcrumbs.html b/doc/source/_templates/breadcrumbs.html deleted file mode 100644 index f906c40db140..000000000000 --- a/doc/source/_templates/breadcrumbs.html +++ /dev/null @@ -1,15 +0,0 @@ - -
    - -
    diff --git a/doc/source/_templates/layout.html b/doc/source/_templates/layout.html index 3e90455b5d68..b14b340b1e20 100644 --- a/doc/source/_templates/layout.html +++ b/doc/source/_templates/layout.html @@ -2,26 +2,21 @@ {%- block extrahead %} - - + - + + + + + + - - - + {{ super() }} {% endblock %} diff --git a/doc/source/_templates/main-sidebar.html b/doc/source/_templates/main-sidebar.html new file mode 100644 index 000000000000..9fb3d72e9b80 --- /dev/null +++ b/doc/source/_templates/main-sidebar.html @@ -0,0 +1,11 @@ +{%- set sidebar_nav_html = generate_toctree_html("sidebar", +startdepth=0, +show_nav_level=0, +maxdepth=theme_navigation_depth|int, +collapse=theme_collapse_navigation|tobool, +includehidden=True, +titles_only=True) +-%} + diff --git a/doc/source/_templates/sbt-sidebar-nav.html b/doc/source/_templates/sbt-sidebar-nav.html deleted file mode 100644 index a10e9d7985e2..000000000000 --- a/doc/source/_templates/sbt-sidebar-nav.html +++ /dev/null @@ -1,21 +0,0 @@ - diff --git a/doc/source/_templates/sections/footer-content.html b/doc/source/_templates/sections/footer-content.html deleted file mode 100644 index 022af5bb92bb..000000000000 --- a/doc/source/_templates/sections/footer-content.html +++ /dev/null @@ -1,24 +0,0 @@ - -{% extends "!sections/footer-content.html" %} - -

    - {% if author %} - {{ translate('By') }} {{ author }}
    - {% endif %} - {%- if show_copyright %} - {%- if hasdoc('copyright') %} - {% trans prefix=translate('Copyright'), path=pathto('copyright'), copyright=copyright|e %}© {{ prefix }} {{ copyright }}.{% endtrans %}
    - {%- else %} - {% trans prefix=translate('Copyright'), copyright=copyright|e %}© {{ prefix }} {{ copyright }}.{% endtrans %}
    - {%- endif %} - {%- endif %} - {%- if last_updated %} - {% trans prefix=translate('Last updated on'), last_updated=last_updated|e %}{{ prefix }} {{ last_updated }}.{% endtrans %}
    - {%- endif %} - {%- if theme_extra_footer %} -

    - {%- endif %} -

    -{% include 'csat.html' %}