Class: Jekyll::ActivityPub::Nodeinfo
- Inherits:
-
Page
- Object
- Page
- Jekyll::ActivityPub::Nodeinfo
- Includes:
- Helper
- Defined in:
- lib/jekyll/activity_pub/nodeinfo.rb
Overview
Points to site’s nodeinfo
Instance Method Summary collapse
-
#initialize(site, nodeinfos, base = '', dir = '.well-known', name = 'webfinger') ⇒ Nodeinfo
constructor
Initialize with default data.
-
#permalink ⇒ String
The nodeinfo file is expected to be at this location always.
- #read_yaml ⇒ Object
Methods included from Helper
#content, #generate_excerpt?, #hook_owner, #locale, #place_in_layout?, #pruned_data, #render_with_liquid?, #to_json, #to_liquid, #trigger_hooks
Constructor Details
#initialize(site, nodeinfos, base = '', dir = '.well-known', name = 'webfinger') ⇒ Nodeinfo
Initialize with default data
19 20 21 22 23 24 25 26 |
# File 'lib/jekyll/activity_pub/nodeinfo.rb', line 19 def initialize(site, nodeinfos, base = '', dir = '.well-known', name = 'webfinger') @context = StubContext.new(registers: { site: site }) @nodeinfos = nodeinfos super(site, base, dir, name) trigger_hooks :post_init end |
Instance Method Details
#permalink ⇒ String
The nodeinfo file is expected to be at this location always
35 36 37 |
# File 'lib/jekyll/activity_pub/nodeinfo.rb', line 35 def permalink '.well-known/nodeinfo' end |
#read_yaml ⇒ Object
28 29 30 |
# File 'lib/jekyll/activity_pub/nodeinfo.rb', line 28 def read_yaml(*) self.data = { 'links' => @nodeinfos.map(&:to_jrd) } end |