Class: Jekyll::ActivityPub::HostMeta
- Inherits:
-
PageWithoutAFile
- Object
- PageWithoutAFile
- Jekyll::ActivityPub::HostMeta
- Includes:
- Helper
- Defined in:
- lib/jekyll/activity_pub/host_meta.rb
Overview
Host meta
Instance Method Summary collapse
- #content ⇒ String
-
#initialize(site, webfinger, base = '', dir = '.well-known', name = 'host-meta') ⇒ HostMeta
constructor
Initialize with default data.
- #permalink ⇒ Object
Methods included from Helper
#generate_excerpt?, #hook_owner, #locale, #place_in_layout?, #pruned_data, #render_with_liquid?, #to_json, #to_liquid, #trigger_hooks
Constructor Details
#initialize(site, webfinger, base = '', dir = '.well-known', name = 'host-meta') ⇒ HostMeta
Initialize with default data
20 21 22 23 24 25 26 27 |
# File 'lib/jekyll/activity_pub/host_meta.rb', line 20 def initialize(site, webfinger, base = '', dir = '.well-known', name = 'host-meta') super(site, base, dir, name) @webfinger = webfinger @context = StubContext.new(registers: { site: site }) trigger_hooks :post_init end |
Instance Method Details
#content ⇒ String
34 35 36 37 38 39 40 41 42 |
# File 'lib/jekyll/activity_pub/host_meta.rb', line 34 def content @content ||= <<~CONTENT <?xml version="1.0" encoding="UTF-8"?> <XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0"> <Link rel="lrdd" template="#{absolute_url @webfinger.url}"/> </XRD> CONTENT end |
#permalink ⇒ Object
29 30 31 |
# File 'lib/jekyll/activity_pub/host_meta.rb', line 29 def permalink '.well-known/host-meta' end |