Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate a default favicon.ico in public folder, don't generate one on compile #2625

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

FranjoMindek
Copy link
Contributor

@FranjoMindek FranjoMindek commented Apr 4, 2025

New projects start with favicon.ico inside of public directory.
If there is no favicon.ico we still exclude the favicon <link> tag from the <head> of index.html.

Fixes #1979

Question for reviewers: Do we, and where do we notify users of new behavior in docs?

TODO: golden tests

Comment on lines +184 to +191
faviconFd = C.mkTmplFd . C.asTmplFile $ [relfile|public/favicon.ico|]
extPublicFileDrafts = map C.mkPublicFileDraft $ AS.externalPublicFiles spec
templateData =
object
[ "title" .= (AS.App.title (snd $ getApp spec) :: String),
"head" .= (maybe "" (intercalate "\n") (AS.App.head $ snd $ getApp spec) :: String)
"head"
.= (maybe "" (intercalate "\n") (AS.App.head $ snd $ getApp spec) :: String),
"isFaviconPresent" .= checkIfFileDraftExists faviconFd extPublicFileDrafts
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something feels off here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Place favicon.ico in the public dir by default
1 participant