-
Notifications
You must be signed in to change notification settings - Fork 613
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
Require Hugo 0.120+, fix deprecation warnings #502
Changes from all commits
913c331
88ed6c7
46efded
8ed9be3
d7f910a
501eb28
6ac1940
5e720ad
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{{ if (.Params.comments) | or (and (or (not (isset .Params "comments")) (eq .Params.comments nil)) (.Site.Params.comments)) }} | ||
{{ if .Site.DisqusShortname }} | ||
{{ if .Site.Config.Services.Disqus.Shortname }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we error if There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah I guess you can add that. Sounds good. Edit: I can also add it if you have not time for that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you'd like to, go ahead. Pretty distracted at the moment with catch up in various projects. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok you can not access the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My idea is to use this in the {{ if le hugo.Version "0.120.0" }}
{{ errorf "Please use Hugo version 0.120.0 or higher!"}}
{{ end }}
{{ if not (eq .Site.DisqusShortname "") }}
{{ errorf "Your use of disqusShortname is deprecated by Hugo; Please reference the README.md for further instructions.
This error message will be removed in the future because we are also using .Site.DisqusShortname for checking this."}}
{{ end }} There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems reasonable. I can move the other check (Site.Author) there too after it's in. |
||
<div class="comments"> | ||
{{ template "_internal/disqus.html" . }} | ||
</div> | ||
{{ end }} | ||
{{ end }} | ||
{{ end }} |
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.
Probably matches everything else, so not changing it here, but I really don't like this fake TOML nesting. Pretending TOML cares about indentation when it doesn't isn't helpful, IMO.