summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/_static/css/ribbon.css2
-rw-r--r--docs/conf.py48
-rw-r--r--docs/requirements-docs.txt5
-rw-r--r--docs/spelling_words.txt10
-rw-r--r--docs/tox.ini56
5 files changed, 88 insertions, 33 deletions
diff --git a/docs/_static/css/ribbon.css b/docs/_static/css/ribbon.css
index 6008cb1a..afb9480d 100644
--- a/docs/_static/css/ribbon.css
+++ b/docs/_static/css/ribbon.css
@@ -59,5 +59,5 @@
/* fix width of the screen */
.wy-nav-content {
- max-width: none;
+ max-width: 800px;
}
diff --git a/docs/conf.py b/docs/conf.py
index 723fb21f..acf3927e 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -1,5 +1,5 @@
# ============LICENSE_START=======================================================
-# Copyright (C) 2021 Nordix Foundation
+# Copyright (C) 2022 Nordix Foundation
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -18,13 +18,44 @@
from docutils.parsers.rst import directives
-from docs_conf.conf import *
-#change 'latest' to relevant branch-name once branch has been created
+project = "onap"
+release = "master"
+version = "master"
+
+author = "Open Network Automation Platform"
+# yamllint disable-line rule:line-length
+copyright = "ONAP. Licensed under Creative Commons Attribution 4.0 International License"
+
+pygments_style = "sphinx"
+html_theme = "sphinx_rtd_theme"
+html_theme_options = {
+ "style_nav_header_background": "white",
+ "sticky_navigation": "False" }
+html_logo = "_static/logo_onap_2017.png"
+html_favicon = "_static/favicon.ico"
+html_static_path = ["_static"]
+html_show_sphinx = False
+
+extensions = [
+ 'sphinx.ext.intersphinx','sphinxcontrib.blockdiag',
+ 'sphinxcontrib.seqdiag', 'sphinxcontrib.swaggerdoc', 'sphinx.ext.graphviz']
+
+#
+# Map to 'latest' if this file is used in 'latest' (master) 'doc' branch.
+# Change to {releasename} after you have created the new 'doc' branch.
+#
+
branch = 'latest'
+
doc_url = 'https://docs.onap.org/projects'
master_doc = 'index'
+exclude_patterns = ['.tox']
+
+spelling_word_list_filename='spelling_wordlist.txt'
+spelling_lang = "en_GB"
+
intersphinx_mapping = {}
intersphinx_mapping['onap-cps'] = ('{}/onap-cps/en/%s'.format(doc_url) % branch, None)
@@ -33,16 +64,7 @@ intersphinx_mapping['onap-cps-cps-temporal'] = ('{}/onap-cps-cps-temporal/en/%s'
linkcheck_ignore = [
'http://localhost',
'https://example.com',
- 'about:config',
- # this URL is not directly reachable and must be configured in the system hosts file.
- 'https://portal.api.simpledemo.onap.org:30225/ONAPPORTAL/login.htm',
- # anchor issues
- 'https://docs.onap.org/projects/onap-integration/en/latest/docs_usecases_release.html#.*',
- 'https://docs.linuxfoundation.org/docs/communitybridge/easycla/contributors/contribute-to-a-gerrit-project#.*',
- 'https://docs.onap.org/projects/onap-integration/en/latest/docs_robot.html#docs-robot',
- 'https://docs.onap.org/projects/onap-integration/en/latest/docs_usecases_release.html#docs-usecases-release',
- 'https://docs.onap.org/projects/onap-integration/en/latest/docs_usecases.html#docs-usecases',
- 'https://docs.onap.org/projects/onap-integration/en/latest/usecases/release_non_functional_requirements.html#release-non-functional-requirements',
+ 'about:config'
]
diff --git a/docs/requirements-docs.txt b/docs/requirements-docs.txt
index 3b3441a8..ed96b42b 100644
--- a/docs/requirements-docs.txt
+++ b/docs/requirements-docs.txt
@@ -1,3 +1,6 @@
-lfdocs-conf
sphinx>=4.2.0 # BSD
sphinx-rtd-theme>=1.0.0 # MIT
+sphinxcontrib-blockdiag # BSD
+sphinxcontrib-seqdiag # BSD
+sphinxcontrib-swaggerdoc
+sphinxcontrib-spelling
diff --git a/docs/spelling_words.txt b/docs/spelling_words.txt
new file mode 100644
index 00000000..4417cc83
--- /dev/null
+++ b/docs/spelling_words.txt
@@ -0,0 +1,10 @@
+Goodger
+Mär
+docinfo
+overlined
+Docutils
+csv
+sectnum
+reST
+unicode
+defs \ No newline at end of file
diff --git a/docs/tox.ini b/docs/tox.ini
index c329a7e3..dc467068 100644
--- a/docs/tox.ini
+++ b/docs/tox.ini
@@ -1,26 +1,46 @@
+# ============LICENSE_START=======================================================
+# Copyright (C) 2021 Bell Canada
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
[tox]
minversion = 1.6
-envlist = docs,
+envlist = docs,docs-linkcheck,docs-spellcheck
skipsdist = true
-
[testenv:docs]
basepython = python3.8
-deps = -r{toxinidir}/requirements-docs.txt
- -chttps://raw.githubusercontent.com/openstack/requirements/stable/yoga/upper-constraints.txt
- -chttps://git.onap.org/doc/plain/etc/upper-constraints.onap.txt
+deps =
+ -r{toxinidir}/requirements-docs.txt
+ -chttps://raw.githubusercontent.com/openstack/requirements/stable/yoga/upper-constraints.txt
+ -chttps://git.onap.org/doc/plain/etc/upper-constraints.onap.txt?h=master
commands =
- sphinx-build -b html -n -d {envtmpdir}/doctrees ./ {toxinidir}/_build/html
- echo "Generated docs available in {toxinidir}/_build/html"
-whitelist_externals =
- echo
- git
- sh
-
+ sphinx-build -W -q -b html -n -d {envtmpdir}/doctrees {toxinidir} {toxinidir}/_build/html
[testenv:docs-linkcheck]
basepython = python3.8
-deps = -r{toxinidir}/requirements-docs.txt
- -chttps://raw.githubusercontent.com/openstack/requirements/stable/yoga/upper-constraints.txt
- -chttps://git.onap.org/doc/plain/etc/upper-constraints.onap.txt
-commands = echo "Link Checking not enforced"
-#commands = sphinx-build -b linkcheck -d {envtmpdir}/doctrees ./ {toxinidir}/_build/linkcheck
-whitelist_externals = echo
+deps =
+ -r{toxinidir}/requirements-docs.txt
+ -chttps://raw.githubusercontent.com/openstack/requirements/stable/yoga/upper-constraints.txt
+ -chttps://git.onap.org/doc/plain/etc/upper-constraints.onap.txt?h=master
+commands =
+ sphinx-build -W -q -b linkcheck -d {envtmpdir}/doctrees {toxinidir} {toxinidir}/_build/linkcheck
+[testenv:docs-spellcheck]
+basepython = python3.8
+deps =
+ -r{toxinidir}/requirements-docs.txt
+ -chttps://raw.githubusercontent.com/openstack/requirements/stable/yoga/upper-constraints.txt
+ -chttps://git.onap.org/doc/plain/etc/upper-constraints.onap.txt?h=master
+commands =
+ sphinx-build -W -q -b spelling -Dextensions=sphinxcontrib.spelling -d {envtmpdir}/doctrees {toxinidir} {toxinidir}/_build/spellcheck