Update readme-en.md
This commit is contained in:
parent
24a3bb7e87
commit
3b902a118b
1 changed files with 18 additions and 16 deletions
34
readme-en.md
34
readme-en.md
|
|
@ -10,11 +10,17 @@ A plugin to import your public Toots via the Mastodon API into your Yellow Blog.
|
||||||
2. Copy it into the `/system/extensions` directory
|
2. Copy it into the `/system/extensions` directory
|
||||||
3. Reload your website – the plugin is now installed
|
3. Reload your website – the plugin is now installed
|
||||||
|
|
||||||
## Usage
|
## How it works
|
||||||
|
|
||||||
The plugin is triggered via a custom **webhook**.
|
The plugin works fully automatically. It regularly checks in the background if there are new posts.
|
||||||
When the webhook is called, it fetches your Toots from the Mastodon API and creates blog posts from them.
|
|
||||||
Optionally, you can specify a **#hashtag** to import only matching posts.
|
When you visit the site, it queries your Mastodon API and automatically creates blog posts from your Toots. Optionally, you can specify a #Hashtag to import only certain posts.
|
||||||
|
|
||||||
|
There are three ways to trigger the import:
|
||||||
|
|
||||||
|
1. **Automatic (Lazy Cron):** As soon as a visitor accesses your website, the plugin checks if the update interval has expired and loads new Toots if necessary.
|
||||||
|
2. **From the terminal:** You can manually start the import on the server with: `php yellow.php mastodonapi`
|
||||||
|
3. **From the system cronjob:** If your host supports cronjobs, you can have the command `php yellow.php mastodonapi` run regularly (e.g. every 30 minutes).
|
||||||
|
|
||||||
## Settings
|
## Settings
|
||||||
|
|
||||||
|
|
@ -27,22 +33,18 @@ All settings are in `system/extensions/yellow-system.ini`:
|
||||||
- **MastodonapiAccessToken**
|
- **MastodonapiAccessToken**
|
||||||
- Optional for a Mastodon account
|
- Optional for a Mastodon account
|
||||||
- Mandatory for a GoToSocial account <a href="https://codeberg.org/simonpipe/yellow-mastodonapi/src/branch/main/help-gotoso-en.md">(see here)</a>
|
- Mandatory for a GoToSocial account <a href="https://codeberg.org/simonpipe/yellow-mastodonapi/src/branch/main/help-gotoso-en.md">(see here)</a>
|
||||||
- **MastodonapiLimit** - Default value is 20
|
- **MastodonapiUpdateInterval** – Time interval between automatic updates in minutes (default: 30).
|
||||||
- **MastodonapiHashtag** – leave empty to import all public posts; set to `#hashtag` to import only matching posts
|
- **MastodonapiLimit** – Number of Toots retrieved per run (default: 20).
|
||||||
- **MastodonapiAuthor** – author name to use for imported blog posts
|
- **MastodonapiHashtag** – Leave blank for all posts; or filter with #hashtag.
|
||||||
- **MastodonapiTag** – tag to assign to imported blog posts
|
- **MastodonapiAuthor** – Name under which the blog posts should appear.
|
||||||
- **MastodonapiFolder** – path to your blog folder (e.g. `content/1-blog/`)
|
- **MastodonapiTag** – Tag for the blog posts (default: Fediverse).
|
||||||
- **MastodonapiTriggerPath** – webhook path, e.g. `/mastodonapi-webhook-CHANGE_THIS_SECRET_KEY`
|
- **MastodonapiFolder** – Path to the blog folder (default: content/2-blog/).
|
||||||
*(Be sure to change it! Anyone with this link can trigger the plugin.)*
|
|
||||||
- **MastodonapiStatus** – Default value is public
|
- **MastodonapiStatus** – Default value is public
|
||||||
- public = page is a normal page
|
- public = page is a normal page
|
||||||
- draft = page is not visible, user needs to log in, requires <a target="blank_" href="https://github.com/annaesvensson/yellow-draft">draft extension</a>
|
- draft = page is not visible, user needs to log in, requires <a target="blank_" href="https://github.com/annaesvensson/yellow-draft">draft extension</a>
|
||||||
- unlisted = page is not visible, but can be accessed with the correct link
|
- unlisted = page is not visible, but can be accessed with the correct link
|
||||||
- **MastodonapiMaxAge** – Default value is 0
|
- **MastodonapiMaxAge** – Age of Toots in hours that should still be imported. 0 = all available Toots.
|
||||||
- In Stunden. 0 = all Toots.
|
|
||||||
|
|
||||||
💡 You can also call the webhook via a cron job to run the plugin automatically (e.g., every hour).
|
|
||||||
|
|
||||||
## Developer
|
## Developer
|
||||||
|
|
||||||
Simon Pipe
|
Simon Pipe
|
||||||
Loading…
Reference in a new issue