Skip to content

Commit

Permalink
[Docs] Update dependencies for docs (#2919)
Browse files Browse the repository at this point in the history
* Update dependencies for docs

* Fix dark mode with svg

* fix tab

* update python version

* update python version

* revert code style

* Mouseover less jarring

* Fix depth

* update copyright

* remove hover color for search

* remove scroll bar

* try to remove ad

* remove ads

* format

* Fix font for safari

* remove bg for dark mode

* Fix size

* Fix hiding for scrollbar
  • Loading branch information
Michaelvll authored Jan 23, 2024
1 parent 39d8f32 commit f78a16e
Show file tree
Hide file tree
Showing 8 changed files with 248 additions and 33 deletions.
4 changes: 2 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
30 changes: 16 additions & 14 deletions docs/requirements-docs.txt
Original file line number Diff line number Diff line change
@@ -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
64 changes: 64 additions & 0 deletions docs/source/_static/SkyPilot_wide_dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
64 changes: 64 additions & 0 deletions docs/source/_static/SkyPilot_wide_light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
76 changes: 75 additions & 1 deletion docs/source/_static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,78 @@
/* RTD Flyout */
.rst-versions {
z-index: 10001 !important; /* Set to 10001 to avoid overlap with kapa */
}
}


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);
}
14 changes: 7 additions & 7 deletions docs/source/cloud-setup/cloud-permissions/aws.rst
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,15 @@ AWS accounts can be attached with a policy that limits the permissions of the ac
"Resource": "arn:aws:iam::<account-ID-without-hyphens>: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"
}
}
}
}
]
}
Expand Down
17 changes: 11 additions & 6 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -50,7 +50,6 @@
# The main toctree document.
main_doc = 'index'

pygments_style = None
autosummary_generate = True
napolean_use_rtype = False

Expand All @@ -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
Expand All @@ -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.
Expand All @@ -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']
12 changes: 9 additions & 3 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -144,7 +150,7 @@ Documentation
reference/faq

.. toctree::
:maxdepth: 0
:maxdepth: 1
:caption: Developer Guides

developers/CONTRIBUTING
Expand Down

0 comments on commit f78a16e

Please sign in to comment.