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

Solution needed for deploying favicon.ico #210

Closed
MarvDann opened this issue Nov 14, 2018 · 4 comments
Closed

Solution needed for deploying favicon.ico #210

MarvDann opened this issue Nov 14, 2018 · 4 comments

Comments

@MarvDann
Copy link

Enhancement

At the moment when we build a dojo app we have to manually copy favicon.ico to the root of the website which isn't ideal in automated deployment scenarios and other methods need to be employed to copy the file.

A favicon.ico file needs to be present in the root of a website if you want to display a browser tab icon on all browsers. There are other methods which work in some browsers using meta tags to point to a file located elsewhere but this doesn't work consistently in Firefox and IE.

I think an improved solution would be to have the ability to define a shortcut_icon property in the .dojorc file which would copy the specified file into the root of the output build folder.
Alternatively we could automatically look for favicon.ico in the root of /src and copy that during the build process if it is present.

Package Version:
4.0.2

Code

Expected behavior:

Actual behavior:

@mwistrand
Copy link
Contributor

@MarvDann I'm actually updating the documentation now, but if you put a favicon.ico in the src/ directory, and then add <link rel="icon" href="favicon.ico"> to the src/index.html, it will be parsed from the HTML, hashed, and placed directly beneath output/{mode}. In fact, this also works with CSS and JS files embedded in src/index.html. Further, if you have a top-level assets directory that is a sibling to the src/ directory, its contents will be copied as-is (without hashing) to output/{mode}. These can also be referenced in src/index.html, but MUST use absolute paths. For example, <img src="/assets/some-random-img.png" alt="...">.

@mwistrand
Copy link
Contributor

Before I forget, you can of course reference assets/ files in widgets as well: v('img', { src: '/assets/some-random-img.png', alt: '...' }).

@mwistrand
Copy link
Contributor

README updates are now in master.

@mwistrand
Copy link
Contributor

@MarvDann Closing this since it seems to have been resolved. Please feel free to reopen if that's not the case. Thanks!

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

No branches or pull requests

2 participants