Skip to content

Commit

Permalink
Update document theme.
Browse files Browse the repository at this point in the history
  • Loading branch information
zjowowen committed Jul 6, 2024
1 parent 6c246a5 commit 46fa20e
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 11 deletions.
6 changes: 6 additions & 0 deletions docs/source/_static/css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.header-logo {
background-image: url("../images/logo.png");
background-size: 180px 40px;
height: 40px;
width: 180px;
}
Binary file added docs/source/_static/images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions docs/source/_templates/layout.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{% extends "!layout.html" %}
{% block extrahead %}
<link href="{{ pathto("_static/css/style.css", True) }}" rel="stylesheet" type="text/css">
{% endblock %}
27 changes: 17 additions & 10 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,17 +141,24 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of plugins themes.
#
html_theme = 'sphinx_rtd_theme'
htmlhelp_basename = 'TreeValue'

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the plugins static files,
# so a file named "default.css" will overwrite the plugins "default.css".
import pytorch_sphinx_theme
html_theme = 'pytorch_sphinx_theme'

html_theme_path = [pytorch_sphinx_theme.get_html_theme_path()]
html_theme_options = {
'logo_url':
'https://opendilab.github.io/GenerativeRL/',
'menu': [
{
'name': 'GitHub',
'url': 'https://github.com/opendilab/GenerativeRL'
},
],
# Specify the language of shared menu
'menu_lang': "en"
}
html_static_path = ['_static']

html_css_files = [
'css/custom.css',
]
html_css_files = ['css/style.css']

epub_title = project
epub_exclude_files = ['search.html']
Expand Down
3 changes: 2 additions & 1 deletion requirements-doc.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Jinja2>=3.0.0
sphinx>=3.2.0
sphinx<7
sphinx_rtd_theme>=0.4.3
enum_tools
sphinx-toolbox
Expand All @@ -19,3 +19,4 @@ setuptools_scm
sphinx_autodoc_typehints
lxml_html_clean
lxml
-e git+https://github.com/opendilab/pytorch_sphinx_theme.git#egg=pytorch_sphinx_theme

0 comments on commit 46fa20e

Please sign in to comment.