Module: Jekyll::GitHubMetadata
- Defined in:
- lib/jekyll-github-metadata.rb,
lib/jekyll-github-metadata/owner.rb,
lib/jekyll-github-metadata/pages.rb,
lib/jekyll-github-metadata/value.rb,
lib/jekyll-github-metadata/client.rb,
lib/jekyll-github-metadata/version.rb,
lib/jekyll-github-metadata/sanitizer.rb,
lib/jekyll-github-metadata/repository.rb,
lib/jekyll-github-metadata/edit-link-tag.rb,
lib/jekyll-github-metadata/metadata_drop.rb,
lib/jekyll-github-metadata/repository_compat.rb,
lib/jekyll-github-metadata/repository_finder.rb,
lib/jekyll-github-metadata/site_github_munger.rb
Defined Under Namespace
Modules: Sanitizer
Classes: Client, EditLinkTag, MetadataDrop, Owner, Pages, Repository, RepositoryCompat, RepositoryFinder, SiteGitHubMunger, Value
Constant Summary
collapse
- NoRepositoryError =
RepositoryFinder::NoRepositoryError
- VERSION =
"2.16.1"
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
.client ⇒ Object
57
58
59
|
# File 'lib/jekyll-github-metadata.rb', line 57
def client
@client ||= Client.new
end
|
.logger ⇒ Object
45
46
47
|
# File 'lib/jekyll-github-metadata.rb', line 45
def logger
@logger ||= Jekyll.logger
end
|
.repository_finder ⇒ Object
Returns the value of attribute repository_finder.
34
35
36
|
# File 'lib/jekyll-github-metadata.rb', line 34
def repository_finder
@repository_finder
end
|
Class Method Details
.environment ⇒ Object
41
42
43
|
# File 'lib/jekyll-github-metadata.rb', line 41
def environment
Jekyll.env
end
|
.log(severity, message) ⇒ Object
49
50
51
52
53
54
55
|
# File 'lib/jekyll-github-metadata.rb', line 49
def log(severity, message)
if logger.method(severity).arity.abs >= 2
logger.public_send(severity, "GitHub Metadata:", message.to_s)
else
logger.public_send(severity, "GitHub Metadata: #{message}")
end
end
|
.repository ⇒ Object
61
62
63
64
65
|
# File 'lib/jekyll-github-metadata.rb', line 61
def repository
@repository ||= GitHubMetadata::Repository.new(repository_finder.nwo).tap do |repo|
log :debug, "Generating for #{repo.nwo}"
end
end
|
.reset! ⇒ Object
72
73
74
|
# File 'lib/jekyll-github-metadata.rb', line 72
def reset!
@logger = @client = @repository = @nwo = @site = nil
end
|
.site ⇒ Object
37
38
39
|
# File 'lib/jekyll-github-metadata.rb', line 37
def site
repository_finder.site
end
|
.site=(new_site) ⇒ Object