Uh oh!
There was an error while loading. Please reload this page.
Add more log statements to site_github_munger. - #189
Conversation
This adds more logs that were critical for us to solve an deploy error.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Updated with suggestions from @MichaelCurrin
Co-authored-by: Michael Currin <18750745+MichaelCurrin@users.noreply.github.com>
| # Set `site.url` and `site.baseurl` if unset. | ||
| def add_url_and_baseurl_fallbacks! | ||
| site.config["url"] ||= Value.new("url", proc { |_c, r| r.url_without_path }) | ||
| Jekyll::GitHubMetadata.log :debug, "Adding URL and base URL fallbacks..." |
There was a problem hiding this comment.
This describes the whole function, so some whitespace is useful, so indicate it applies to the section and not just the line or two directly after it.
| Jekyll::GitHubMetadata.log:debug,"Adding URL and base URL fallbacks..." | |
| Jekyll::GitHubMetadata.log:debug,"Adding URL and base URL fallbacks..." | |
| return unless should_set_baseurl? | ||
| site.config["baseurl"] = Value.new("baseurl", proc { |_c, r| r.baseurl }) | ||
| Jekyll::GitHubMetadata.log :debug, "baseurl is set to #{site.config["baseurl"]}" |
There was a problem hiding this comment.
Use base URL here for consistency with the above.
Or use url and baseurl (lowercase, no spaces) throughout. With backticks or single quotes would be nice.
e.g.
"Adding `url` and `baseurl` fallbacks..."
and
"`baseurl` is set to #{site.config["baseurl"]}"
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Michael Currin <18750745+MichaelCurrin@users.noreply.github.com>
MichaelCurrin
left a comment
There was a problem hiding this comment.
Thanks, changes look good
| # Set `site.url` and `site.baseurl` if unset. | ||
| def add_url_and_baseurl_fallbacks! | ||
| site.config["url"] ||= Value.new("url", proc { |_c, r| r.url_without_path }) | ||
| Jekyll::GitHubMetadata.log :debug, "Adding `url` and `baseurl` fallbacks..." |
There was a problem hiding this comment.
These would be better in the Valueproc { } block, otherwise the benefits of using a Value (the fact that computation is deferred) is lost.
This adds more logs that were critical for us to solve an deploy error.
Solves #186