diff --git a/.readthedocs.yml b/.readthedocs.yml index a5387af03ea..eb1f8a0a950 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -6,9 +6,9 @@ version: 2 build: - os: "ubuntu-20.04" + os: "ubuntu-22.04" tools: - python: "3.8" + python: "3.10" # Build documentation in the docs/ directory with Sphinx sphinx: diff --git a/docs/requirements-docs.txt b/docs/requirements-docs.txt index a4436ba0391..161f0eecd54 100644 --- a/docs/requirements-docs.txt +++ b/docs/requirements-docs.txt @@ -1,16 +1,18 @@ -sphinx==4.3.2 +sphinx==7.1.2 sphinx-click==5.0.1 -sphinx-copybutton==0.5.0 -sphinx-design==0.4.1 -pydata-sphinx-theme==0.7.2 -sphinx-autodoc-typehints==1.17.0 -sphinx-book-theme==0.2.0 -sphinx-togglebutton==0.3.0 -sphinxcontrib-applehelp==1.0.2 -sphinxcontrib-devhelp==1.0.2 -sphinxcontrib-htmlhelp==2.0.0 -sphinxcontrib-jsmath==1.0.1 -sphinxcontrib-qthelp==1.0.3 -sphinxcontrib-serializinghtml==1.1.5 +sphinx-copybutton==0.5.2 sphinxemoji==0.2.0 -myst-parser==0.18.1 +sphinx-design==0.5.0 +pydata-sphinx-theme==0.14.4 +Pygments==2.16.1 +myst-parser==2.0.0 + +sphinx-autodoc-typehints==1.25.2 +sphinx-book-theme==1.1.0 +sphinx-togglebutton==0.3.2 +sphinxcontrib-applehelp==1.0.7 +sphinxcontrib-devhelp==1.0.5 +sphinxcontrib-htmlhelp==2.0.4 +sphinxcontrib-jsmath==1.0.1 +sphinxcontrib-qthelp==1.0.6 +sphinxcontrib-serializinghtml==1.1.9 diff --git a/docs/source/_static/SkyPilot_wide_dark.svg b/docs/source/_static/SkyPilot_wide_dark.svg new file mode 100644 index 00000000000..310845379d8 --- /dev/null +++ b/docs/source/_static/SkyPilot_wide_dark.svg @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/source/_static/SkyPilot_wide_light.svg b/docs/source/_static/SkyPilot_wide_light.svg new file mode 100644 index 00000000000..a85852f6028 --- /dev/null +++ b/docs/source/_static/SkyPilot_wide_light.svg @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/source/_static/custom.css b/docs/source/_static/custom.css index 8837420a524..35a1ce3eb21 100644 --- a/docs/source/_static/custom.css +++ b/docs/source/_static/custom.css @@ -19,4 +19,78 @@ /* RTD Flyout */ .rst-versions { z-index: 10001 !important; /* Set to 10001 to avoid overlap with kapa */ -} \ No newline at end of file +} + + +html[data-theme="light"] { + --pst-color-secondary: var(--pst-color-primary); +} + +html[data-theme="dark"] { + --pst-color-secondary: var(--pst-color-primary); + + .bd-sidebar::-webkit-scrollbar { + width: 6px; + background-color: #2e2e2e; + } + + .bd-sidebar::-webkit-scrollbar-thumb { + background-color: #565656; + border-radius: 6px; + } + + .bd-sidebar::-webkit-scrollbar-thumb:hover { + background-color: #6f6f6f; + } + + /* Common hidden scrollbar when not hovered */ + .bd-sidebar:not(:hover) { + -ms-overflow-style: none; + } + + .bd-sidebar:not(:hover)::-webkit-scrollbar { + background: var(--pst-color-background); + } + + .bd-sidebar:not(:hover)::-webkit-scrollbar-thumb { + background: var(--pst-color-background); + } +} + +/* Light mode scrollbar styles */ +.bd-sidebar::-webkit-scrollbar { + width: 6px; + background-color: #f0f0f0; +} + +.bd-sidebar::-webkit-scrollbar-thumb { + background-color: #c1c1c1; + /* rounded corners */ + border-radius: 6px; +} + +.bd-sidebar::-webkit-scrollbar-thumb:hover { + background-color: #a8a8a8; +} + +/* Common hidden scrollbar when not hovered */ +.bd-sidebar:not(:hover) { + -ms-overflow-style: none; +} + +.bd-sidebar:not(:hover)::-webkit-scrollbar { + background: var(--pst-color-background); +} + +.bd-sidebar:not(:hover)::-webkit-scrollbar-thumb { + background: var(--pst-color-background); +} + +/* Avoid the border of the search box when click on it */ +.form-control:focus,:focus-visible { + border: none; + box-shadow: none; + outline: none; + background-color: var(--pst-color-background); + color: var(--pst-color-text-muted); +} diff --git a/docs/source/cloud-setup/cloud-permissions/aws.rst b/docs/source/cloud-setup/cloud-permissions/aws.rst index 740c95d5d34..e34499df3b4 100644 --- a/docs/source/cloud-setup/cloud-permissions/aws.rst +++ b/docs/source/cloud-setup/cloud-permissions/aws.rst @@ -101,15 +101,15 @@ AWS accounts can be attached with a policy that limits the permissions of the ac "Resource": "arn:aws:iam:::instance-profile/skypilot-v1" }, { - "Effect": "Allow", - "Action": "iam:CreateServiceLinkedRole", - "Resource": "*", - "Condition": { - "StringEquals": { - "iam:AWSServiceName": "spot.amazonaws.com" + "Effect": "Allow", + "Action": "iam:CreateServiceLinkedRole", + "Resource": "*", + "Condition": { + "StringEquals": { + "iam:AWSServiceName": "spot.amazonaws.com" + } } } - } ] } diff --git a/docs/source/conf.py b/docs/source/conf.py index c0eb1b9a6f9..9a597c5c8ec 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -10,7 +10,7 @@ # -- Project information project = 'SkyPilot' -copyright = '2023, SkyPilot Team' +copyright = '2024, SkyPilot Team' author = 'the SkyPilot authors' # The version info for the project you're documenting, acts as replacement for @@ -50,7 +50,6 @@ # The main toctree document. main_doc = 'index' -pygments_style = None autosummary_generate = True napolean_use_rtype = False @@ -64,12 +63,18 @@ html_theme = 'sphinx_book_theme' html_theme_options = { # 'show_toc_level': 2, - 'logo_only': True, + 'logo': { + 'image_dark': '_static/SkyPilot_wide_dark.svg', + }, 'repository_url': 'https://github.com/skypilot-org/skypilot', 'use_repository_button': True, 'use_issues_button': True, 'use_edit_page_button': True, + 'repository_branch': 'master', 'path_to_docs': 'docs/source', + 'pygment_light_style': 'tango', + 'pygment_dark_style': 'monokai', + 'primary_sidebar_end': [], } # The name for this set of Sphinx documents. If None, it defaults to @@ -87,7 +92,7 @@ # The name of an image file (relative to this directory) to place at the top # of the sidebar. -html_logo = 'images/skypilot-wide-light-1k.png' +html_logo = '_static/SkyPilot_wide_light.svg' # 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), 16x16 or 32x32 pixels. @@ -97,5 +102,5 @@ # 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_js_files = ["custom.js"] -html_css_files = ["custom.css"] +html_js_files = ['custom.js'] +html_css_files = ['custom.css'] diff --git a/docs/source/index.rst b/docs/source/index.rst index b132046dbf6..59e529e99f5 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -1,11 +1,17 @@ Welcome to SkyPilot! ========================= -.. figure:: ./images/skypilot-wide-light-1k.png +.. image:: ./_static/SkyPilot_wide_light.svg :width: 60% :align: center :alt: SkyPilot - :class: no-scaled-link + :class: no-scaled-link, only-light + +.. image:: ./_static/SkyPilot_wide_dark.svg + :width: 60% + :align: center + :alt: SkyPilot + :class: no-scaled-link, only-dark .. raw:: html @@ -144,7 +150,7 @@ Documentation reference/faq .. toctree:: - :maxdepth: 0 + :maxdepth: 1 :caption: Developer Guides developers/CONTRIBUTING