jekyll-mastodon_webfinger 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +31 -15
- data/lib/jekyll/mastodon_webfinger/version.rb +1 -1
- data/lib/jekyll/mastodon_webfinger.rb +5 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3423f8cd879221c0ebbcdfcfc1306df6ba0532339e271074227b3a5ff801957e
|
4
|
+
data.tar.gz: e076a475404414e3d15680b8bdf0498d1611b85c03fe1f994504d153186e28c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bca50a8ecf2acf32be270df5e083ab38c54ff4f30874c9e1aacd88a940ff052f7c60987700bfc403e56a3846b6d595a84038ff8840a465166312939237d6f977
|
7
|
+
data.tar.gz: d067ec079ffea4b53818ac00c7991510bade0209e9efc67ca31deb1fa1eb0c1af4594b6f3f6b4850ada63b028bdda9220e1d505885399e0937e4901e74aef2b0
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,9 +1,17 @@
|
|
1
1
|
# `Jekyll::MastodonWebfinger`
|
2
2
|
|
3
|
-
|
3
|
+
<h2>Use your Jekyll website domain as an alias for your Mastodon username</h2>
|
4
|
+
|
5
|
+
This is a [Jekyll](https://jekyllrb.com/) plugin that adds a [WebFinger](https://webfinger.net/) file to your site, allowing you to use your own domain as an alias to help others discover your [Mastodon](https://joinmastodon.org/) profile.
|
6
|
+
|
7
|
+
<h3>Try it out</h3>
|
8
|
+
|
9
|
+
Search Mastodon for `@phil@philna.sh` and you will find my Mastodon profile.
|
4
10
|
|
5
11
|
* [What?](#what)
|
12
|
+
* [Alternatives](#alternatives)
|
6
13
|
* [How to use](#how-to-use)
|
14
|
+
* [Config](#config)
|
7
15
|
* [Drawbacks](#drawbacks)
|
8
16
|
* [Development](#development)
|
9
17
|
* [Contributing](#contributing)
|
@@ -12,15 +20,19 @@ This is a [Jekyll](https://jekyllrb.com/) plugin that adds a [WebFinger](https:/
|
|
12
20
|
|
13
21
|
## What?
|
14
22
|
|
15
|
-
You may be
|
23
|
+
You may be tempted to run your own Mastodon instance so that you can use your own domain. If you don't want the work of managing a server you can instead use your domain as an alias to point to your Mastodon profile.
|
16
24
|
|
17
|
-
|
25
|
+
This uses [WebFinger](https://webfinger.net/), which is a way to attach information to an email address or other online resource. In this case you can point email addresses on your own domain to your Mastodon profile.
|
18
26
|
|
19
|
-
For example, I have a Mastodon profile at [@philnash@mastodon.social](https://mastodon.social/@philnash). If I add this plugin to my Jekyll site at https://philna.sh and set the username to `philnash` and the instance to `mastodon.social`, then you will be able to find my account by searching for
|
27
|
+
For example, I have a Mastodon profile at [@philnash@mastodon.social](https://mastodon.social/@philnash). If I add this plugin to my Jekyll site at https://philna.sh and set the username to `philnash` and the instance to `mastodon.social`, then you will be able to find my account by searching for `phil@philna.sh` in any Mastodon instance.
|
20
28
|
|
21
29
|
For a more in depth explanation, check out [Mastodon on your own domain without hosting a server
|
22
30
|
by Maarten Balliauw](https://blog.maartenballiauw.be/post/2022/11/05/mastodon-own-donain-without-hosting-server.html).
|
23
31
|
|
32
|
+
### Alternatives
|
33
|
+
|
34
|
+
* @dkundel's [netlify-plugin-mastodon-alias](https://github.com/dkundel/netlify-plugin-mastodon-alias)
|
35
|
+
|
24
36
|
## How to use
|
25
37
|
|
26
38
|
Add the gem to your Jekyll site's `Gemfile` by executing:
|
@@ -33,20 +45,24 @@ Or by opening the `Gemfile`, adding:
|
|
33
45
|
|
34
46
|
and then running `bundle install`.
|
35
47
|
|
36
|
-
|
48
|
+
### Config
|
49
|
+
|
50
|
+
You need to add two things to your `_config.yml` file.
|
51
|
+
|
52
|
+
1. Add your Mastodon account details. For example:
|
37
53
|
|
38
|
-
```yml
|
39
|
-
mastodon:
|
40
|
-
|
41
|
-
|
42
|
-
```
|
54
|
+
```yml
|
55
|
+
mastodon:
|
56
|
+
username: philnash
|
57
|
+
instance: mastodon.social
|
58
|
+
```
|
43
59
|
|
44
|
-
|
60
|
+
2. Add `jekyll/mastodon_webfinger` to the `plugins` list:
|
45
61
|
|
46
|
-
```yml
|
47
|
-
plugins:
|
48
|
-
|
49
|
-
```
|
62
|
+
```yml
|
63
|
+
plugins:
|
64
|
+
- jekyll/mastodon_webfinger
|
65
|
+
```
|
50
66
|
|
51
67
|
Next time you build your Jekyll site, you will find a `/.well-known/` directory in the output with a `webfinger` file that contains the required JSON.
|
52
68
|
|
@@ -4,3 +4,8 @@ require "json"
|
|
4
4
|
require "jekyll"
|
5
5
|
require_relative "mastodon_webfinger/version"
|
6
6
|
require_relative "mastodon_webfinger/generator"
|
7
|
+
|
8
|
+
Jekyll::Hooks.register :site, :after_init do |site|
|
9
|
+
keep_files = site.config["keep_files"] || []
|
10
|
+
site.config["keep_files"] = keep_files.push(".well-known/webfinger").uniq
|
11
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-mastodon_webfinger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Phil Nash
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-11-
|
11
|
+
date: 2022-11-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|