47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
# File 'lib/jekyll-standard-site.rb', line 47
def render(context)
site = context.registers[:site]
page = context.registers[:page] || {}
tags = []
if (pub = StandardSite.publication_uri(site))
tags << %(<link rel="site.standard.publication" href="#{pub}">)
end
doc = page["at_uri"]
if doc
if doc =~ StandardSite::AT_URI_PATTERN
tags << %(<link rel="site.standard.document" href="#{doc}">)
else
Jekyll.logger.warn "Standard.site:", "at_uri on #{page["path"]} is not a valid AT-URI: #{doc}"
end
end
tags.join("\n")
end
|