Rewrite and Scraper Rules
Rewrite Rules ¶
To improve the reading experience, it’s possible to alter the content of feed items.
For example, if you are reading a popular comic website like XKCD,
it’s nice to have the image title (the
alt attribute) added under the image.
Especially on mobile devices where there is no
||Add each image’s title as a caption under the image.|
||Insert Youtube video inside the article (automatic for Youtube.com).|
Miniflux includes a set of default rules for some websites, but you could define your own rules.
On the feed edit page, enter your custom rules in the field “Rewrite Rules” like this:
Separate each rule by a comma.
Scraper Rules ¶
When an article contains only an extract of the content, you could fetch the original web page and apply a set of rules to get relevant contents.
Miniflux uses CSS selectors for custom rules. These custom rules can be saved in the feed properties (Select a feed and click on edit).
||Use a comma to define multiple rules|
Miniflux includes a list of predefined rules for popular websites. You could contribute to the project to keep them up to date.
Under the hood, Miniflux uses the library Goquery.