Update download page for Sulfur SR0
[docs.git] / docs / conf.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 # SPDX-License-Identifier: EPL-1.0
4 ##############################################################################
5 # Copyright (c) 2018 The Linux Foundation and others.
6 #
7 # All rights reserved. This program and the accompanying materials
8 # are made available under the terms of the Eclipse Public License v1.0
9 # which accompanies this distribution, and is available at
10 # http://www.eclipse.org/legal/epl-v10.html
11 ##############################################################################
12
13 from docs_conf.conf import *
14 import sys, os, csv
15
16
17 def update_intersphinx_mapping():
18     with open('../projects_list.tsv') as fd:
19         rd = csv.reader(fd, delimiter="\t", quotechar='"')
20         for row in rd:
21             if row:
22                 project = row[0]
23                 if project[0] == "#":
24                     continue
25                 version = row[1]
26                 intersphinx_mapping[project] = (f'https://docs.opendaylight.org/projects/{project}/en/{version}/', None)
27
28
29 # Append to intersphinx_mapping
30 update_intersphinx_mapping()
31
32 # OpenDaylight Documentation Releases
33 intersphinx_mapping['odl-sulfur'] = ('https://docs.opendaylight.org/en/latest/', None)
34 intersphinx_mapping['odl-phosphorus'] = ('https://docs.opendaylight.org/en/stable-phosphorus/', None)
35 intersphinx_mapping['odl-silicon'] = ('https://docs.opendaylight.org/en/stable-silicon/', None)
36 intersphinx_mapping['odl-aluminium'] = ('https://docs.opendaylight.org/en/stable-aluminium/', None)
37 intersphinx_mapping['odl-magnesium'] = ('https://docs.opendaylight.org/en/stable-magnesium/', None)
38 intersphinx_mapping['odl-sodium'] = ('https://docs.opendaylight.org/en/stable-sodium/', None)
39 intersphinx_mapping['odl-neon'] = ('https://docs.opendaylight.org/en/stable-neon/', None)
40 intersphinx_mapping['odl-fluorine'] = ('https://docs.opendaylight.org/en/stable-fluorine/', None)
41 intersphinx_mapping['odl-oxygen'] = ('https://docs.opendaylight.org/en/stable-oxygen/', None)
42 intersphinx_mapping['odl-nitrogen'] = ('https://docs.opendaylight.org/en/stable-nitrogen/', None)
43 intersphinx_mapping['odl-carbon'] = ('https://docs.opendaylight.org/en/stable-carbon/', None)
44
45 linkcheck_ignore = [
46     'http://localhost',
47     # Ignore ssh:// links from linkcheck
48     'ssh:',
49     # Ignore jenkins because it's often slow to respond.
50     'https://jenkins.opendaylight.org/releng',
51     'https://jenkins.opendaylight.org/sandbox',
52     # The '#' in the path makes sphinx think it's an anchor
53     'https://git.opendaylight.org/gerrit/#/admin/projects/releng/builder',
54     'https://git.opendaylight.org/gerrit/#/c/',
55     'https://git.opendaylight.org/gerrit/gitweb',
56     # URL returns a 403 Forbidden
57     'https://www.osgi.org',
58     # Ignore anchors on github.com because linkcheck fails on them
59     '^https?://github.com/.*#',
60     # Ignore webchat anchors because '#' is not an anchor for this app
61     'https://web.libera.chat/#',
62     # Ignore google docs anchors
63     'https://docs.google.com/presentation/d/1bnwj8CrFGo5KekONYSeIHySdkoXZiewJxkHcZjXnzkQ/edit#slide=id.g17d8ae4d92_0_137',
64     # Ignore local static contents
65     '../_static/OpenDaylight-Technical-Charter-LFN-Projects-LLC-FINAL.pdf',
66     # Ignore IETF URLs often not reachable from Jenkins minions
67     # because of hosting connectivity issues
68     '^https?://tools.ietf.org/html/.*',
69     # anchors not correctly detected by sphinx on the gate
70     'http://checkstyle.sourceforge.net/config_coding.html#.*',
71     # this url often has connectivity issues on the gate
72     'https://www.mojohaus.org/animal-sniffer/animal-sniffer-maven-plugin/examples/checking-signatures.html',
73     #Ignore announce page link till it is up
74     'https://www.opendaylight.org/current-release-sulfur',
75 ]
76 linkcheck_timeout = 300
77
78 nitpicky = True
79 release = version
80
81 spelling_warning = True
82 spelling_exclude_patterns = ['release-notes/release-notes-*', 'release-notes/projects/*']
83
84 html_context = {
85     'version_status': 'supported',
86 }
87
88 # Helper for JIRA references
89 sys.path.append(os.path.abspath('ext'))
90 extensions.append('odl-jira')
91
92 def setup(app):
93     app.add_css_file("css/ribbon.css")