Class: Jekyll::ActivityPub::HostMeta

Inherits:
PageWithoutAFile
  • Object
show all
Includes:
Helper
Defined in:
lib/jekyll/activity_pub/host_meta.rb

Overview

Instance Method Summary collapse

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

#contentString



34
35
36
37
38
39
40
41
42
# File 'lib/jekyll/activity_pub/host_meta.rb', line 34

def content
  @content ||=
    "      <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n      <XRD xmlns=\"http://docs.oasis-open.org/ns/xri/xrd-1.0\">\n        <Link rel=\"lrdd\" template=\"\#{absolute_url @webfinger.url}\"/>\n      </XRD>\n    CONTENT\nend\n"


29
30
31
# File 'lib/jekyll/activity_pub/host_meta.rb', line 29

def permalink
  '.well-known/host-meta'
end