mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Allow giving no authors.
This commit is contained in:
parent
51e8de3446
commit
5c92da1c12
@ -935,7 +935,9 @@ These options influence manual page output.
|
||||
well as the name of the manual page (in the NAME section).
|
||||
* *description*: description of the manual page. This is used in the NAME
|
||||
section.
|
||||
* *authors*: A list of strings with authors, or a single string.
|
||||
* *authors*: A list of strings with authors, or a single string. Can be
|
||||
an empty string or list if you do not want to automatically generate
|
||||
an AUTHORS section in the manual page.
|
||||
* *section*: The manual page section. Used for the output file name as well
|
||||
as in the manual page header.
|
||||
|
||||
|
@ -58,7 +58,10 @@ class ManualPageBuilder(Builder):
|
||||
for info in self.config.man_pages:
|
||||
docname, name, description, authors, section = info
|
||||
if isinstance(authors, basestring):
|
||||
if authors:
|
||||
authors = [authors]
|
||||
else:
|
||||
authors = []
|
||||
|
||||
targetname = '%s.%s' % (name, section)
|
||||
self.info(darkgreen(targetname) + ' { ', nonl=True)
|
||||
|
@ -53,6 +53,8 @@ class ManualPageTranslator(BaseTranslator):
|
||||
# docinfo set by man_pages config value
|
||||
self._docinfo['title'] = self.document.settings.title
|
||||
self._docinfo['subtitle'] = self.document.settings.subtitle
|
||||
if self.document.settings.authors:
|
||||
# don't set it if no author given
|
||||
self._docinfo['author'] = self.document.settings.authors
|
||||
self._docinfo['manual_section'] = self.document.settings.section
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user