Class: Jekyll::GitHubMetadata::SiteGitHubMunger
- Inherits:
-
Object
- Object
- Jekyll::GitHubMetadata::SiteGitHubMunger
- Extended by:
- Forwardable
- Defined in:
- lib/jekyll-github-metadata/site_github_munger.rb
Class Attribute Summary collapse
-
.global_munger ⇒ Object
Returns the value of attribute global_munger.
Instance Method Summary collapse
-
#initialize(site) ⇒ SiteGitHubMunger
constructor
A new instance of SiteGitHubMunger.
- #inject_metadata!(payload) ⇒ Object
- #munge! ⇒ Object
- #uninject_metadata!(payload) ⇒ Object
Constructor Details
#initialize(site) ⇒ SiteGitHubMunger
Returns a new instance of SiteGitHubMunger.
16 17 18 19 |
# File 'lib/jekyll-github-metadata/site_github_munger.rb', line 16 def initialize(site) Jekyll::GitHubMetadata.site = site @original_config = site.config["github"] end |
Class Attribute Details
.global_munger ⇒ Object
Returns the value of attribute global_munger.
10 11 12 |
# File 'lib/jekyll-github-metadata/site_github_munger.rb', line 10 def global_munger @global_munger end |
Instance Method Details
#inject_metadata!(payload) ⇒ Object
28 29 30 |
# File 'lib/jekyll-github-metadata/site_github_munger.rb', line 28 def (payload) payload.site["github"] = github_namespace end |
#munge! ⇒ Object
21 22 23 24 25 26 |
# File 'lib/jekyll-github-metadata/site_github_munger.rb', line 21 def munge! Jekyll::GitHubMetadata.log :debug, "Initializing..." add_title_and_description_fallbacks! add_url_and_baseurl_fallbacks! if should_add_url_fallbacks? end |
#uninject_metadata!(payload) ⇒ Object
32 33 34 |
# File 'lib/jekyll-github-metadata/site_github_munger.rb', line 32 def (payload) payload.site["github"] = @original_config end |