diff --git a/docs/community/bootstrap.rst b/docs/community/bootstrap.rst
new file mode 100644
index 000000000..58b548a10
--- /dev/null
+++ b/docs/community/bootstrap.rst
@@ -0,0 +1,60 @@
+Upgrade to bootstrap 5
+======================
+
+Since *v0.13*, ``pydata-sphinx-theme`` has moved from Bootstrap 4 to `Bootstrap 5 `_.
+This documentation will guide you through the changes we made and how you could follow the same steps in your existing documentation.
+
+Dropping **JQuery**
+-------------------
+
+Bootstrap Dropped its **JQuery** dependency and rewrote plugins to be in regular JavaScript.
+Sphinx *v6* will do the same (https://github.com/sphinx-doc/sphinx/issues/10070).
+As a consequence, we also rewrote all our javascript to only use vanilla **JavaScript**.
+Any documentation relying on **JQuery** in their ``custom.js`` files will need to rewrite it or specifically import **JQuery**.
+
+Breaking changes
+----------------
+
+‼️ Relevant for those using a ``custom.css`` and/or a ``custom.js`` file!
+
+Bootstrap changed a number of CSS classes, so if you wrote custom rules of JS logic that depended on them, it may have changed.
+
+All of the changes from *v4* to *v5* are `listed in their documentation `_.
+Below list the ones that had consequences on ``pydata-sphinx-theme`` components.
+
+Sass
+^^^^
+
+- Media query mixins parameters have changed for a more logical approach.
+
+ - ``media-breakpoint-down()`` uses the breakpoint itself instead of the next breakpoint (e.g., ``media-breakpoint-down(lg)`` instead of ``media-breakpoint-down(md)`` targets viewports smaller than lg).
+ - Similarly, the second parameter in ``media-breakpoint-between()`` also uses the breakpoint itself instead of the next breakpoint (e.g., ``media-between(sm, lg)`` instead of ``media-breakpoint-between(sm, md)`` targets viewports between sm and lg).
+
+- ``box-shadow`` mixins now allow ``null`` values and drop ``none`` from multiple arguments.
+
+Content, Reboot, etc
+^^^^^^^^^^^^^^^^^^^^
+
+- Nested tables do not inherit styles anymore.
+
+- ``.thead-light`` and ``.thead-dark`` are dropped in favor of the ``.table-*`` variant classes which can be used for all table elements (``thead``, ``tbody``, ``tfoot``, ``tr``, ``th`` and ``td``).
+
+- Dropped ``.text-justify`` class. See https://github.com/twbs/bootstrap/pull/29793
+
+Utilities
+^^^^^^^^^
+
+- Renamed several utilities to use logical property names instead of directional names with the addition of RTL support:
+
+ - Renamed ``.left-*`` and ``.right-*`` to ``.start-*`` and ``.end-*``.
+ - Renamed ``.float-left`` and ``.float-right`` to ``.float-start`` and ``.float-end``.
+ - Renamed ``.border-left`` and ``.border-right`` to ``.border-start`` and ``.border-end``.
+ - Renamed ``.rounded-left`` and ``.rounded-right`` to ``.rounded-start`` and ``.rounded-end``.
+ - Renamed ``.ml-*`` and ``.mr-*`` to ``.ms-*`` and ``.me-*``.
+ - Renamed ``.pl-*`` and ``.pr-*`` to ``.ps-*`` and ``.pe-*``.
+ - Renamed ``.text-left`` and ``.text-right`` to ``.text-start`` and ``.text-end``.
+
+JavaScript
+^^^^^^^^^^
+
+- Data attributes for all JavaScript plugins are now namespaced to help distinguish Bootstrap functionality from third parties and your own code. For example, we use ``data-bs-toggle`` instead of ``data-toggle``.
diff --git a/docs/community/index.md b/docs/community/index.md
index 33deabd29..f704e61ba 100644
--- a/docs/community/index.md
+++ b/docs/community/index.md
@@ -16,7 +16,7 @@ setup
structure
topics
manual
-
+bootstrap
```
```{toctree}
diff --git a/docs/user_guide/web-components.rst b/docs/user_guide/web-components.rst
index c0239cddc..90144d3a3 100644
--- a/docs/user_guide/web-components.rst
+++ b/docs/user_guide/web-components.rst
@@ -105,7 +105,7 @@ Cards
.. grid-item-card:: A card with a dropdown menu
- .. dropdown:: :fa:`eye,mr-1` third card
+ .. dropdown:: :fa:`eye me-1` third card
Hidden content
diff --git a/package-lock.json b/package-lock.json
index 016df0408..b57a2e5bd 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -140,6 +140,11 @@
}
}
},
+ "@popperjs/core": {
+ "version": "2.11.6",
+ "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.6.tgz",
+ "integrity": "sha512-50/17A98tWUfQ176raKiOGXuYpLyyVMkxxG6oylzL3BPOlA6ADGdK7EYunSa4I064xerltq9TGXs8HmOk5E+vw=="
+ },
"@tootallnate/once": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz",
@@ -1108,9 +1113,9 @@
"integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww=="
},
"bootstrap": {
- "version": "4.6.1",
- "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.6.1.tgz",
- "integrity": "sha512-0dj+VgI9Ecom+rvvpNZ4MUZJz8dcX7WCX+eTID9+/8HgOkv3dsRzi8BGeZJCQU6flWQVYxwTQnEZFrmJSEO7og=="
+ "version": "5.2.2",
+ "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.2.2.tgz",
+ "integrity": "sha512-dEtzMTV71n6Fhmbg4fYJzQsw1N29hJKO1js5ackCgIpDcGid2ETMGC6zwSYw09v05Y+oRdQ9loC54zB1La3hHQ=="
},
"brace-expansion": {
"version": "1.1.11",
@@ -4250,11 +4255,6 @@
"integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==",
"dev": true
},
- "jquery": {
- "version": "3.5.1",
- "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.5.1.tgz",
- "integrity": "sha512-XwIBPqcMn57FxfT+Go5pzySnm4KWkT1Tv7gjrpT1srtf8Weynl6R273VJ5GjkRb51IzMp5nbaPjJXMWeju2MKg=="
- },
"js-base64": {
"version": "2.6.4",
"resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz",
@@ -5688,11 +5688,6 @@
"find-up": "^3.0.0"
}
},
- "popper.js": {
- "version": "1.16.1",
- "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1.tgz",
- "integrity": "sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ=="
- },
"posix-character-classes": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz",
diff --git a/package.json b/package.json
index 2f5d335a8..adde39656 100644
--- a/package.json
+++ b/package.json
@@ -28,9 +28,8 @@
},
"dependencies": {
"@fortawesome/fontawesome-free": "6.1.2",
- "bootstrap": "^4.4.1",
- "jquery": "3.5.1",
- "optimize-css-assets-webpack-plugin": "^6.0.1",
- "popper.js": "^1.16.1"
+ "@popperjs/core": "^2.11.6",
+ "bootstrap": "^5.2.2",
+ "optimize-css-assets-webpack-plugin": "^6.0.1"
}
}
diff --git a/src/pydata_sphinx_theme/__init__.py b/src/pydata_sphinx_theme/__init__.py
index 3389d369b..c4b8bbf8b 100644
--- a/src/pydata_sphinx_theme/__init__.py
+++ b/src/pydata_sphinx_theme/__init__.py
@@ -373,7 +373,7 @@ def generate_header_nav_html(n_links_before_dropdown=5):
links_dropdown_html = "\n".join(links_dropdown)
out += f"""