Skip to content

Commit

Permalink
Docs: Update pydata-sphinx-theme and add Discourse links (#6120)
Browse files Browse the repository at this point in the history
The `pydata-sphinx-theme` is updated to `v0.13.3` or higher, which is
the latest release. This changes the style a bit, but mostly for the
better.

It also allows to use custom icon links in the top-right header. This is
used to add a link to the AiiDA home page (using the AiiDA icon) and add
a link to the new Discourse server. Another admonition box is added to
the landing page that directs users needing support to Discourse.
  • Loading branch information
sphuber authored Sep 13, 2023
1 parent a85af4f commit 13df42c
Show file tree
Hide file tree
Showing 8 changed files with 92 additions and 10 deletions.
5 changes: 5 additions & 0 deletions docs/source/_static/aiida-custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,8 @@ div.highlight-bash div.highlight {
div.highlight-console div.highlight {
background-color: aliceblue;
}

/* This is a fix to prevent a scroll-bar from appearing in the left sidebar */
.bd-sidebar-primary {
overflow-y: hidden;
}
51 changes: 51 additions & 0 deletions docs/source/_static/logo-aiida-gray.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 26 additions & 6 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,33 @@
# see: https://pydata-sphinx-theme.readthedocs.io/en/latest/user_guide/configuring.html
html_theme = 'pydata_sphinx_theme'
html_theme_options = {
'external_links': [{
'url': 'http://www.aiida.net/',
'name': 'AiiDA Home'
}],
'github_url': 'https://github.com/aiidateam/aiida-core',
'twitter_url': 'https://twitter.com/aiidateam',
'use_edit_page_button': True,
'icon_links': [
{
'name': 'AiiDA',
'url': 'http://aiida.net',
'icon': '_static/logo-aiida-gray.svg',
'type': 'local',
},
{
'name': 'Discourse',
'url': 'https://aiida.discourse.group',
'icon': 'fa-brands fa-discourse',
'type': 'fontawesome',
},
{
'name': 'GitHub',
'url': 'https://www.github.com/aiidateam/aiida-core',
'icon': 'fa-brands fa-square-github',
'type': 'fontawesome',
},
{
'name': 'Twitter',
'url': 'https://www.twitter.com/aiidateam',
'icon': 'fa-brands fa-twitter-square',
'type': 'fontawesome',
},
],
}
html_context = {
'github_user': 'aiidateam',
Expand Down
6 changes: 6 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,12 @@ Welcome to AiiDA's documentation!

------------------------------

.. admonition:: Need support?
:class: title-icon-code-fork

For any questions, discussions and requests for support, please visit the `Discourse forum <https://aiida.discourse.group>`__.


.. admonition:: Development Contributions
:class: title-icon-code-fork

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ rest = [
"seekpath~=1.9,>=1.9.3"
]
docs = [
"pydata-sphinx-theme~=0.8.0",
"pydata-sphinx-theme~=0.13.3",
"sphinx~=4.1",
"sphinxcontrib-details-directive~=0.1.0",
"sphinx-copybutton~=0.5.0",
Expand Down
2 changes: 1 addition & 1 deletion requirements/requirements-py-3.10.txt
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ pybtex==0.24.0
pycifrw==4.4.5
pycparser==2.21
pydantic==1.10.9
pydata-sphinx-theme==0.8.1
pydata-sphinx-theme==0.13.3
pygments==2.15.1
pymatgen==2023.5.31
pympler==0.9
Expand Down
2 changes: 1 addition & 1 deletion requirements/requirements-py-3.11.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ pybtex==0.24.0
pycifrw==4.4.5
pycparser==2.21
pydantic==1.10.9
pydata-sphinx-theme==0.8.1
pydata-sphinx-theme==0.13.3
pygments==2.15.1
pymatgen==2023.9.2
pympler==0.9
Expand Down
2 changes: 1 addition & 1 deletion requirements/requirements-py-3.9.txt
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ pybtex==0.24.0
pycifrw==4.4.5
pycparser==2.21
pydantic==1.10.9
pydata-sphinx-theme==0.8.1
pydata-sphinx-theme==0.13.3
pygments==2.15.1
pymatgen==2023.5.31
pympler==0.9
Expand Down

0 comments on commit 13df42c

Please sign in to comment.