diff --git a/.github/workflows/build_docs.yml b/.github/workflows/build_docs.yml index 65d8ea0d9..7bd6f6afd 100644 --- a/.github/workflows/build_docs.yml +++ b/.github/workflows/build_docs.yml @@ -43,7 +43,6 @@ jobs: run: | python -m pip install --upgrade pip python -m pip install "napari/[all]" - python -m pip install -r docs/requirements.txt env: PIP_CONSTRAINT: ${{ github.workspace }}/napari/resources/constraints/constraints_py3.10_docs.txt diff --git a/.github/workflows/deploy_docs.yml b/.github/workflows/deploy_docs.yml index 66eaf0480..f094df199 100644 --- a/.github/workflows/deploy_docs.yml +++ b/.github/workflows/deploy_docs.yml @@ -47,7 +47,6 @@ jobs: run: | python -m pip install --upgrade pip python -m pip install "napari-repo/[all]" -c "napari-repo/resources/constraints/constraints_py3.10_docs.txt" - python -m pip install -r docs/requirements.txt -c "napari-repo/resources/constraints/constraints_py3.10_docs.txt" - name: Testing run: | python -c 'import napari; print(napari.__version__)' diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html index 4003c48fd..c9c615197 100644 --- a/docs/_templates/layout.html +++ b/docs/_templates/layout.html @@ -1,4 +1,4 @@ -{% extends "!layout.html" %} +{% extends "!napari-layout.html" %} {% block extrahead %} {{ super() }} diff --git a/docs/_templates/sbt-sidebar-nav.html b/docs/_templates/sbt-sidebar-nav.html deleted file mode 100644 index a9c0e18a3..000000000 --- a/docs/_templates/sbt-sidebar-nav.html +++ /dev/null @@ -1,3 +0,0 @@ - \ No newline at end of file diff --git a/docs/_templates/sidebar-nav-bs.html b/docs/_templates/sidebar-nav-bs.html new file mode 100644 index 000000000..ac8e5eabc --- /dev/null +++ b/docs/_templates/sidebar-nav-bs.html @@ -0,0 +1,4 @@ + diff --git a/docs/community/meeting_schedule.md b/docs/community/meeting_schedule.md index 95239e34b..ec6bf4ff6 100644 --- a/docs/community/meeting_schedule.md +++ b/docs/community/meeting_schedule.md @@ -2,11 +2,61 @@ We hold regular meetings, the timings of which are available on our [public calendar](https://calendar.google.com/calendar/embed?src=c_35r93ec6vtp8smhm7dv5uot0v4%40group.calendar.google.com). -```{calendar} ---- -show-filters: true -calendar-id: c_35r93ec6vtp8smhm7dv5uot0v4@group.calendar.google.com ---- -``` - If you are using napari or interested in how napari could be used in your work, please join one of our regular community meetings. If you're interested in diving deep on particular topic you could join the closest working group meeting. We currently have four working groups 'Bundled Application', 'Plugins', 'Architecture', and 'Documentation' that meet on a semi-regular candence. You can learn more about our working groups and community meetings in the corresponding discussion streams on the [napari Zulip](https://napari.zulipchat.com/login/). + +
+ +
+ + + + + + diff --git a/docs/conf.py b/docs/conf.py index 12c21b039..6c70bd64a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -15,6 +15,7 @@ # sys.path.insert(0, os.path.abspath('.')) import re +import os from importlib import import_module from pathlib import Path from urllib.parse import urlparse, urlunparse @@ -83,7 +84,7 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = 'napari' +html_theme = 'napari_sphinx_theme' # Define the json_url for our version switcher. json_url = "https://napari.org/dev/_static/version_switcher.json" @@ -98,12 +99,17 @@ {"name": "napari hub", "url": "https://napari-hub.org"} ], "github_url": "https://github.com/napari/napari", - "navbar_start": ["navbar-project"], + "navbar_start": ["navbar-logo", "navbar-project"], "navbar_end": ["version-switcher", "navbar-icon-links"], "switcher": { "json_url": json_url, "version_match": version_match, }, + "navbar_persistent": [], + "header_links_before_dropdown": 6, + "secondary_sidebar_items": ["page-toc"], + "pygment_light_style": "napari", + "pygment_dark_style": "napari", } # Add any paths that contain custom static files (such as style sheets) here, @@ -262,15 +268,31 @@ def napari_scraper(block, block_vars, gallery_conf): 'within_subsection_order': ExampleTitleSortKey, } +GOOGLE_CALENDAR_API_KEY = os.environ.get('GOOGLE_CALENDAR_API_KEY', '') + + +def add_google_calendar_secrets(app, docname, source): + """Add google calendar api key to meeting schedule page. + + The source argument is a list whose single element is the contents of the + source file. You can process the contents and replace this item to implement + source-level transformations. + """ + if docname == 'community/meeting_schedule': + source[0] = source[0].replace('{API_KEY}', GOOGLE_CALENDAR_API_KEY) + def setup(app): - """Ignore .ipynb files. + """Set up docs build. - Prevents sphinx from complaining about multiple files found for document - when generating the gallery. + * Ignores .ipynb files to prevent sphinx from complaining about multiple + files found for document when generating the gallery + * Rewrites github anchors to be comparable + * Adds google calendar api key to meetings schedule page """ app.registry.source_suffix.pop(".ipynb", None) + app.connect('source-read', add_google_calendar_secrets) app.connect('linkcheck-process-uri', rewrite_github_anchor) diff --git a/requirements.txt b/requirements.txt index 14b322ac4..bddcf7d18 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -sphinx<5 +sphinx<6 sphinx-autobuild sphinx-tabs sphinx-tags @@ -9,7 +9,7 @@ sphinx-copybutton sphinx-gallery sphinx_autodoc_typehints==1.12.0 myst-nb -napari-sphinx-theme +napari-sphinx-theme>=0.3.0.dev0 matplotlib lxml imageio-ffmpeg