bep / docuapi

Beautiful multilingual API documentation theme for Hugo
https://docuapi.netlify.app/
Other
750 stars 200 forks source link

How to change favicon? #92

Closed kostya-konev closed 1 year ago

kostya-konev commented 1 year ago

I just copied repository and deploy it to netlify. So deployment goes from exampleSite folder. How do I change favicon? I tried many ways, such as:

  1. Adding favicon.ico in "static" folder that is located in the root directory.

  2. Adding favicon.ico in "static/images" folder that is located in the root directory and creating head.html file in "layouts/partials" folder that is located in the root directory and put there <link rel="icon" href="{{ "images/favicon.ico" | relURL }}">

  3. Adding favicon.ico in "static/images" folder that is located in the exampleSite directory and creating head.html file in "layouts/partials" folder that is located in the exampleSite directory and put there <link rel="icon" href="{{ "images/favicon.ico" | relURL }}">

Also I tried different href values, like href="images/favicon.ico", href="{{ relURL "images/favicon.ico" }}"

Nothing works.

bep commented 1 year ago

There's no favicon in the default templates, but you can add the markup yourself. Simplest if probably to just add a hook template, see partials/hook_head_end.html:

https://github.com/bep/docuapi#hooks