From 419a01769bfb6e23164c1c353f30d5066e949dcd Mon Sep 17 00:00:00 2001 From: Oliver Beckstein Date: Sun, 6 May 2018 12:54:38 -0700 Subject: [PATCH] add sitemap.xml to sphinx docs - install https://github.com/jdillard/sphinx-sitemap with pip - create sitemap.xml that is correct for the RELEASE docs (it is incorrect for the development docs but we do not want to index the devdocs anyway... but we could change it so that by default it is correct for devdocs and then we fix sitemap.xml when we manually add the release docs with the maintainer/deploy_master_docs.sh script) - see https://github.com/MDAnalysis/MDAnalysis.github.io/issues/78 --- .travis.yml | 2 +- package/doc/sphinx/source/conf.py | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1c218dfa44f..aa447c96516 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,7 +31,7 @@ env: - CONDA_DEPENDENCIES="${CONDA_MIN_DEPENDENCIES} seaborn>=0.7.0 clustalw=2.1 netcdf4 scikit-learn coveralls" - CONDA_CHANNELS='biobuilds conda-forge' - CONDA_CHANNEL_PRIORITY=True - - PIP_DEPENDENCIES="duecredit" + - PIP_DEPENDENCIES="duecredit sphinx-sitemap" - NUMPY_VERSION=stable - INSTALL_HOLE="true" diff --git a/package/doc/sphinx/source/conf.py b/package/doc/sphinx/source/conf.py index d1654716028..58500a79ca2 100644 --- a/package/doc/sphinx/source/conf.py +++ b/package/doc/sphinx/source/conf.py @@ -36,10 +36,17 @@ extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinx.ext.mathjax', 'sphinx.ext.viewcode', 'sphinx.ext.napoleon', 'sphinx.ext.todo', + 'sphinx_sitemap', 'alabaster'] mathjax_path = 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML' +# for sitemap with https://github.com/jdillard/sphinx-sitemap +# NOTE: This sitemap is only correct for the release doccs. The development docs +# are served from https://www.mdanalysis.org/mdanalysis/ and the sitemap.xml +# will NOT be correct for the development docs. +site_url = "https://www.mdanalysis.org/docs/" + # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates']