diff --git a/CHANGES b/CHANGES index b8f167f5f..cad3b9b0a 100644 --- a/CHANGES +++ b/CHANGES @@ -10,6 +10,9 @@ Incompatible changes * #4460: extensions which stores any data to environment should return the version of its env data structure as metadata. In detail, please see :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 ---------- diff --git a/doc/config.rst b/doc/config.rst index 9e92f083e..2e9ddf07c 100644 --- a/doc/config.rst +++ b/doc/config.rst @@ -1414,8 +1414,8 @@ the `Dublin Core metadata `_. .. confval:: epub_author - The author of the document. This is put in the Dublin Core metadata. The - default value is ``'unknown'``. + The author of the document. This is put in the Dublin Core metadata. It + defaults to the :confval:`author` option. .. confval:: epub_contributor @@ -1436,8 +1436,8 @@ the `Dublin Core metadata `_. .. confval:: epub_publisher 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 - ``'unknown'``. + may use any sensible string, e.g. the project homepage. The defaults to the + :confval:`author` option. .. confval:: epub_copyright diff --git a/sphinx/builders/epub3.py b/sphinx/builders/epub3.py index c98c4b853..2a1b743e0 100644 --- a/sphinx/builders/epub3.py +++ b/sphinx/builders/epub3.py @@ -231,9 +231,9 @@ def setup(app): app.add_config_value('epub_theme', 'epub', '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_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_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_identifier', 'unknown', 'html') app.add_config_value('epub_scheme', 'unknown', 'html')