delphidabbler / delphi-tips

A bunch of Delphi language tips migrated from the DelphiDabbler.com website, plus others.
https://tips.delphidabbler.com
31 stars 11 forks source link

Inhibit loading of favicons or provide them #65

Closed delphidabbler closed 2 years ago

delphidabbler commented 2 years ago

At present Delphi tips web pages are attempting to load favicons and are logging 404 errors when they fail to find one.

There are two possible ways to resolve this problem.

Option 1: inhibit loading favicons

Adding the following line of HTML to docs/_includes/head.html will inhibit loading an external favico:

<link rel="icon" href="data:;base64,iVBORw0KGgo=">

Option 2: provide favicons

Create different size copies of the simpler version of the new DelphiDabbler logo:

dd-logo-1-512

The required sizes are 16x16, 32x32, 128x128, 180x180 and 192x192.

Name the files favicon-xx.png, where xx is the dimension of one side of the image. Place the image files in the /assets/img directory. Finally, add the following HTML to docs/_includes/head.html:

<link rel="icon" href="/assets/img/favicon-16.png" type="image/png" sizes="16x16">
<link rel="icon" href="/assets/img/favicon-32.png" type="image/png" sizes="32x32">
<link rel="icon" href="/assets/img/favicon-128.png" type="image/png" sizes="128x128">
<link rel="icon" href="/assets/img/favicon-180.png" type="image/png" sizes="180x180">
<link rel="icon" href="/assets/img/favicon-192.png" type="image/png" sizes="192x192">
delphidabbler commented 2 years ago

Decided to add favicons, but to change the colour of the new DelphiDabbler logo like this:

tips-favicon-128

Changed name of favicons suggested above to tips-favicon-XX.png where XX is size.