mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Omit NAME section if blank description
Also, update man page for configuration to document that if a blank description is entered, the "NAME" section is an empty string. Signed-off-by: Harumi Kuno <harumi.kuno@hpe.com>
This commit is contained in:
@@ -2331,6 +2331,8 @@ These options influence manual page output.
|
||||
|
||||
*description*
|
||||
Description of the manual page. This is used in the NAME section.
|
||||
Can be an empty string if you do not want to automatically generate
|
||||
the NAME section.
|
||||
|
||||
*authors*
|
||||
A list of strings with authors, or a single string. Can be an empty
|
||||
|
||||
@@ -112,10 +112,10 @@ class ManualPageTranslator(SphinxTranslator, BaseTranslator):
|
||||
# overwritten -- added quotes around all .TH arguments
|
||||
def header(self) -> str:
|
||||
tmpl = (".TH \"%(title_upper)s\" \"%(manual_section)s\""
|
||||
" \"%(date)s\" \"%(version)s\" \"%(manual_group)s\"\n"
|
||||
".SH NAME\n")
|
||||
" \"%(date)s\" \"%(version)s\" \"%(manual_group)s\"\n")
|
||||
if self._docinfo['subtitle']:
|
||||
tmpl += "%(title)s \\- %(subtitle)s\n"
|
||||
tmpl += (".SH NAME\n"
|
||||
"%(title)s \\- %(subtitle)s\n")
|
||||
return tmpl % self._docinfo
|
||||
|
||||
def visit_start_of_file(self, node: Element) -> None:
|
||||
|
||||
Reference in New Issue
Block a user