Add README.md and LICENSE
This commit is contained in:
parent
0a2d91d414
commit
8af574dc26
|
@ -0,0 +1,21 @@
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2020 Jan-Lukas Else
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
|
@ -0,0 +1,55 @@
|
||||||
|
# AcitivtyStreams support for Hugo
|
||||||
|
|
||||||
|
This is a [Hugo module](https://gohugo.io/categories/hugo-modules), you can use in [Hugo](https://gohugo.io/), to generate [ActivityStreams](https://www.w3.org/ns/activitystreams) representations of posts.
|
||||||
|
|
||||||
|
## How to use
|
||||||
|
|
||||||
|
You can use this module by adding it to your Hugo config (example of a YAML Hugo configuration file):
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
module:
|
||||||
|
imports:
|
||||||
|
# other imports ...
|
||||||
|
# The hugo-activitystreams module:
|
||||||
|
- path: codeberg.org/jlelse/hugo-activitystreams
|
||||||
|
```
|
||||||
|
|
||||||
|
You also need to specify the [custom output format](https://gohugo.io/templates/output-formats/) `activity` for the kinds `index` and `page`. When you add a custom output format, you need to make sure to also include the [default ones](https://gohugo.io/templates/output-formats/#default-output-formats).
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
outputs:
|
||||||
|
home:
|
||||||
|
- "html" # Default
|
||||||
|
- "rss" # Default
|
||||||
|
- "activity"
|
||||||
|
page:
|
||||||
|
- "html" # Default
|
||||||
|
- "activity"
|
||||||
|
```
|
||||||
|
|
||||||
|
And finally (if you want to use use your website as an [ActivityPub](https://www.w3.org/TR/activitypub/) actor - middleware to do that with Hugo is coming soon...), you need to configure two params: `inbox` with the ActivityPub inbox URL and `publickeypem` with the PEM format of the public key of the key you use to sign activities.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
params:
|
||||||
|
# Your other params...
|
||||||
|
# ActivityPub params
|
||||||
|
activitypub:
|
||||||
|
inbox: https://blog.example/activitypub/de/inbox
|
||||||
|
publickeypem: -----BEGIN PUBLIC KEY-----...
|
||||||
|
```
|
||||||
|
|
||||||
|
### Note
|
||||||
|
|
||||||
|
By default the [ActivityPub](https://www.w3.org/TR/activitypub/) actor has the IRI of the language-based homepage. Example:
|
||||||
|
|
||||||
|
- Domain: jlelse.blog (a Hugo blog with two configured languages, default language "en")
|
||||||
|
- English actor:
|
||||||
|
- Username: @en@jlelse.blog
|
||||||
|
- IRI: https://jlelse.blog/
|
||||||
|
- German actor:
|
||||||
|
- Username: @de@jlelse.blog
|
||||||
|
- IRI: https://jlelse.blog/de/
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
This project is MIT licensed. See the license [here](./LICENSE).
|
Reference in New Issue