Class: Jekyll::Commands::Notify
- Inherits:
-
Jekyll::Command
- Object
- Jekyll::Command
- Jekyll::Commands::Notify
- Defined in:
- lib/jekyll/commands/notify.rb
Overview
Send Activity Pub notifications
Class Method Summary collapse
- .init_with_program(prog) ⇒ Object
-
.process(options) ⇒ Object
Send notifications.
Class Method Details
.init_with_program(prog) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/jekyll/commands/notify.rb', line 11 def init_with_program(prog) prog.command(:notify) do |c| c.syntax 'notify' c.description 'Send ActivityPub notifications' (c) c.action do |_, | process_with_graceful_fail(c, , self) end end end |
.process(options) ⇒ Object
Send notifications
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/jekyll/commands/notify.rb', line 27 def process() # Adjust verbosity quickly Jekyll.logger.adjust_verbosity() = () site = Jekyll::Site.new() # Retrocompatibility if site.reader.respond_to? :read_data site.reader.read_data else site.data = DataReader.new(site).read(site.config['data_dir']) end Jekyll::ActivityPub::Notifier.site = site Jekyll::ActivityPub::Notifier.notify! end |