Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,22 @@ help:
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(O)

# Build without executing the example gallery (faster)
html-noplot:
@$(SPHINXBUILD) $(SPHINXOPTS) -D plot_gallery=0 $(SOURCEDIR) $(BUILDDIR)

# View the built documentation
# If we build the example gallery, the index file is at _build/html/index.html
# If we don't (e.g. html-noplot), then it is at _build/index.html
view:
@python -c "import webbrowser; webbrowser.open_new_tab('file://$(PWD)/_build/html/index.html')"
@if [ -f "$(BUILDDIR)/html/index.html" ]; then \
python -c "import webbrowser; webbrowser.open_new_tab('file://$(PWD)/$(BUILDDIR)/html/index.html')"; \
elif [ -f "$(BUILDDIR)/index.html" ]; then \
python -c "import webbrowser; webbrowser.open_new_tab('file://$(PWD)/$(BUILDDIR)/index.html')"; \
else echo "No index.html file found to open. Did you build the docs?"; \
fi

clean:
-rm -rf _build auto_examples generated
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ doc = [
"seaborn",
"sphinx-copybutton",
"sphinx>=7.4.7",
"sphinx_gallery",
"sphinx_gallery>=0.19.0",
]
# Dependencies for using all mne_bids features
full = [
Expand Down