Julien Voisin
2a372674a2
refactor(icon): avoid calling AbsoluteURL
twice for the feed icon URL
...
The url of a feed's icon is always absolute.
2025-08-20 19:01:59 -07:00
Frédéric Guillot
459b1bf1ee
test(icon): add tests for finding icon URLs in HTML documents
2025-08-19 20:14:34 -07:00
Frédéric Guillot
fdc12bf18c
fix(icon): improve logging messages in resizeIcon function
2025-08-19 20:14:34 -07:00
Frédéric Guillot
1b1ceaf8b4
test(icon): add test case to verify SVG minification with error
2025-08-19 20:14:34 -07:00
jvoisin
cad40cc158
feat(icon): minify svg favicons
2025-08-19 20:14:34 -07:00
Julien Voisin
261b72f149
feat(icon): add resizing support for webp images
2025-08-14 19:36:11 -07:00
Julien Voisin
6c60d61f36
fix(icon): use rel=apple-touch-icon
instead of rel=apple-touch-icon-precomposed.png
...
https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/ConfiguringWebApplications/ConfiguringWebApplications.html
2025-08-14 19:32:50 -07:00
jvoisin
3a01f8a691
perf(misc): use arrays instead of slices where possible
...
Arrays have a fixed size in go, while slices don't, making the former way
faster than the latter: https://go-benchmarks.com/array-vs-slice
2025-08-11 18:26:58 -07:00
Julien Voisin
06cbf1b3b3
fix(icon): update incorrect log messages
2025-08-09 15:20:33 -07:00
jvoisin
0e9da3a090
refactor(icon): simplify findIconURLsFromHTMLDocument
...
- Don't define the queries before possible early returns
- Check for the presence of the href attribute in the queries, instead of later
on iterating on the selection
- Add two edge-cases to the tests
- Use EachIter instead of Each, if only to avoid the lambda
2025-07-10 19:32:29 -07:00
jvoisin
57bd384951
refactor(icon): unexport a bunch of symbols
2025-07-10 19:32:29 -07:00
Frédéric Guillot
ef22e95f8b
feat: implement proxy URL per feed
2025-04-06 21:05:19 -07:00
Frédéric Guillot
535fd050b7
feat: add proxy rotation functionality
2025-04-06 14:59:00 -07:00
Frédéric Guillot
6eedf4111f
fix(scraper): avoid encoding issue if charset meta tag is after 1024 bytes
2025-02-15 17:05:14 -08:00
jvoisin
abfd9306a4
Guard against a potential null dereference
2025-01-23 19:20:13 -08:00
jvoisin
7939b54341
Resize favicons to 32x32 to account of scaling
...
As suggested by @michaelkuhn in https://github.com/miniflux/v2/pull/2998#issuecomment-2546702212
2024-12-16 19:28:38 -08:00
Julien Voisin
777d0dd248
feat: resize favicons before storing them
...
Some websites are using images of O(10kB) when not )O(100kB) for their
favicons. As miniflux only displays them with a 16x16 resolution, let's do our
best to resize them before storing them in the database. This should make
miniflux consume less bandwidth when serving pages, for the joy of mobile users
on a small data plan.
Of course, images that already are 16x16 aren't resized.
2024-12-15 20:47:19 -08:00
Gabe Cook
c3ca603960
fix: load icon from site URL instead of feed URL
2024-12-07 16:06:26 -08:00
Frédéric Guillot
f16735fd6d
feat: update feed icon during force refresh
2024-10-04 20:51:40 -07:00
jvoisin
fc4bdf3ab0
Inline a one-liner function
...
No need to expose a symbol for this.
2024-03-20 17:21:30 -07:00
jvoisin
06e256e5ef
Simplify internal/reader/icon/finder.go
...
- Use a simple regex to parse data uri instead of a hand-rolled parser, and
document what fields are considered mandatory.
- Use case-insensitive matching to find (fav)icons, instead of doing the same
query twice with different letter cases
- Add 'apple-touch-icon-precomposed.png' as a fallback favicon
- Reorder the queries to have i`con` first, since it seems to be the most
popular one. It used to be last, meaning that pages had to be parsed
completely 4 times, instead of one now.
- Minor factorisation in findIconURLsFromHTMLDocument
2024-02-26 18:18:04 -08:00
Frédéric Guillot
d0f99cee1a
Regression: ensure all HTML documents are encoded in UTF-8
...
Fixes #2196
2023-12-01 16:52:03 -08:00
Frédéric Guillot
14e25ab9fe
Refactor HTTP Client and LocalizedError packages
2023-10-22 13:09:30 -07:00
Frédéric Guillot
5ac3489ee5
Do not log website without icon as warning
2023-10-19 20:36:51 -07:00
Frédéric Guillot
9fd2dfa680
Refactor icon finder
...
Changes:
- Continue the discovery process when the feed icon is invalid
- Search all icons from the HTML document and do not stop on the first one
2023-10-18 22:24:56 -07:00
Frédéric Guillot
7650c81ad9
Add support for SVG icons with data url without encoding
2023-10-18 20:46:46 -07:00
Frédéric Guillot
c0e954f19d
Implement structured logging using log/slog package
2023-09-24 22:37:33 -07:00
Frédéric Guillot
3b94217fb7
Make sure icon URLs are always absolute
...
Regression introduced in #1907
2023-09-09 14:59:44 -07:00
Frédéric Guillot
e5d9f2f5a0
Rename internal url package to avoid overlap with net/url
2023-08-13 19:57:04 -07:00
Frédéric Guillot
168a870c02
Move internal packages to an internal folder
...
For reference: https://go.dev/doc/go1.4#internalpackages
2023-08-10 20:29:34 -07:00