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

Update Gulp JS to fix Favicons Task #34

Open
3 tasks
jeremy-farrance opened this issue Dec 28, 2024 · 4 comments
Open
3 tasks

Update Gulp JS to fix Favicons Task #34

jeremy-farrance opened this issue Dec 28, 2024 · 4 comments
Assignees
Labels
task Client requested to do

Comments

@jeremy-farrance
Copy link
Member

When we npm run favicons, there are now two things that need fixing:

  • Update the JS so the string building in Meta.ascx is working again. See @jeremy-farrance or @bmusgrove-accuraty for a quick demo and an example of the corrected output on FCTRL2024 or SVRRF2024
  • Whatever fix NBE figured out**, we need to better understand what file or files GSC crawlers are using to get (and possibly save/cache?) that icon. There are probably multiple possible files with a priority order (guessing, read the docs)
  • If its not doing it already, please ensure our AccuTheme code for npm run favicons is updated to replace the default DNN favicon.ico in the site root (the original that worked in browsers back in the 1990s) with the appropriate generated one for this client/project. This will likely be a solid fallback in case something goes wrong over time with the <link ...> one.

** @nacho fixed this on TLRD, so we need to get those details from him. I believe after 3 or 4 guesses, he determined which file the Google Search Result listings actually use for the icon (see pic below showing the DNN icon on PDPR).

Here are Googles docs on this: Define a favicon to show in search results

image

@jeremy-farrance jeremy-farrance added the task Client requested to do label Dec 28, 2024
@nesquivel-accuraty
Copy link

nesquivel-accuraty commented Jan 2, 2025

Summary of Google Favicon Docs:

  • Make sure that the .ico file is linked in the following format: <link rel="icon" href="/path/to/favicon.ico">
  • Make sure there's only one .ico file.
  • Make sure the link is in the header section of the homepage.

In the TLRD portal, multiple .ico were uploaded in the preheader + miscellaneous places in the portal. I deleted all the old .ico files and their links. As long as we only have one .ico file in the homepage header, it'll be picked up. After cleaning up the old files, I added the favicon in DNN admin toolbar: Settings > Site Settings > Logos and Icons. I then requested a reindex of the homepage in GSC, and the new logo showed up a few days later.

@jeremy-farrance
Copy link
Member Author

The wording is a little confusing, the second bullet: how can there be more than one file named favicon.ico in the root folder? Its not possible on Linux or Windows.

For the second bullet, is it ONLY the home page? Do you get demerits if its on all pages of the site?

@nesquivel-accuraty
Copy link

nesquivel-accuraty commented Jan 2, 2025

  • In TLRD, there were multiple favicon.io files within the website. For example one in the root, another in /Portals, and another in /Portals/0. These old files were scattered in the website files while the one I wanted to use was being ignored in the root folder.

  • Based on Google Search docs, the only requirements are: having the icon link be available on the homepage, having it be in the header, and making sure that Googlebot-Image has access to the homepage. There are no negative consequences for having the link be used on multiple pages of the site. Google Search allows one icon to represent the site and it will prioritize any icon files in the homepage.

Edit: We found out why the run nvm favicon wasn't working. A script was producing the favicons but output them without a forward slash, which broke the links. (ie. /Portals/_default/Skins/AccuTheme/dist/media/**imagesfavicon**-96x96.png when it should be /Portals/_default/Skins/AccuTheme/dist/media/**images/favicon**-96x96.png). Jared will help me figure out how to fix this tomorrow.

@nesquivel-accuraty
Copy link

nesquivel-accuraty commented Jan 3, 2025

The solution used the 'nvm run favicon' (not the way I did it on TLRD). We've fixed a file that outputs the icon paths. The icon is now loading correctly in the homepage's page source, and I have requested that Google reindex the homepage.

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

No branches or pull requests

3 participants