lucky_favicon
Version, currently 0.3.15 versions
- 1.0.0latestOct 2, 2025
- 0.3.1not indexedNov 16, 2025
- 0.3.0not indexedNov 16, 2025
- 0.2.0not indexedNov 16, 2025
- 0.1.0not indexedNov 16, 2025
github.com/wout/lucky_favicon
Add favicons from the Real Favicon Generator to your Lucky project.
Nothing has been indexed for 0.3.1 yet. The tag is recorded, its shard.yml has not been read, so the manifest and dependency list below are empty because they are unknown rather than because they are absent.
Installation
# Add this to your shard.yml
dependencies:
lucky_favicon:
github: wout/lucky_favicon
version: ~> 0.3.1Then run:
shards installshard.yml
No shard.yml has been indexed for 0.3.1. You can read it on the repository.
Dependencies
Unknown: the shard.yml for this version has not been read yet.
README
This README is the one indexed from the repository at its latest ref, not from the tag for this version.
Lucky Favicon
Add favicons from the Real Favicon Generator to your Lucky project.
Installation
- Add the dependency to your
shard.yml:
dependencies:
lucky_favicon:
github: wout/lucky_favicon
- Run
shards install
Usage
IMPORTANT: Version 1.0.0 introduces a breaking change and uses the new, simplified icon set. If you're upgrading, from 0.x.x, make sure to generate a new icon package.
First, head over to the Real Favicon Generator, configure your icons and download the package. Unzip the package and place all the files in the public dir of your Lucky project, or in whichever subdirectory you configured when generating the set.
Then, make sure you require this library in Lucky's shards.cr file:
require "lucky_favicon"
And include the LuckyFavicon::Tags module wherever you want to use it:
class Shared::LayoutHead < BaseComponent
include LuckyFavicon::Tags
...
end
Now you'll be able to add your icon set with a single method:
head do
favicon_tags app_name: "Lucky App"
end
This will render a complete set of favicon-related tags:
<link rel="icon" type="image/png" href="/favicon-96x96.png" sizes="96x96" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<link rel="shortcut icon" href="/favicon.ico" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<meta name="apple-mobile-web-app-title" content="Lucky App" />
<link rel="manifest" href="/site.webmanifest" />
Cache key / version number
By default, "?v=0.1.0" will be appended to the file paths as a query string. If you update your icons, simply provide a new version number, and you're good to go:
favicon_tags app_name: "Lucky App", version: "0.2.0"
Custom directory
While it's not advisable to have your icons in a subdirectory, sometimes it may not be possible to have them in the root of you public directory. In that case you can provide the name of the directory:
favicon_tags app_name: "Lucky App", dir: "/icons"
Individual tags
If you don't want the whole set of meta and link tags, you can use the individual methods, each with custom arguments if required:
head do
favicon_icon_tags
apple_touch_icon_tag dir: "/somewhere/else"
application_title_tag app_name: "My Lucky App"
site_webmanifest_tag version: "0.5.3"
end
Documentation
Contributing
- Fork it (https://github.com/wout/lucky_favicon/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Make your changes, run
crystal run ci.cr, and ensure a positive result - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Contributors
- wout - creator and maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.3.1- Tagged
- Nov 16, 2025
- Commit
8c9bdcf41e4b- Indexed
- not yet
Dependents
Repository
github.com/wout/lucky_favicon
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 14, 2026
- Synced
- Aug 14, 2026
- Versions
- 5