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 more log statements to site_github_munger. #189

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/jekyll-github-metadata/site_github_munger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,14 @@ def drop

# 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..."
Copy link
Member

Choose a reason for hiding this comment

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

These would be better in the Value proc { } block, otherwise the benefits of using a Value (the fact that computation is deferred) is lost.


site.config["url"] ||= Value.new("url", proc { |_c, r| r.url_without_path })
Jekyll::GitHubMetadata.log :debug, "`url` is set to #{site.config["url"]}"
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"]}"
end

def add_title_and_description_fallbacks!
Expand Down