Skip to content

Commit

Permalink
Merge pull request #927 from ChristianMayer/enhance_docu_canonical
Browse files Browse the repository at this point in the history
Add canonical_url to documentation
  • Loading branch information
peuter committed Apr 20, 2019
2 parents 9ff8a68 + 1d645f7 commit 633db50
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
10 changes: 9 additions & 1 deletion doc/manual/de/conf.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
import json
import sys, os
import sys, os, re
from datetime import date

root_dir = os.path.abspath(os.path.join('..', '..', '..'))
Expand Down Expand Up @@ -54,9 +54,17 @@
releaselevel = 'dev' if version[-4:] == '-dev' else 'release'
release = ''

versionpath = version
match = re.match("([0-9]+.[0-9]+).[0-9]+.*", version)
if match:
versionpath = match.group(1)

# -- Options for HTML output ---------------------------------------------------

html_theme = 'sphinx_rtd_theme'
html_theme_options = {
'canonical_url': ('https://www.cometvisu.org/CometVisu/%s/%s/manual/' % (language, versionpath) )
}
html_theme_path = [os.path.join(root_dir, 'utils', 'docutils', 'template', 'sphinx_rtd_theme-0.2.4')]
html_title = "CometVisu"
#html_short_title = None
Expand Down
11 changes: 9 additions & 2 deletions doc/manual/en/conf.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# -*- coding: utf-8 -*-
import json
from datetime import date
import sys, os
import sys, os, re
from datetime import date

root_dir = os.path.abspath(os.path.join('..', '..', '..'))
Expand Down Expand Up @@ -48,9 +47,17 @@
releaselevel = 'dev' if version[-4:] == '-dev' else 'release'
release = ''

versionpath = version
match = re.match("([0-9]+.[0-9]+).[0-9]+.*", version)
if match:
versionpath = match.group(1)

# -- Options for HTML output ---------------------------------------------------

html_theme = 'sphinx_rtd_theme'
html_theme_options = {
'canonical_url': ('https://www.cometvisu.org/CometVisu/%s/%s/manual/' % (language, versionpath) )
}
html_theme_path = [os.path.join(root_dir, 'utils', 'docutils', 'template', 'sphinx_rtd_theme-0.2.4')]
html_title = "CometVisu"
#html_short_title = None
Expand Down

0 comments on commit 633db50

Please sign in to comment.