diff options
author | JosephKeenan <joseph.keenan@est.tech> | 2022-09-01 11:39:47 +0100 |
---|---|---|
committer | JosephKeenan <joseph.keenan@est.tech> | 2022-09-01 15:38:18 +0100 |
commit | e68aec1e344011d894e4f3df698f42c774dad7d6 (patch) | |
tree | 67de4efb5625e58e5dae317f9ff0e00897d63df3 | |
parent | c1915b5af27e4ee3ff89fd881e753e029a0bf5da (diff) |
Adding config for RTD
-added config to files related to https://gerrit.onap.org/r/c/cps/+/130246/29
Issue-ID: CPS-1237
Signed-off-by: JosephKeenan <joseph.keenan@est.tech>
Change-Id: Ia2fe7d2ecf3bb33608139c5fbf1328dc211f5629
-rw-r--r-- | docs/_static/css/ribbon.css | 119 | ||||
-rwxr-xr-x | docs/conf.py | 47 | ||||
-rw-r--r-- | docs/requirements-docs.txt | 5 | ||||
-rw-r--r-- | docs/spelling_words.txt | 10 | ||||
-rw-r--r-- | docs/tox.ini | 56 |
5 files changed, 146 insertions, 91 deletions
diff --git a/docs/_static/css/ribbon.css b/docs/_static/css/ribbon.css index 6008cb1a08..1bf78983aa 100644 --- a/docs/_static/css/ribbon.css +++ b/docs/_static/css/ribbon.css @@ -1,63 +1,64 @@ + .ribbon { - z-index: 1000; - background-color: #a00; - overflow: hidden; - white-space: nowrap; - position: fixed; - top: 25px; - right: -50px; - -webkit-transform: rotate(45deg); - -moz-transform: rotate(45deg); - -ms-transform: rotate(45deg); - -o-transform: rotate(45deg); - transform: rotate(45deg); - -webkit-box-shadow: 0 0 10px #888; - -moz-box-shadow: 0 0 10px #888; - box-shadow: 0 0 10px #888; - -} - -.ribbon a { - border: 1px solid #faa; - color: #fff; - display: block; - font: bold 81.25% 'Helvetica Neue', Helvetica, Arial, sans-serif; - margin: 1px 0; - padding: 10px 50px; - text-align: center; - text-decoration: none; - text-shadow: 0 0 5px #444; - transition: 0.5s; -} - -.ribbon a:hover { - background: #c11; - color: #fff; -} - - -/* override table width restrictions */ -@media screen and (min-width: 767px) { - - .wy-table-responsive table td, .wy-table-responsive table th { - /* !important prevents the common CSS stylesheets from overriding - this as on RTD they are loaded after this stylesheet */ - white-space: normal !important; - } - - .wy-table-responsive { - overflow: visible !important; - } -} - -@media screen and (max-width: 767px) { - .wy-table-responsive table td { - white-space: nowrap; + z-index: 1000; + background-color: #a00; + overflow: hidden; + white-space: nowrap; + position: fixed; + top: 25px; + right: -50px; + -webkit-transform: rotate(45deg); + -moz-transform: rotate(45deg); + -ms-transform: rotate(45deg); + -o-transform: rotate(45deg); + transform: rotate(45deg); + -webkit-box-shadow: 0 0 10px #888; + -moz-box-shadow: 0 0 10px #888; + box-shadow: 0 0 10px #888; + + } + + .ribbon a { + border: 1px solid #faa; + color: #fff; + display: block; + font: bold 81.25% 'Helvetica Neue', Helvetica, Arial, sans-serif; + margin: 1px 0; + padding: 10px 50px; + text-align: center; + text-decoration: none; + text-shadow: 0 0 5px #444; + transition: 0.5s; + } + + .ribbon a:hover { + background: #c11; + color: #fff; + } + + + /* override table width restrictions */ + @media screen and (min-width: 767px) { + + .wy-table-responsive table td, .wy-table-responsive table th { + /* !important prevents the common CSS stylesheets from overriding + this as on RTD they are loaded after this stylesheet */ + white-space: normal !important; } -} -/* fix width of the screen */ + .wy-table-responsive { + overflow: visible !important; + } + } + + @media screen and (max-width: 767px) { + .wy-table-responsive table td { + white-space: nowrap; + } + } + + /* fix width of the screen */ -.wy-nav-content { - max-width: none; -} + .wy-nav-content { + max-width: 800px; + } diff --git a/docs/conf.py b/docs/conf.py index 84dac1ea21..5185b61cd3 100755 --- a/docs/conf.py +++ b/docs/conf.py @@ -16,15 +16,45 @@ # SPDX-License-Identifier: Apache-2.0 # ============LICENSE_END========================================================= - 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-ncmp-dmi-plugin'] = ('{}/onap-cps-ncmp-dmi-plugin/en/%s'.format(doc_url) % branch, None) @@ -33,16 +63,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 3b3441a807..ed96b42b7f 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 0000000000..4417cc833c --- /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 c329a7e354..ab2de1b8c3 100644 --- a/docs/tox.ini +++ b/docs/tox.ini @@ -1,26 +1,46 @@ +# ============LICENSE_START======================================================= +# 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. +# 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 -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 -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 -b spelling -Dextensions=sphinxcontrib.spelling -d {envtmpdir}/doctrees {toxinidir} {toxinidir}/_build/spellcheck |