feat: support defining Mastodon toot URL
This commit is contained in:
25
README.md
25
README.md
@@ -62,6 +62,31 @@ Comments are loaded automatically via JavaScript when visitors view a blog post.
|
||||
- Queries the PHP backend to find matching Mastodon toots
|
||||
- Displays replies as comments with full formatting
|
||||
|
||||
### Optional: Direct Toot URL (Recommended for Performance)
|
||||
|
||||
For better performance, you can specify the Mastodon toot URL directly in your post's front matter:
|
||||
|
||||
```yaml
|
||||
---
|
||||
title: "My Post Title"
|
||||
mastodon_toot_url: "https://mastodon.social/@username/113456789012345678"
|
||||
---
|
||||
```
|
||||
|
||||
**Benefits:**
|
||||
- Skips the entire toot search phase
|
||||
- Reduces API calls significantly
|
||||
- Faster page loads
|
||||
- Works across different Mastodon instances
|
||||
- Ensures the correct toot is always used
|
||||
|
||||
**When to use:**
|
||||
- For any post where you know the Mastodon toot URL
|
||||
- Especially recommended for popular or archived posts
|
||||
- When you've shared the post on a different Mastodon instance
|
||||
|
||||
If no `mastodon_toot_url` is provided, the system automatically falls back to searching for toots containing the post URL.
|
||||
|
||||
### Force Cache Refresh
|
||||
|
||||
To manually clear and rebuild the cache:
|
||||
|
||||
Reference in New Issue
Block a user