updated README to include details on new image handling
This commit is contained in:
parent
84878d3c17
commit
61bb4d4d9e
1 changed files with 12 additions and 0 deletions
12
README.md
12
README.md
|
|
@ -10,6 +10,8 @@ Demo: [dylan.omg.lol/now](https://dylan.omg.lol/now)
|
|||
|
||||
Fetches content from RSS feeds, JSON feeds, and different services (Letterboxd, Trakt, Last.fm, Steam, Hardcover, etc.) and updates HTML or markdown links on your Now page. Supports optional images and videos for services that provide them (These are... iffy so if something breaks it's probably this). Runs every 3 hours via Forgejo Actions, only updating your page when changes are detected.
|
||||
|
||||
Images are matched using a `data-service` attribute on the img tag, which allows them to be updated repeatedly even after the initial replacement.
|
||||
|
||||
### Example
|
||||
Your Now page links will be automatically updated from this:
|
||||
|
||||
|
|
@ -54,6 +56,7 @@ For local development, copy `.env.example` to `.env` with your credentials.
|
|||
```html
|
||||
I wrote this: <a href="https://your-blog.com">blog</a>
|
||||
I watched this: <a href="https://letterboxd.com/username">letterboxd</a>
|
||||
<img data-service="letterboxd" src="letterboxd-image" style="max-width: 120px;">
|
||||
I listened to: <a href="https://www.last.fm/user/username">lastfm</a>
|
||||
```
|
||||
|
||||
|
|
@ -161,6 +164,15 @@ Many services support optional images and videos:
|
|||
|
||||
Control image inclusion with the `showImage` flag in your service config. Images are returned separately from text so you can control placement on your Now page.
|
||||
|
||||
To use images, your img tags must include a `data-service` attribute matching the service `id` from services.js. For example:
|
||||
|
||||
```html
|
||||
<img data-service="letterboxd" src="letterboxd-image" style="max-width: 120px;">
|
||||
<img data-service="steam" src="steam-image" style="max-width: 120px;">
|
||||
```
|
||||
|
||||
The `src` attribute can start with a placeholder (like `letterboxd-image`) or an existing URL - the updater will replace it either way as long as the `data-service` attribute is present.
|
||||
|
||||
## Available Services
|
||||
|
||||
All handlers now use a config object with consistent parameters. The `feedType` in services.js maps to these handlers.
|
||||
|
|
|
|||
Loading…
Reference in a new issue