Class: Jekyll::MastodonSocial::GatherPosse

Inherits:
Generator
  • Object
show all
Defined in:
lib/jekyll/generators/gather_posse.rb

Instance Method Summary collapse

Instance Method Details

#generate(site) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/jekyll/generators/gather_posse.rb', line 6

def generate(site)
  MastodonSocial.setup(site)
  for post in site.posts.docs
    # If we've never processed this post, add it to the db as unpublished
    MastodonSocial.mark_as_published(post, nil) unless MastodonSocial.mastodon_status[post.url]
  end
  MastodonSocial.save_config()
end