XKCD,
it’s nice to have the image title (the alt
attribute) added under the image.
Especially on mobile devices where there is no hover
event.
add_dynamic_image
add_image_title
add_youtube_video
add_youtube_video_from_id
add_invidious_video
add_youtube_video_using_invidious_player
add_castopod_episode
add_mailto_subject
base64_decode
base64_decode(".base64")
, but can also be used without argument: base64_decode
. In this case it'll try to convert all TextNodes and always fallback to original text if it can decode.nl2br
\n
to <br>
(useful for non-HTML contents).convert_text_links
fix_medium_images
use_noscript_figure_images
<noscript>
content for images rendered with Javascript.replace("search term"|"replace term")
remove(".selector, #another_selector")
parse_markdown
remove_tables
remove_clickbait
replace_title("search-term"|"replace-term")
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:
rule1,rule2
Separate each rule by a comma.
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).
CSS Selector | Description |
---|---|
div#articleBody | Fetch a div element with the ID articleBody |
div.content | Fetch all div elements with the class content |
article, div.article | 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.
Sometimes it might be required to rewrite an URL in a feed to fetch better suited content. For example, for some users the URL https://www.npr.org/sections/money/2021/05/18/997501946/the-case-for-universal-pre-k-just-got-stronger displays a cookie consent dialog instead of the actual content and it would be preferred to fetch the URL https://text.npr.org/997501946 instead. The following rules does this:
rewrite("^https:\/\/www\.npr\.org\/\d{4}\/\d{2}\/\d{2}\/(\d+)\/.*$"|"https://text.npr.org/$1")
This will rewrite all URLs from the original feed to URLs pointing to text.npr.org when the article content is fetched. I also had to add my own scraper rule, because the default rule will try to fetch #storytext.
Another example is the german page
https://www.heise.de/news/Industrie-ruestet-sich-fuer-Gasstopp-Forscher-vorsichtig-optimistisch-7167721.html
which splits the article into multiple pages. The full text can be read on
https://www.heise.de/news/Industrie-ruestet-sich-fuer-Gasstopp-Forscher-vorsichtig-optimistisch-7167721.html?seite=all
The URL rewrite rule for that would be
rewrite("(.*?\.html)"|"$1?seite=all")