Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Temp title branch #1132

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions doc/manual.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2015,6 +2015,9 @@ To use it in your existing Sphinx project you need to do the following:

# Name of the cover page template to use
# pdf_cover_template = 'sphinxcover.tmpl'

# Label to use as a prefix for the subtitle on the cover page
# subtitle_prefix = 'version'

# Documents to append as an appendix to all manuals.
# pdf_appendices = []
Expand Down
3 changes: 2 additions & 1 deletion rst2pdf/pdfbuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ def add_template_path(path):
# Feed data to the template, get restructured text.
cover_text = template.render(
title=self.document.settings.title or visitor.elements['title'],
subtitle='%s %s' % (_('version'), self.config.version),
subtitle='%s %s' % (self.config.subtitle_prefix, self.config.version),
authors=authors,
date=date,
)
Expand Down Expand Up @@ -991,6 +991,7 @@ def setup(app):
app.add_config_value(
'pdf_baseurl', urlunparse(['file', os.getcwd() + os.sep, '', '', '', '']), None
)
app.add_config_value('subtitle_prefix', 'version', None)

project_doc = app.config.project + ' Documentation'
app.config.pdf_documents.append(
Expand Down