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 BLOG_EMAIL to global context to make it available for templates #2969

Merged
merged 4 commits into from Feb 25, 2018

Conversation

michaelb42
Copy link
Contributor

Pull Request Checklist

  • I’ve read the guidelines for contributing.
  • I updated AUTHORS.txt and CHANGES.txt (if the change is non-trivial) and documentation (if applicable).
  • I tested my changes.

Description

Add BLOG_EMAIL to global context to make it available for templates. Fix Issue #2968

Copy link
Member

@Kwpolska Kwpolska left a 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',
Copy link
Member

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.

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

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',
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh, missed this one.

Copy link
Member

@Kwpolska Kwpolska left a 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! 🎉

@Kwpolska Kwpolska merged commit ba99249 into getnikola:master Feb 25, 2018
@michaelb42 michaelb42 deleted the add_config_blog_email branch February 25, 2018 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants