1.0.1 • Published 1 year ago

netlify-plugin-mastodon-alias v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

netlify-plugin-mastodon-alias

Use your website hosted on Netlify as an alias for your Mastodon username.

Inspired by Maarten Balliauw's blog post and Phil Nash's Jekyll plugin

Requirements

  1. You'll need your existing Mastodon username and instance. This project does not actually deploy a Mastodon instance.
  2. A working Netlify website wired up to your domain.

Installation

npm install netlify-plugin-mastodon-alias

Configuration

To your netlify.toml file add the following:

[[plugins]]
  package = "netlify-plugin-mastodon-alias"

  [plugins.inputs]
    username = "YOUR_MASTODON_USERNAME"
    instance = "YOUR_MASTODON_INSTANCE"

By default this will redirect any username on your domain to this username. For example both @hello@example.com and @bye@example.com would work. If you want to only match for one username then you can add the following configuration:

[[plugins]]
  package = "netlify-plugin-mastodon-alias"

  [plugins.inputs]
    username = "YOUR_MASTODON_USERNAME"
    instance = "YOUR_MASTODON_INSTANCE"
+    strictUsername = "hello"

In this case only @hello@example.com will continue to work but not @bye@example.com.

License

MIT

1.0.1

1 year ago

1.0.0

1 year ago