What's New
🐦 Social Media Embed Preservation
Readability4K now preserves social media embeds from major platforms, allowing your reader app to display or style them appropriately:
- Twitter/X (
twitter-tweet) - Instagram (
instagram-media) - TikTok (
tiktok-embed) - Reddit (
reddit-embed-bq) - Facebook (
fb-post,fb-video)
The semantic CSS classes are preserved during extraction, enabling you to:
- Apply custom styling to embeds
- Load platform embed scripts for full rendering
- Display embeds as styled blockquotes
🎨 New Styling API
Simple helper functions to generate CSS for social media embeds:
// Match your app's theme
val css = generateThemedSocialMediaCSS(
backgroundColor = "#ffffff",
textColor = "#000000"
)
// Or use the builder for full customization
val css = socialMediaStyles {
lightMode {
twitter { accentColor = "#1DA1F2" }
}
}.generateCSS()
🖼️ Image Extraction Fix
Fixed an issue where images inside <figure> elements were incorrectly removed during content cleanup. This particularly affected sites like Interesting Engineering that use Next.js image optimization with figure containers.
Breaking Changes
None - this is a backward-compatible feature release.
Dependency Updates
None
Full Changelog
https://github.com/Sermilion/readability4k/compare/0.1.5...0.2.0