From 81b1b27048082b5f4e235fbc4564389f9d49d772 Mon Sep 17 00:00:00 2001 From: Xaroth Date: Fri, 30 Nov 2018 22:41:23 +0100 Subject: [PATCH] [stable-2.5] -Change: set the 'canonical_url' theme option to enable rendering of canonical urls, promoting the 'latest' docs to search engines. (#49190) (#49213) (cherry picked from commit 59e7a9442e0fbb9c827f6c4d58ea7aebf5b04b02) Co-authored-by: Xaroth --- docs/docsite/rst/conf.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/docsite/rst/conf.py b/docs/docsite/rst/conf.py index 9d311115e3c..f19913ac6c5 100644 --- a/docs/docsite/rst/conf.py +++ b/docs/docsite/rst/conf.py @@ -127,6 +127,10 @@ html_theme_path = ['../_themes'] html_theme = 'sphinx_rtd_theme' html_short_title = 'Ansible Documentation' +html_theme_options = { + 'canonical_url': "https://docs.ansible.com/ansible/latest/", +} + # The style sheet to use for HTML and HTML Help pages. A file of that name # must exist either in Sphinx' static/ path, or in one of the custom paths # given in html_static_path.