doc: Reformat conf.py
This commit is contained in:
parent
c6eb3f88ea
commit
98d58b6f27
23
doc/conf.py
23
doc/conf.py
@ -19,6 +19,7 @@ import datetime
|
||||
import sphinx
|
||||
import packaging.version
|
||||
|
||||
|
||||
def get_version(root_path):
|
||||
"""
|
||||
Reads the polybar version from the version.txt at the root of the repo.
|
||||
@ -35,10 +36,11 @@ def get_version(root_path):
|
||||
|
||||
# -- Project information -----------------------------------------------------
|
||||
|
||||
|
||||
project = 'Polybar User Manual'
|
||||
copyright = '2016-{}, Michael Carlberg & contributors'.format(
|
||||
datetime.datetime.now().year
|
||||
)
|
||||
)
|
||||
author = 'Polybar Team'
|
||||
|
||||
# is whether we are on readthedocs.io
|
||||
@ -187,9 +189,18 @@ latex_documents = [
|
||||
# One entry per manual page. List of tuples
|
||||
# (source start file, name, description, authors, manual section).
|
||||
man_pages = [
|
||||
('man/polybar.1', 'polybar', 'A fast and easy-to-use tool status bar', [], 1),
|
||||
('man/polybar-msg.1', 'polybar-msg', 'Send IPC messages to polybar', [], 1),
|
||||
('man/polybar.5', 'polybar', 'configuration file for polybar(1)', [], 5)
|
||||
(
|
||||
'man/polybar.1', 'polybar',
|
||||
'A fast and easy-to-use tool status bar', [], 1
|
||||
),
|
||||
(
|
||||
'man/polybar-msg.1', 'polybar-msg',
|
||||
'Send IPC messages to polybar', [], 1
|
||||
),
|
||||
(
|
||||
'man/polybar.5', 'polybar',
|
||||
'configuration file for polybar(1)', [], 5
|
||||
)
|
||||
]
|
||||
|
||||
man_make_section_directory = False
|
||||
@ -250,8 +261,10 @@ if packaging.version.parse(sphinx.__version__) >= packaging.version.parse("1.8.5
|
||||
class VersionDirective(VersionChange):
|
||||
"""
|
||||
Overwrites the Sphinx directive for versionchanged, versionadded, and
|
||||
deprecated and adds an unreleased tag to versions that are not yet released
|
||||
deprecated and adds an unreleased tag to versions that are not yet
|
||||
released
|
||||
"""
|
||||
|
||||
def run(self) -> List[Node]:
|
||||
directive_version = packaging.version.parse(self.arguments[0])
|
||||
parsed_version_txt = packaging.version.parse(version_txt)
|
||||
|
Loading…
Reference in New Issue
Block a user