Skip to content

Commit

Permalink
add extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderBand committed Jan 9, 2022
1 parent 45801a7 commit e37fe7f
Showing 1 changed file with 30 additions and 9 deletions.
39 changes: 30 additions & 9 deletions source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,37 @@
# import sys
# sys.path.insert(0, os.path.abspath('.'))

import datetime
import sphinx_rtd_theme
import versionwarning
try:
import versionwarning
versionbanner = True
except ModuleNotFoundError:
versionbanner = False

# -- Project information -----------------------------------------------------

project = 'Krill'
copyright = '2021, NLnet Labs'
author = 'NLnet Labs (CC-BY 3.0)'
year = datetime.datetime.now().year
copyright = f'2018–{year}, NLnet Labs'
author = 'NLnet Labs'

# The short X.Y version
version = ''
# The full version, including alpha/beta/rc tags
release = ''

# -- Version Warning Banner configuration ------------------------------------
versionwarning_messages = {
'latest': 'You are reading the <code class="docutils literal notranslate"><span class="pre">latest</span></code> (unstable) version of this documentation, which may describe features which are not available in the <a href="/en/stable/">stable version</a>.',
}
versionwarning_banner_title = 'Note'
versionwarning_body_selector = 'div[itemprop="articleBody"]'
if versionbanner:
versionwarning_messages = {
'latest': 'You are reading the <code class="docutils literal notranslate"><span class="pre">latest</span></code> (unstable) version of this documentation, which may describe features which are not available in the <a href="/en/stable/">stable version</a>.',
}
versionwarning_banner_title = 'Note'
versionwarning_body_selector = 'div[itemprop="articleBody"]'

# -- Sphinx Tabs configuration -----------------------------------------------

sphinx_tabs_disable_tab_closing = True

# -- General configuration ---------------------------------------------------

Expand All @@ -50,9 +61,19 @@
'sphinx.ext.todo',
'sphinx.ext.ifconfig',
'sphinx_tabs.tabs',
'versionwarning.extension',
'sphinx_copybutton',
'sphinx.ext.intersphinx',
'sphinx.ext.autosectionlabel'
]
if versionbanner:
extensions.append('versionwarning.extension')

intersphinx_mapping = {
'rtrtr': ('https://rtrtr.docs.nlnetlabs.nl/en/stable/', None),
'routinator': ('https://routinator.docs.nlnetlabs.nl/en/stable/', None)
}

autosectionlabel_prefix_document = True

# Add any paths that contain templates here, relative to this directory.
# templates_path = ['../templates']
Expand Down

0 comments on commit e37fe7f

Please sign in to comment.