Skip to content

How to set favicon

Hiroki Toyokawa edited this page Apr 27, 2024 · 2 revisions

Place favicon.ico just under public/ directory.

Or place favicon.png or favicon.svg under public/ directory and specify the path by link tag in <head> in the layouts/Layout.astro file as follows.

  <head>
    ...
+   <link rel="icon" href={getStaticFilePath('/favicon.svg')} />
    ...
  </head>