Jump to content

Correct way of handling favicon + fix for favicon detection


gebeer
 Share

Recommended Posts

Hi @bernhard,

The current Rockfrontend Docs talk about a favicon field that gets added if RockMigrations is installed (https://www.baumrock.com/en/processwire/modules/rockfrontend/docs/seo/#favicon-and-og-image)

In the code, I do not find any migration that installs that field. In the module code at https://github.com/baumrock/RockFrontend/blob/2c1570656bd0152f9927f03144d334eff5c8d4de/RockFrontend.module.php#L3346 it says

Use [realfavicongenerator](https://realfavicongenerator.net/) to add a favicon to your site.

Are the current docs this still valid?

Since I don't have the favicon field despite RockMigrations being installed when I installed RockFrontend, I assume that functionality does not exist anymore?

Could you please clarify. Thank you.

Also In module settings, I get

image.png.4ac32e093c6077c06dc7f45c654a8c7c.png

But there currently is no favicon.ico file in the root.

image.png.f5973fbdeb50d9ecd098ec098855ee65.png

If I change the check in https://github.com/baumrock/RockFrontend/blob/2c1570656bd0152f9927f03144d334eff5c8d4de/RockFrontend.module.php#L3335 to

$hasFavicon = $http->status( $this->wire->pages->get(1)->httpUrl() . "favicon.ico" ) === 200;

the detection works. 

  • Thanks 1
Link to comment
Share on other sites

Thank you @gebeer I've removed those outdated sections from the docs! Also you are right about the favicon.ico detection. I've fixed that in v3.22.1 😎

The og:image field/feature has been moved to RockSettings module and the favicon has been removed in favour of a favicon generator, because these favicon generators do a lot more (like also making it possible to define different colours for different devices or adjusting border radius etc).

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...