config: epub_authr and epub_publisher refers author by default

This commit is contained in:
Takeshi KOMIYA 2018-01-29 23:29:26 +09:00
parent 23741ca693
commit 41769f1e30
3 changed files with 9 additions and 6 deletions

View File

@ -10,6 +10,9 @@ Incompatible changes
* #4460: extensions which stores any data to environment should return the * #4460: extensions which stores any data to environment should return the
version of its env data structure as metadata. In detail, please see version of its env data structure as metadata. In detail, please see
:ref:`ext-metadata`. :ref:`ext-metadata`.
* The default value of :confval:`epub_author` and :confval:`epub_publisher` are
changed from ``'unknown'`` to the value of :confval:`author`. This is same as
a ``conf.py`` file sphinx-build generates.
Deprecated Deprecated
---------- ----------

View File

@ -1414,8 +1414,8 @@ the `Dublin Core metadata <http://dublincore.org/>`_.
.. confval:: epub_author .. confval:: epub_author
The author of the document. This is put in the Dublin Core metadata. The The author of the document. This is put in the Dublin Core metadata. It
default value is ``'unknown'``. defaults to the :confval:`author` option.
.. confval:: epub_contributor .. confval:: epub_contributor
@ -1436,8 +1436,8 @@ the `Dublin Core metadata <http://dublincore.org/>`_.
.. confval:: epub_publisher .. confval:: epub_publisher
The publisher of the document. This is put in the Dublin Core metadata. You The publisher of the document. This is put in the Dublin Core metadata. You
may use any sensible string, e.g. the project homepage. The default value is may use any sensible string, e.g. the project homepage. The defaults to the
``'unknown'``. :confval:`author` option.
.. confval:: epub_copyright .. confval:: epub_copyright

View File

@ -231,9 +231,9 @@ def setup(app):
app.add_config_value('epub_theme', 'epub', 'html') app.add_config_value('epub_theme', 'epub', 'html')
app.add_config_value('epub_theme_options', {}, 'html') app.add_config_value('epub_theme_options', {}, 'html')
app.add_config_value('epub_title', lambda self: self.html_title, 'html') app.add_config_value('epub_title', lambda self: self.html_title, 'html')
app.add_config_value('epub_author', 'unknown', 'html') app.add_config_value('epub_author', lambda self: self.author, 'html')
app.add_config_value('epub_language', lambda self: self.language or 'en', 'html') app.add_config_value('epub_language', lambda self: self.language or 'en', 'html')
app.add_config_value('epub_publisher', 'unknown', 'html') app.add_config_value('epub_publisher', lambda self: self.author, 'html')
app.add_config_value('epub_copyright', lambda self: self.copyright, 'html') app.add_config_value('epub_copyright', lambda self: self.copyright, 'html')
app.add_config_value('epub_identifier', 'unknown', 'html') app.add_config_value('epub_identifier', 'unknown', 'html')
app.add_config_value('epub_scheme', 'unknown', 'html') app.add_config_value('epub_scheme', 'unknown', 'html')