Serum.Plugins.ActivityPub (serum_md v1.7.0)

Copy Markdown View Source

A Serum plugin that generates ActivityPub / Fediverse endpoints:

  • /.well-known/webfinger for Mastodon handle lookup (e.g. @blog@yourdomain.com).
  • /actor.json for the ActivityStreams 2.0 Person/Service Actor profile.
  • /outbox.json for the ActivityStreams 2.0 OrderedCollection of published blog posts.

Usage in serum.exs:

%{
  plugins: [
    {Serum.Plugins.ActivityPub,
     username: "blog",              # Optional, defaults to "blog"
     actor_path: "/actor.json",     # Optional, defaults to "/actor.json"
     outbox_path: "/outbox.json"    # Optional, defaults to "/outbox.json"
    }
  ]
}

Summary

Functions

Generates ActivityPub endpoints in the build output directory.

Callback implementation for Serum.Plugin.description/0.

Callback implementation for Serum.Plugin.elixir/0.

Callback implementation for Serum.Plugin.implements/0.

Callback implementation for Serum.Plugin.name/0.

Injects <link rel="alternate" type="application/activity+json" href="..."> into page HTML headers.

Callback implementation for Serum.Plugin.serum/0.

Callback implementation for Serum.Plugin.version/0.

Functions

build_succeeded(src, dest, args)

Generates ActivityPub endpoints in the build output directory.

description()

Callback implementation for Serum.Plugin.description/0.

elixir()

Callback implementation for Serum.Plugin.elixir/0.

implements()

Callback implementation for Serum.Plugin.implements/0.

name()

Callback implementation for Serum.Plugin.name/0.

rendered_page(file, args)

@spec rendered_page(Serum.File.t(), term()) :: {:ok, Serum.File.t()}

Injects <link rel="alternate" type="application/activity+json" href="..."> into page HTML headers.

serum()

Callback implementation for Serum.Plugin.serum/0.

version()

Callback implementation for Serum.Plugin.version/0.