Update Sphinx

Fix font licensing

Add spelling dict tests

Remove sphinx docs which were duplicated everywhere, refer to ONF main
docs site which is more complete

Add code of conduct and link

Change-Id: I35764345f09a4dcb082a73d4a1c0c04ce889c4a3
diff --git a/.reuse/dep5 b/.reuse/dep5
new file mode 100644
index 0000000..30a9fbd
--- /dev/null
+++ b/.reuse/dep5
@@ -0,0 +1,9 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+
+Files: VERSION .gitreview .gitignore *.rst *.png *.svg dict.txt
+Copyright: 2021 Open Networking Foundation
+License: Apache-2.0
+
+Files: _static/fonts/Inconsolata*.ttf
+Copyright: 2006 Raph Levien
+License: OFL-1.1
diff --git a/LICENSES/OFL-1.1.txt b/LICENSES/OFL-1.1.txt
new file mode 100644
index 0000000..6fe84ee
--- /dev/null
+++ b/LICENSES/OFL-1.1.txt
@@ -0,0 +1,43 @@
+SIL OPEN FONT LICENSE
+
+Version 1.1 - 26 February 2007
+
+PREAMBLE
+
+The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+
+"Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting, or substituting — in part or in whole — any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment.
+
+"Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission.
+
+5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software.
+
+TERMINATION
+
+This license becomes null and void if any of the above conditions are not met.
+
+DISCLAIMER
+
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/Makefile b/Makefile
index 2b41867..d94af44 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,8 @@
 # Makefile for Sphinx documentation
 
+# SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org>
+# SPDX-License-Identifier: Apache-2.0
+
 # use bash for pushd/popd, and to fail quickly
 SHELL = bash -e -o pipefail
 
@@ -9,57 +12,61 @@
 SOURCEDIR    ?= .
 BUILDDIR     ?= _build
 
-# name of python virtualenv that is used to run commands
-VENV_NAME      := venv-docs
-
-.PHONY: help test lint doc8 reload Makefile prep
-
-# Put it first so that "make" without argument is like "make help".
-help: $(VENV_NAME)
-	source $</bin/activate ; set -u ;\
-  $(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
-
 # Create the virtualenv with all the tools installed
+VENV_NAME     := venv-docs
+
+# Put it first so that "make" without argument runs "make help".
+help: $(VENV_NAME)
+	source ./$(VENV_NAME)/bin/activate ; set -u ;\
+	$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
+
+.PHONY: help Makefile test doc8 dict-check sort-dict license clean clean-all
+
 $(VENV_NAME):
-	python3 -m venv $(VENV_NAME) ;\
-  source $@/bin/activate ;\
-  pip install -r requirements.txt
+	python3 -m venv $@ ;\
+	source ./$@/bin/activate ;\
+	pip install -r requirements.txt
 
-# automatically reload changes in browser as they're made
-reload: $(VENV_NAME)
-	source $</bin/activate ; set -u ;\
-  sphinx-reload $(SOURCEDIR)
+# test - check that local build will lint, spelling is correct, then
+# build the html site.
+test: license doc8 dict-check spelling linkcheck
 
-# lint and link verification. linkcheck is part of sphinx
-test: lint spelling linkcheck
+# lint all .rst files
+doc8: $(VENV_NAME)
+	source ./$</bin/activate ; set -u;\
+	doc8 --ignore-path $< --ignore-path _build --ignore-path LICENSES --max-line-length 119
 
-lint: doc8
+# Words in dict.txt must be in the correct alphabetical order and must not duplicated.
+dict-check: sort-dict
+	@set -u ;\
+	git diff --exit-code dict.txt && echo "dict.txt is sorted" && exit 0 || \
+	echo "dict.txt is unsorted or needs to be added to git index" ; exit 1
 
-doc8: $(VENV_NAME) | $(OTHER_REPO_DOCS)
-	source $</bin/activate ; set -u ;\
-  doc8 --max-line-length 119 \
-  $$(find . -name \*.rst ! -path "*venv*" ! -path "*vendor*" ! -path "*repos*" )
+sort-dict:
+	@sort -u < dict.txt > dict_sorted.txt
+	@mv dict_sorted.txt dict.txt
 
-license: $(VENV_NAME)
-	source $</bin/activate ; set -u ;\
+license: $(VENV_NAME) ## Check license with the reuse tool
+	source ./$</bin/activate ; set -u ;\
   reuse --version ;\
   reuse --root . lint
 
 # clean up
 clean:
-	rm -rf $(BUILDDIR)
+	rm -rf "$(BUILDDIR)"
 
+# clean-all - delete the virtualenv too
 clean-all: clean
-	rm -rf $(VENV_NAME)
+	rm -rf "$(VENV_NAME)"
 
 # build multiple versions
-multiversion: $(VENV_NAME) Makefile | prep $(OTHER_REPO_DOCS)
+multiversion: $(VENV_NAME) Makefile
 	source $</bin/activate ; set -u ;\
   sphinx-multiversion "$(SOURCEDIR)" "$(BUILDDIR)/multiversion" $(SPHINXOPTS)
 	cp "$(SOURCEDIR)/_templates/meta_refresh.html" "$(BUILDDIR)/multiversion/index.html"
 
 # Catch-all target: route all unknown targets to Sphinx using the new
 # "make mode" option.  $(O) is meant as a shortcut for $(SPHINXOPTS).
-%: $(VENV_NAME) Makefile | $(OTHER_REPO_DOCS) $(STATIC_DOCS)
-	source $</bin/activate ; set -u ;\
-  $(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
+%: $(VENV_NAME) Makefile
+	source ./$</bin/activate ; set -u;\
+	$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
diff --git a/README b/README
new file mode 100644
index 0000000..6ae1c25
--- /dev/null
+++ b/README
@@ -0,0 +1,21 @@
+.. SPDX-FileCopyrightText: 2021 Open Networking Foundation <info@opennetworking.org>
+   SPDX-License-Identifier: Apache-2.0
+
+Aether Docs
+===========
+
+This site contains Sphinx format documentation for the Aether project.
+Please see the `Sphinx section of ONF Docs
+<https://docs.opennetworking.org/docs/sphinx.html>`_ for instructions on how to
+contribute to this documentation.
+
+Code of Conduct
+---------------
+
+We expect all ONF employees, member companies, and participants to abide by our
+`Code of Conduct <https://docs.opennetworking.org/policies/conduct.html>`_
+
+If you are being harassed, notice that someone else is being harassed, or have
+any other concerns involving someone’s welfare, please notify a member of the
+ONF team or email conduct@opennetworking.org.
+
diff --git a/_static/css/rtd_theme_mods.css b/_static/css/rtd_theme_mods.css
index e449bde..e161fbe 100644
--- a/_static/css/rtd_theme_mods.css
+++ b/_static/css/rtd_theme_mods.css
@@ -1,17 +1,7 @@
 /*
- * Copyright 2019-present Open Networking 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-FileCopyrightText: 2021 Open Networking Foundation <info@opennetworking.org>
+ * SPDX-License-Identifier: Apache-2.0
+ */
 
 /* Don't restrict content width on the RTD theme
  * from: https://stackoverflow.com/a/32898444 */
diff --git a/conf.py b/conf.py
index 643eef1..b4e403c 100644
--- a/conf.py
+++ b/conf.py
@@ -1,4 +1,8 @@
 # -*- coding: utf-8 -*-
+
+# SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org>
+# SPDX-License-Identifier: Apache-2.0
+
 #
 # Configuration file for the Sphinx documentation builder.
 #
@@ -71,6 +75,10 @@
 # inlcude only the branches matching master and aether-*
 smv_branch_whitelist = r'^(master|aether-.*)$'
 
+# Don't include any tags - smv docs say you can put None here, but that is broken
+# https://github.com/Holzhaus/sphinx-multiversion/issues/47
+smv_tag_whitelist = r'notags'
+
 # include all remote branches
 smv_remote_whitelist = r'^.*$'
 
@@ -100,10 +108,11 @@
         '*/LICENSE.md',
         '*/vendor',
         '.DS_Store',
+        'README',
         'Thumbs.db',
         '_build',
-        'venv-docs',
         'requirements.txt',
+        'venv-docs',
 ]
 
 # The name of the Pygments (syntax highlighting) style to use.
@@ -261,6 +270,9 @@
     'ansible': ('https://docs.ansible.com/ansible/latest', None),
     'sphinx': ('https://www.sphinx-doc.org/en/master', None),
     'trellis': ('https://docs.trellisfabric.org/master', None),
+    'sdcore': ('https://docs.sd-core.opennetworking.org/master', None),
+    'sdran': ('https://docs.sd-ran.org/master', None),
+    'sdfabric': ('https://docs.sd-fabric.org/master', None),
     'sysapproach5g': ('https://5g.systemsapproach.org/', None),
     'sysapproachnet': ('https://book.systemsapproach.org/', None),
     'sysapproachsdn': ('https://sdn.systemsapproach.org/', None),
diff --git a/index.rst b/index.rst
index e0b6073..0484538 100644
--- a/index.rst
+++ b/index.rst
@@ -114,11 +114,3 @@
 
    release/1*
    release/process.rst
-
-.. toctree::
-   :maxdepth: 1
-   :caption: Meta
-   :hidden:
-   :glob:
-
-   readme
diff --git a/readme.rst b/readme.rst
deleted file mode 100644
index 6b25028..0000000
--- a/readme.rst
+++ /dev/null
@@ -1,80 +0,0 @@
-Documentation Guide
-===================
-
-Writing Documentation
----------------------
-
-Docs are generated using :doc:`Sphinx <sphinx:usage/index>`.
-
-Documentation is written in :doc:`reStructuredText
-<sphinx:usage/restructuredtext/basics>` - see this link for the basic format.
-
-In reStructuredText documents, to create the section hierarchy (mapped in HTML
-to ``<h1>`` through ``<h5>``) use these characters to underline headings in the
-order given: ``=``, ``-`` ``"``, ``'``, ``^``.
-
-Referencing other Documentation
--------------------------------
-
-Other Sphinx-built documentation, both ONF and non-ONF can be linked to using
-:doc:`Intersphinx <sphinx:usage/extensions/intersphinx>`.
-
-You can see all link targets available on a remote Sphinx's docs by running::
-
-  python -msphinx.ext.intersphinx http://otherdocs/objects.inv
-
-Building the Docs
-------------------
-
-The documentation build process is stored in the ``Makefile``. Building docs
-requires Python to be installed, and most steps will create a virtualenv
-(``venv_docs``) which contains the required tools.  You may also need to
-install the ``enchant`` C library using your system's package manager for the
-spelling checker to function properly.
-
-Run ``make html`` to generate html documentation in ``_build/html``.
-
-To check the formatting of documentation, run ``make lint``. This will be done
-in Jenkins to validate the documentation, so please do this before you create a
-patchset.
-
-To check spelling, run ``make spelling``. If there are additional words that
-are correctly spelled but not in the dictionary (acronyms, trademarks, etc.)
-please add them to the ``dict.txt`` file.
-
-Creating new Versions of Docs
------------------------------
-
-To change the version shown on the built site, change the contents of the
-``VERSION`` file.
-
-There is a ``make multiversion`` target which will build all versions published
-on the remote to ``_build``. This will use a fork of `sphinx-multiversion
-<https://github.com/Holzhaus/sphinx-multiversion>`_ to build multiple versions
-for the site.
-
-Adding Images and Diagrams
---------------------------
-
-There are multiple ways to add images and diagrams to the documentation.
-Generally, you should prefer using `SVG
-<https://en.wikipedia.org/wiki/Scalable_Vector_Graphics>`_ images, as these can
-be scaled to any size without quality loss.
-
-If you're creating diagrams, there are multiple tools available.
-:doc:`Graphviz <sphinx:usage/extensions/graphviz>` can render inline text-based
-graphs definitions and diagrams within the documentation, and is best for
-simple diagrams.
-
-More complex diagrams can be created in `Diagrams.net/Draw.io
-<https://www.diagrams.net/>`_ format. When saving these diagrams, use the
-SVG format, and check the "Include a copy of my diagram". This will let
-someone open the SVG later directly from the documentation and edit it, without
-any loss in functionality or quality.
-
-The last resort is to use raster images. If they're drawings or screen
-captures, use the `PNG
-<https://en.wikipedia.org/wiki/Portable_Network_Graphics>`_ format.  Consider
-compressing them with a tool like `OptiPNG <http://optipng.sourceforge.net/>`_,
-or `pngquant <https://pngquant.org/>`_.  If it's a photograph, use `JPEG
-<https://en.wikipedia.org/wiki/JPEG>`_.
diff --git a/release/1.6.rst b/release/1.6.rst
index b549752..519785a 100644
--- a/release/1.6.rst
+++ b/release/1.6.rst
@@ -201,11 +201,11 @@
 
 * aether-roc-umbrella: 1.4.64
 
-`SD-Core 1.0 <https://docs.sd-core.opennetworking.org/master/release/1.0.html>`_
+:doc:`SD-Core 1.0 <sdcore:release/1.0>`
 
 * sdcore-helm-chart: 0.9.17
 
-`SD-Fabric 1.0.1 <https://docs.sd-fabric.org/1.0.1/release/1.0.1.html>`_
+:doc:`SD-Fabric 1.0.1 <sdfabric:release/1.0.1>`
 
 * sdfabric: 1.0.10
 
diff --git a/requirements.txt b/requirements.txt
index e81d18d..09c76d6 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,7 +1,10 @@
-Sphinx~=4.1.2
-doc8~=0.9.0
-reuse~=0.13.0
-docutils==0.16
-sphinx-rtd-theme~=0.5.2
-sphinxcontrib-spelling~=7.2.1
+# SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org>
+# SPDX-License-Identifier: Apache-2.0
+
+Sphinx~=4.4.0
+doc8~=0.10.1
+docutils~=0.17.1
+reuse~=0.14.0
+sphinx-rtd-theme~=1.0.0
+sphinxcontrib-spelling~=7.3.2
 sphinx-multiversion~=0.2.4