|
11 | 11 | <a href="https://github.com/apple/swift-package-manager"><img src="https://img.shields.io/badge/SPM-compatible-4BC51D.svg?style=flat" alt="SPM Compatible"></a>
|
12 | 12 | <img src="https://img.shields.io/badge/Swift-5.10-orange.svg" alt="Swift 5.10">
|
13 | 13 | <img src="https://img.shields.io/badge/Swift-6.0-orange.svg" alt="Swift 6.0">
|
14 |
| - <a href="https://twitter.com/wlumley95"> |
15 |
| - <img src="https://img.shields.io/badge/twitter-@wlumley95-blue.svg?style=flat" alt="Twitter"> |
| 14 | + <a href="https://bsky.app/profile/will-lumley.bsky.social"> |
| 15 | + <img src="https://img.shields.io/badge/Bluesky-0285FF?logo=bluesky&logoColor=fff" alt="Bluesky"> |
16 | 16 | </a>
|
17 | 17 | </p>
|
18 | 18 |
|
@@ -97,25 +97,25 @@ image type to cast the data to. Also due to this, `largest()` and `smallest()` a
|
97 | 97 | FaviconFinder simplifies the process of locating and retrieving favicons by automating the search through the various places where a favicon can be defined. Since favicons can exist in multiple locations, FaviconFinder systematically queries each potential source, following a priority order that you can customise.
|
98 | 98 |
|
99 | 99 | **Key Steps**
|
100 |
| -1. HTML Header Query and Parsing |
| 100 | +1. **HTML Header Query and Parsing** <br /> |
101 | 101 | FaviconFinder begins by querying the URL you provide. It then inspects the HTML of the webpage and looks for any favicon declarations in the `<link>` or `<meta>` tags within the header of the downloaded HTML file. This can include favicons specified as standard icons (`<link rel="icon">`), Apple touch icons (`<link rel="apple-touch-icon">`), or others defined within the Open Graph metadata.
|
102 | 102 |
|
103 |
| -2. Fallback to the Favicon File |
| 103 | +2. **Fallback to the Favicon File** <br /> |
104 | 104 | If no favicon is found within the HTML, FaviconFinder checks for the traditional favicon location at the root of the domain (https://site.com/favicon.ico). This is the default location where many sites place their favicons, so this check is a quick and effective fallback. If none is found here, FaviconFinder will check if the URL provided is a subdomain (ie. https://example.site.com), and if it is, will query the root domain (ie. https://site.com).
|
105 | 105 |
|
106 |
| -3. Fallback to the Web Application Manifest File |
| 106 | +3. **Fallback to the Web Application Manifest File** <br /> |
107 | 107 | For sites that utilise a web application manifest (manifest.json), FaviconFinder parses the JSON file to look for any icons defined specifically for progressive web applications. These are often found in mobile-optimised websites or applications and provide higher-resolution favicons.
|
108 | 108 |
|
109 |
| -4. Meta-Refresh Redirects (Optional) |
| 109 | +4. **Meta-Refresh Redirects (Optional)** <br /> |
110 | 110 | Some websites may use meta-refresh redirects instead of server-side HTTP redirects. If enabled in the configuration, FaviconFinder will inspect the HTML for these meta-refresh redirects and follow them to retrieve the favicon from the redirected URL.
|
111 | 111 |
|
112 |
| -5. Favicon Size Sorting |
| 112 | +5. **Favicon Size Sorting** <br /> |
113 | 113 | FaviconFinder extracts size metadata from the HTML or web application manifest to sort favicons by their dimensions (e.g., 120x120, 32x32). This allows you to easily determine the largest or smallest favicon without downloading every image, saving bandwidth and improving performance.
|
114 | 114 |
|
115 |
| -6. Customisation and Preferences |
| 115 | +6. **Customisation and Preferences** <br /> |
116 | 116 | FaviconFinder allows you to customise how it searches for favicons. You can prioritise certain favicon types (e.g., Apple touch icons, .ico files) and even provide pre-fetched HTML or custom HTTP headers for authentication, giving you full control over how the library interacts with the site.
|
117 | 117 |
|
118 |
| -7. Cross-Platform Compatibility |
| 118 | +7. **Cross-Platform Compatibility** <br /> |
119 | 119 | FaviconFinder is designed to work across macOS, iOS, and Linux. It adjusts its methods depending on the platform, so you can use it seamlessly whether you’re working in SwiftUI, UIKit, or AppKit. On Linux, FaviconFinder ensures compatibility even though the platform lacks native image handling, using data-driven methods instead.
|
120 | 120 |
|
121 | 121 | ## Documentation
|
@@ -356,7 +356,7 @@ targets: [
|
356 | 356 |
|
357 | 357 | ### Cocoapods and Carthage
|
358 | 358 |
|
359 |
| -FaviconFinder was previously available through CocoaPods and Carthage, however making the library available to all three Cocoapods, |
| 359 | +FaviconFinder was previously available through CocoaPods and Carthage, however making the library available to all three, Cocoapods, |
360 | 360 | Carthage, and SPM (and functional to all three) was becoming troublesome. This, combined with the fact that SPM has seen a serious
|
361 | 361 | up-tick in adoption & functionality, has led me to remove support for CocoaPods and Carthage.
|
362 | 362 |
|
|
0 commit comments