Skip to content

Commit

Permalink
Update website conf (#11675)
Browse files Browse the repository at this point in the history
Co-authored-by: Eric Larson <[email protected]>
  • Loading branch information
drammock and larsoner authored May 4, 2023
1 parent fe1d6ed commit dba7df1
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 28 deletions.
4 changes: 0 additions & 4 deletions doc/_static/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
--pst-font-family-monospace: 'Source Code Pro', var(--pst-font-family-monospace-system);
/* colors that aren't responsive to light/dark mode */
--mne-color-discord: #5865F2;
--mne-color-twitter: #55acee;
--mne-color-primary: #007bff;
--mne-color-primary-highlight: #0063cc;
/* font weight */
Expand Down Expand Up @@ -209,9 +208,6 @@ aside.footnote:last-child {
#navbar-icon-links i.fa-square-github::before {
color: var(--mne-color-github);
}
#navbar-icon-links i.fa-square-twitter::before {
color: var(--mne-color-twitter);
}
#navbar-icon-links i.fa-discourse::before {
color: var(--mne-color-discourse);
}
Expand Down
4 changes: 2 additions & 2 deletions doc/_templates/homepage.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!-- homepage gallery -->
<div class="container">
<div class="d-flex flex-wrap flex-row justify-content-center">
<div class="d-flex flex-wrap flex-row justify-content-between">
{% for item in carousel %}
<div class="col-12 col-sm-6 col-lg-4 my-2">
<div class="col-12 col-sm-6 col-lg-4 px-2 my-2">
<div class="card frontpage-gallery">
<a href="{{ item.url }}">
<img class="card-img institution" src="{{ item.img if item.img.startswith('http') else pathto('_images/' + item.img, 1) }}" alt="{{ item.alt }}">
Expand Down
2 changes: 1 addition & 1 deletion doc/_templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
{% endblock %}

{%- block scripts_end %}
<script src="https://mne.tools/versionwarning.js"></script>
{{ super() }}
<script src="https://mne.tools/versionwarning.js"></script>
{%- endblock %}
32 changes: 18 additions & 14 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,27 +81,30 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
# builtin
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.coverage",
"sphinx.ext.doctest",
"sphinx.ext.graphviz",
"sphinx.ext.intersphinx",
"sphinx.ext.linkcode",
"sphinx.ext.mathjax",
"sphinx.ext.todo",
"sphinx.ext.graphviz",
# contrib
"matplotlib.sphinxext.plot_directive",
"numpydoc",
"sphinx_copybutton",
"sphinx_design",
"sphinx_gallery.gen_gallery",
"sphinxcontrib.bibtex",
"sphinxcontrib.youtube",
# homegrown
"gen_commands",
"gen_names",
"gh_substitutions",
"mne_substitutions",
"newcontrib_substitutions",
"gen_names",
"matplotlib.sphinxext.plot_directive",
"sphinxcontrib.bibtex",
"sphinx_copybutton",
"sphinx_design",
"sphinxcontrib.youtube",
"unit_role",
]

Expand Down Expand Up @@ -785,20 +788,18 @@ def append_attr_meth_examples(app, what, name, obj, options, lines):
),
],
"icon_links_label": "External Links", # for screen reader
"use_edit_page_button": False,
"use_edit_page_button": True,
"navigation_with_keys": False,
"show_toc_level": 1,
"article_header_start": [], # disable breadcrumbs
"navbar_end": ["theme-switcher", "version-switcher", "navbar-icon-links"],
"footer_start": ["copyright"],
"footer_end": [],
"secondary_sidebar_items": ["page-toc"],
"secondary_sidebar_items": ["page-toc", "edit-this-page"],
"analytics": dict(google_analytics_id="G-5TBCPCRB6X"),
"switcher": {
"json_url": "https://mne.tools/dev/_static/versions.json",
"version_match": switcher_version_match,
},
"pygment_light_style": "default",
"pygment_dark_style": "github-dark",
}

# The name of an image file (relative to this directory) to place at the top
Expand Down Expand Up @@ -851,8 +852,11 @@ def append_attr_meth_examples(app, what, name, obj, options, lines):
# variables to pass to HTML templating engine
html_context = {
"default_mode": "auto",
"pygment_light_style": "tango",
"pygment_dark_style": "native",
# next 3 are for the "edit this page" button
"github_user": "mne-tools",
"github_repo": "mne-python",
"github_version": "main",
"doc_path": "doc",
"funders": [
dict(img="nih.svg", size="3", title="National Institutes of Health"),
dict(img="nsf.png", size="3.5", title="US National Science Foundation"),
Expand Down
2 changes: 2 additions & 0 deletions doc/index.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
:html_theme.sidebar_secondary.remove:

.. title:: MNE

.. The page title must be in rST for it to show in next/prev page buttons.
Expand Down
2 changes: 2 additions & 0 deletions doc/install/index.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
:html_theme.sidebar_secondary.remove:

.. _install:
.. _quick-start:

Expand Down
9 changes: 6 additions & 3 deletions doc/overview/cite.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@ Citing the software
-------------------

To cite specific version numbers of the software, you can use the DOIs provided
by `Zenodo <https://doi.org/10.5281/zenodo.592483>`_. Additionally, we ask that
when citing the MNE-Python package, you cite the canonical journal article
reference :footcite:`GramfortEtAl2013a`:
by `Zenodo <https://doi.org/10.5281/zenodo.592483>`_; look for the "versions"
list in the sidebar to find the correct DOI for the version you used in your
work (or to cite the project in a general way, use
https://doi.org/10.5281/zenodo.592483). Additionally, we ask that when citing
MNE-Python you also cite the canonical journal article reference
:footcite:`GramfortEtAl2013a`:

.. footbibliography::

Expand Down
6 changes: 3 additions & 3 deletions doc/overview/migrating.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,6 @@ Potential pitfalls
- The concept of channel types is critical in MNE because it supports analysis
of multimodal data (e.g., EEG, MEG, EOG, Stim channel, etc) whereas most
EEGLAB functions assume all channels are of the same type (EEG). To restrict
channels to a single type, see :func:`mne.pick_types`, :meth:`raw.pick_types
<mne.io.Raw.pick_types>`, :meth:`epochs.pick_types <mne.Epochs.pick_types>`,
:meth:`evoked.pick_types <mne.Evoked.pick_types>`, etc.
channels to a single type, see :func:`mne.pick_types`,
:meth:`raw.pick() <mne.io.Raw.pick>`, :meth:`epochs.pick() <mne.Epochs.pick>`
and :meth:`evoked.pick() <mne.Evoked.pick>`.
2 changes: 1 addition & 1 deletion requirements_doc.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# requirements for building docs
sphinx!=4.1.0,<6
git+https://github.com/numpy/numpydoc.git@main
pydata_sphinx_theme==0.13.1
pydata_sphinx_theme==0.13.3
git+https://github.com/sphinx-gallery/sphinx-gallery@master
sphinxcontrib-bibtex>=2.5
memory_profiler
Expand Down

0 comments on commit dba7df1

Please sign in to comment.