docs: simplify conf.py and fix compatibility with upcoming Sphinx 6.0

Change-Id: Ia69db4e8d6bef7f779bd3556be6afe534df8ad31
diff --git a/docs/INSTALL.rst b/docs/INSTALL.rst
index 3172c21..f96bf6a 100644
--- a/docs/INSTALL.rst
+++ b/docs/INSTALL.rst
@@ -12,7 +12,7 @@
 
 - doxygen
 - graphviz
-- sphinx >= 1.3
+- sphinx >= 4.0
 - sphinxcontrib-doxylink
 
 Build
diff --git a/docs/_static/.gitignore b/docs/_static/.gitignore
deleted file mode 100644
index e69de29..0000000
--- a/docs/_static/.gitignore
+++ /dev/null
diff --git a/docs/_static/nfd-status.xsd b/docs/_static/nfd-status.xsd
deleted file mode 100644
index 844b4f9..0000000
--- a/docs/_static/nfd-status.xsd
+++ /dev/null
@@ -1,169 +0,0 @@
-<?xml version="1.0"?>
-
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
-targetNamespace="ndn:/localhost/nfd/status/1" xmlns:nfd="ndn:/localhost/nfd/status/1"
-elementFormDefault="qualified">
-
-<xs:complexType name="unidirectionalPacketCountersType">
-  <xs:sequence>
-    <xs:element type="xs:nonNegativeInteger" name="nInterests"/>
-    <xs:element type="xs:nonNegativeInteger" name="nDatas"/>
-  </xs:sequence>
-</xs:complexType>
-
-<xs:complexType name="bidirectionalPacketCountersType">
-  <xs:sequence>
-    <xs:element type="nfd:unidirectionalPacketCountersType" name="incomingPackets"/>
-    <xs:element type="nfd:unidirectionalPacketCountersType" name="outgoingPackets"/>
-  </xs:sequence>
-</xs:complexType>
-
-<xs:complexType name="bidirectionalByteCountersType">
-  <xs:sequence>
-    <xs:element type="xs:nonNegativeInteger" name="incomingBytes"/>
-    <xs:element type="xs:nonNegativeInteger" name="outgoingBytes"/>
-  </xs:sequence>
-</xs:complexType>
-
-<xs:complexType name="generalStatusType">
-  <xs:sequence>
-    <xs:element type="xs:anyURI" name="nfdId"/>
-    <xs:element type="xs:string" name="version"/>
-    <xs:element type="xs:dateTime" name="startTime"/>
-    <xs:element type="xs:dateTime" name="currentTime"/>
-    <xs:element type="xs:duration" name="uptime"/>
-    <xs:element type="xs:nonNegativeInteger" name="nNameTreeEntries"/>
-    <xs:element type="xs:nonNegativeInteger" name="nFibEntries"/>
-    <xs:element type="xs:nonNegativeInteger" name="nPitEntries"/>
-    <xs:element type="xs:nonNegativeInteger" name="nMeasurementsEntries"/>
-    <xs:element type="xs:nonNegativeInteger" name="nCsEntries"/>
-    <xs:element type="nfd:bidirectionalPacketCountersType" name="packetCounters"/>
-  </xs:sequence>
-</xs:complexType>
-
-<xs:complexType name="channelType">
-  <xs:sequence>
-    <xs:element type="xs:anyURI" name="localUri"/>
-  </xs:sequence>
-</xs:complexType>
-
-<xs:complexType name="channelsType">
-  <xs:sequence>
-    <xs:element type="nfd:channelType" name="channel" maxOccurs="unbounded" minOccurs="0"/>
-  </xs:sequence>
-</xs:complexType>
-
-<xs:complexType name="faceFlagsType">
-  <xs:sequence>
-    <xs:element type="xs:string" name="local" minOccurs="0"/>
-    <xs:element type="xs:string" name="on-demand" minOccurs="0"/>
-  </xs:sequence>
-</xs:complexType>
-
-<xs:complexType name="faceType">
-  <xs:sequence>
-    <xs:element type="xs:nonNegativeInteger" name="faceId"/>
-    <xs:element type="xs:anyURI" name="remoteUri"/>
-    <xs:element type="xs:anyURI" name="localUri"/>
-    <xs:element type="xs:duration" name="expirationPeriod" minOccurs="0"/>
-    <xs:element type="nfd:bidirectionalPacketCountersType" name="packetCounters"/>
-    <xs:element type="nfd:bidirectionalByteCountersType" name="byteCounters"/>
-    <xs:element type="nfd:faceFlagsType" name="flags" minOccurs="0"/>
-  </xs:sequence>
-</xs:complexType>
-
-<xs:complexType name="facesType">
-  <xs:sequence>
-    <xs:element type="nfd:faceType" name="face" maxOccurs="unbounded" minOccurs="0"/>
-  </xs:sequence>
-</xs:complexType>
-
-<xs:complexType name="nextHopType">
-  <xs:sequence>
-    <xs:element type="xs:nonNegativeInteger" name="faceId"/>
-    <xs:element type="xs:nonNegativeInteger" name="cost"/>
-  </xs:sequence>
-</xs:complexType>
-
-<xs:complexType name="fibEntryType">
-  <xs:sequence>
-    <xs:element type="xs:anyURI" name="prefix"/>
-    <xs:element name="nextHops">
-      <xs:complexType>
-        <xs:sequence>
-          <xs:element type="nfd:nextHopType" name="nextHop" maxOccurs="unbounded"/>
-        </xs:sequence>
-      </xs:complexType>
-    </xs:element>
-  </xs:sequence>
-</xs:complexType>
-
-<xs:complexType name="fibType">
-  <xs:sequence>
-    <xs:element type="nfd:fibEntryType" name="fibEntry" maxOccurs="unbounded" minOccurs="0"/>
-  </xs:sequence>
-</xs:complexType>
-
-<xs:complexType name="routeType">
-  <xs:sequence>
-    <xs:element type="xs:nonNegativeInteger" name="faceId"/>
-    <xs:element type="xs:nonNegativeInteger" name="origin"/>
-    <xs:element type="xs:nonNegativeInteger" name="cost"/>
-    <xs:element type="xs:nonNegativeInteger" name="flags"/>
-    <xs:element type="xs:duration" name="expirationPeriod" minOccurs="0"/>
-  </xs:sequence>
-</xs:complexType>
-
-<xs:complexType name="ribEntryType">
-  <xs:sequence>
-    <xs:element type="xs:anyURI" name="prefix"/>
-    <xs:element name="routes">
-      <xs:complexType>
-        <xs:sequence>
-          <xs:element type="nfd:routeType" name="route" maxOccurs="unbounded"/>
-        </xs:sequence>
-      </xs:complexType>
-    </xs:element>
-  </xs:sequence>
-</xs:complexType>
-
-<xs:complexType name="ribType">
-  <xs:sequence>
-    <xs:element type="nfd:ribEntryType" name="ribEntry" maxOccurs="unbounded" minOccurs="0"/>
-  </xs:sequence>
-</xs:complexType>
-
-<xs:complexType name="strategyType">
-  <xs:sequence>
-    <xs:element type="xs:anyURI" name="name"/>
-  </xs:sequence>
-</xs:complexType>
-
-<xs:complexType name="strategyChoiceType">
-  <xs:sequence>
-    <xs:element type="xs:anyURI" name="namespace"/>
-    <xs:element type="nfd:strategyType" name="strategy"/>
-  </xs:sequence>
-</xs:complexType>
-
-<xs:complexType name="strategyChoicesType">
-  <xs:sequence>
-    <xs:element type="nfd:strategyChoiceType" name="strategyChoice"
-                maxOccurs="unbounded" minOccurs="0"/>
-  </xs:sequence>
-</xs:complexType>
-
-<xs:element name="nfdStatus">
-  <xs:complexType>
-    <xs:sequence>
-      <xs:element type="nfd:generalStatusType" name="generalStatus"/>
-      <xs:element type="nfd:channelsType" name="channels"/>
-      <xs:element type="nfd:facesType" name="faces"/>
-      <xs:element type="nfd:fibType" name="fib"/>
-      <xs:element type="nfd:ribType" name="rib"/>
-      <xs:element type="nfd:strategyChoicesType" name="strategyChoices"/>
-    </xs:sequence>
-  </xs:complexType>
-</xs:element>
-
-</xs:schema>
diff --git a/docs/conf.py b/docs/conf.py
index b38059e..5f1dea9 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -1,25 +1,17 @@
 # Configuration file for the Sphinx documentation builder.
 #
-# This file only contains a selection of the most common options. For a full
-# list see the documentation:
+# For the full list of built-in configuration values, see the documentation:
 # https://www.sphinx-doc.org/en/master/usage/configuration.html
 
-# -- Path setup --------------------------------------------------------------
-
-# If extensions (or modules to document with autodoc) are in another directory,
-# add these directories to sys.path here. If the directory is relative to the
-# documentation root, use os.path.abspath to make it absolute, like shown here.
-#
-# import os
+import importlib.util
 import sys
-# sys.path.insert(0, os.path.abspath('.'))
-
 
 # -- Project information -----------------------------------------------------
+# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
 
-project = u'NDNS: Domain Name Service for Named Data Networking'
-copyright = u'Copyright © 2014-2022 Named Data Networking Project.'
-author = u'Named Data Networking Project'
+project = 'NDNS: Domain Name Service for Named Data Networking'
+copyright = 'Copyright © 2014-2022 Named Data Networking Project.'
+author = 'Named Data Networking Project'
 
 # The short X.Y version.
 #version = ''
@@ -35,49 +27,31 @@
 
 
 # -- General configuration ---------------------------------------------------
+# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
 
-# If your documentation needs a minimal Sphinx version, state it here.
-#
-needs_sphinx = '1.3'
-
-# Add any Sphinx extension module names here, as strings. They can be
-# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
-# ones.
+needs_sphinx = '4.0'
 extensions = [
     'sphinx.ext.extlinks',
     'sphinx.ext.todo',
 ]
 
 def addExtensionIfExists(extension):
-    try:
-        __import__(extension)
+    if importlib.util.find_spec(extension) is not None:
         extensions.append(extension)
-    except ImportError:
-        sys.stderr.write("Extension '%s' not found. "
-                         "Some documentation may not build correctly.\n" % extension)
+    else:
+        sys.stderr.write(f'WARNING: Extension {extension!r} not found. '
+                          'Some documentation may not build correctly.\n')
 
 addExtensionIfExists('sphinxcontrib.doxylink')
 
-# The master toctree document.
-master_doc = 'index'
-
-# Add any paths that contain templates here, relative to this directory.
 templates_path = ['_templates']
-
-# List of patterns, relative to source directory, that match files and
-# directories to ignore when looking for source files.
-# This pattern also affects html_static_path and html_extra_path.
-exclude_patterns = []
+exclude_patterns = ['Thumbs.db', '.DS_Store']
 
 
 # -- Options for HTML output -------------------------------------------------
+# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
 
-# The theme to use for HTML and HTML Help pages.  See the documentation for
-# a list of builtin themes.
-#
 html_theme = 'named_data_theme'
-
-# Add any paths that contain custom themes here, relative to this directory.
 html_theme_path = ['.']
 
 # Add any paths that contain custom static files (such as style sheets) here,
@@ -92,53 +66,22 @@
 highlight_language = 'none'
 
 
-# -- Options for LaTeX output ------------------------------------------------
-
-latex_elements = {
-    # The paper size ('letterpaper' or 'a4paper').
-    #
-    # 'papersize': 'letterpaper',
-
-    # The font size ('10pt', '11pt' or '12pt').
-    #
-    # 'pointsize': '10pt',
-
-    # Additional stuff for the LaTeX preamble.
-    #
-    # 'preamble': '',
-
-    # Latex figure (float) alignment
-    #
-    # 'figure_align': 'htbp',
-}
-
-# Grouping the document tree into LaTeX files. List of tuples
-# (source start file, target name, title,
-#  author, documentclass [howto, manual, or own class]).
-latex_documents = [
-    ('index', 'ndns-docs.tex', u'NDNS: Domain Name Service for Named Data Networking',
-     author, 'manual'),
-]
-
-
 # -- Options for manual page output ------------------------------------------
+# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-manual-page-output
 
 # One entry per manual page. List of tuples
 # (source start file, name, description, authors, manual section).
 man_pages = [
-    ('manpages/ndns-daemon', 'ndns-daemon', u'Domain Name Service Daemon for Named Data Networking', None, 1),
+    ('manpages/ndns-daemon', 'ndns-daemon', 'Domain Name Service Daemon for Named Data Networking', None, 1),
 ]
 
-# If true, show URL addresses after external links.
-#man_show_urls = True
 
-
-# -- Custom options ----------------------------------------------------------
+# -- Misc options ------------------------------------------------------------
 
 doxylink = {
     'NDNS': ('NDNS.tag', 'doxygen/'),
 }
 
 extlinks = {
-    'issue': ('https://redmine.named-data.net/issues/%s', 'issue #'),
+    'issue': ('https://redmine.named-data.net/issues/%s', 'issue #%s'),
 }
diff --git a/docs/index.rst b/docs/index.rst
index 4bfa906..559b338 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -29,7 +29,7 @@
 Downloading
 -----------
 
-* `Source code git repository <https://github.com/named-data/NDNS>`_
+* `Source code git repository <https://github.com/named-data/ndns>`_
 
 License
 -------
@@ -37,4 +37,4 @@
 NDNS is an open and free software package licensed under GPL 3.0 license and is the
 centerpiece of our committement to making NDN's core technology open and free to all
 Internet users and developers. For more information about the licensing details and
-limitation, refer to `COPYING.md <https://github.com/named-data/NDNS/blob/master/COPYING.md>`_.
+limitation, refer to `COPYING.md <https://github.com/named-data/ndns/blob/master/COPYING.md>`_.
diff --git a/docs/named_data_theme/named_data_header.html b/docs/named_data_theme/named_data_header.html
index 97b2932..8d6378d 100644
--- a/docs/named_data_theme/named_data_header.html
+++ b/docs/named_data_theme/named_data_header.html
@@ -26,7 +26,7 @@
     <div class="row">
          <div class="three columns">
               <div id="logo">
-                    <a href="http://named-data.net" title="A Future Internet Architecture"><img src="http://named-data.net/wp-content/uploads/cropped-20130722_Logo2.png" alt="" /></a>
+                    <a href="https://named-data.net" title="A Future Internet Architecture"><img src="https://named-data.net/wp-content/uploads/cropped-20130722_Logo2.png" alt="" /></a>
               </div><!--logo end-->
          </div>