Skip to content

Commit

Permalink
Updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
will-lumley committed Nov 3, 2024
1 parent 5c73551 commit 9d57b12
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,23 @@ Limitations

This functionality allows you to efficiently sort favicon URLs by size and download only the favicons you need, making it a powerful tool for handling favicons in an optimised manner.

### Header & Hero Images

There are times where you would like to fetch the header or hero image from a URL. You can let FaviconFinder know that you want it to do this with the `acceptHeaderImage` parameter in the configuration.
With the default value set to `false`, this parameter is an opt-in one.

You can use it as so:

```swift
let favicon = try await FaviconFinder(
url: url,
configuration: .init(acceptHeaderImage: true)
)
.fetchFaviconURLs()
.download()
.largest()
```

## Example Projects

To run the example project, clone the repo, and open the example Xcode Project in either the `iOSFaviconFinderExample`, or `macOSFaviconFinderExample`, depending on your build target.
Expand All @@ -329,7 +346,7 @@ To install it, simply add the dependency to your Package.Swift file:
```swift
...
dependencies: [
.package(url: "https://github.com/will-lumley/FaviconFinder.git", from: "5.1.2"),
.package(url: "https://github.com/will-lumley/FaviconFinder.git", from: "5.1.4"),
],
targets: [
.target( name: "YourTarget", dependencies: ["FaviconFinder"]),
Expand Down

0 comments on commit 9d57b12

Please sign in to comment.