netlify-plugin-mastodon-alias
v1.0.1
Published
Netlify build plugin to create a redirect from your site to your mastodon profile
Readme
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
- You'll need your existing Mastodon username and instance. This project does not actually deploy a Mastodon instance.
- A working Netlify website wired up to your domain.
Installation
npm install netlify-plugin-mastodon-aliasConfiguration
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 @[email protected] and @[email protected] 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 @[email protected] will continue to work but not @[email protected].
License
MIT
