Skip to content

Commit

Permalink
upgrade sphinx dependents
Browse files Browse the repository at this point in the history
  • Loading branch information
wang0618 committed Apr 21, 2024
1 parent 90becbd commit cff86c3
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ sphinx:
# configuration: mkdocs.yml

# Optionally build your docs in additional formats such as PDF and ePub
formats: all
formats:
- pdf

# Optionally set the version of Python and requirements required to build your docs
python:
Expand Down
6 changes: 6 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
'sphinx_toolbox.collapse',
]

# https://github.com/sphinx-doc/sphinx/issues/6316
toc_object_entries = False

primary_domain = "py"
default_role = "py:obj"
# intersphinx_mapping = {"python": ("https://docs.python.org/3.6/", None)}
Expand Down Expand Up @@ -71,9 +74,12 @@
html_static_path = ['static']



def setup(app):
"""Configure Sphinx"""
app.add_css_file('pywebio.css')
# from docutils.parsers.rst.directives.admonitions import Note
# app.add_directive('collapse', Note)


# -- Extension configuration -------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions docs/static/pywebio.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ ready(function () {

// Translated Version Prompt
const user_lang = (navigator.language || navigator.userLanguage || 'en').toLowerCase().split('-')[0];
const doc_lang = window.location.pathname.split('/')[1].split('_')[0];
const doc_lang = window.location.pathname.split('/')[1].split('-')[0];
if (user_lang !== doc_lang && ['zh', 'en'].indexOf(user_lang) !== -1) {
let u = new URL(window.location.href);
let t = u.pathname.split('/');
t[1] = user_lang === 'en' ? 'en' : 'zh_CN';
t[1] = user_lang === 'en' ? 'en' : 'zh-cn';
u.pathname = t.join('/');

let turl = u.href;
Expand Down
11 changes: 6 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@ percy-selenium
coverage

# doc building requirements
Jinja2==3.0.3
sphinx==3.*
Jinja2
sphinx
sphinx-tabs
sphinx-rtd-theme==0.4.*
sphinx-toolbox==2.15.0
sphinx-rtd-theme
sphinx-toolbox
sphinx-intl
pywebio_battery
# pywebio_battery in master branch
https://github.com/pywebio/pywebio-battery/archive/refs/heads/master.zip

# demo running requirements
numpy
Expand Down

0 comments on commit cff86c3

Please sign in to comment.