-
Notifications
You must be signed in to change notification settings - Fork 460
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 BLOG_EMAIL to global context to make it available for templates #2969
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don’t think we need translatability for BLOG_EMAIL
.
nikola/nikola.py
Outdated
@@ -451,6 +451,7 @@ def __init__(self, **config): | |||
'AUTHORLIST_MINIMUM_POSTS': 1, | |||
'BLOG_AUTHOR': 'Default Author', | |||
'BLOG_TITLE': 'Default Title', | |||
'BLOG_EMAIL': 'Default EMail', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make it an empty string, please.
nikola/conf.py.in
Outdated
@@ -25,7 +25,7 @@ SITE_URL = ${SITE_URL} | |||
# This is the URL where Nikola's output will be deployed. | |||
# If not set, defaults to SITE_URL | |||
# BASE_URL = ${SITE_URL} | |||
BLOG_EMAIL = ${BLOG_EMAIL} | |||
BLOG_EMAIL = ${BLOG_EMAIL} # (translatable) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don’t think BLOG_EMAIL
needs to be translatable. You can just make it a regular string (as blog_url
is).
nikola/nikola.py
Outdated
@@ -656,6 +657,7 @@ def __init__(self, **config): | |||
|
|||
self.TRANSLATABLE_SETTINGS = ('BLOG_AUTHOR', | |||
'BLOG_TITLE', | |||
'BLOG_EMAIL', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one and _GLOBAL_CONTEXT_TRANSLATABLE
(line 696) need to be removed as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, missed this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this! 🎉
Pull Request Checklist
Description
Add BLOG_EMAIL to global context to make it available for templates. Fix Issue #2968