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

Add new confval "author" and use it for lazy evaluation #4518

Merged
merged 3 commits into from
Jan 31, 2018

Conversation

tk0miya
Copy link
Member

@tk0miya tk0miya commented Jan 29, 2018

Feature or Bugfix

  • Feature

Purpose

  • Add new configure value author
  • Use it for lazy evaluation

@tk0miya tk0miya added this to the 1.8 milestone Jan 29, 2018
CHANGES Outdated
@@ -20,6 +23,7 @@ Features added
* Add :event:`config-inited` event
* Add ``sphinx.config.Any`` to represent the config value accepts any type of
value
* Add :confval:`author` as a configuration value
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So far, author is defined as local variable in conf.py.
This enables all of Sphinx modules can refer it.

@@ -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')
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is same as what quickstart does.

# Bibliographic Dublin Core info.
epub_title = project
epub_author = author
epub_publisher = author
epub_copyright = copyright

So I will be able to omit them from conf.py.

Copy link
Member

@shimizukawa shimizukawa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@tk0miya tk0miya merged commit 5b7432b into sphinx-doc:master Jan 31, 2018
@tk0miya tk0miya deleted the register_author_as_confval branch January 31, 2018 00:26
@tk0miya
Copy link
Member Author

tk0miya commented Jan 31, 2018

Thanks!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants