D
D
Danya Wyse2021-12-04 00:40:33
Node.js
Danya Wyse, 2021-12-04 00:40:33

How to correctly connect favicon through gulp task collector?

I've been sitting here for three days now and I'm stupid.
As I understood from a bunch of revised favicon guides:
ICO is an outdated format, PNG/SVG works fine.
favicon is read by browsers only from the root of the folder, that is, directly where the index.html file is located
. When I collect the folder, you can simply include it manually barbarously,
but I would like to do it correctly so that this would not be a problem in the future in serious projects.
I got to the gulp-real-favicon plugin, did everything at this link
https://realfavicongenerator.net/favicon_result?fi...
This error
JSON.parse($.gp.fs.readFileSync($.gp. FAVICON_DATA_FILE)).favicon.html_code
I did not find an adequate answer on the Internet to solve this problem,
Here is my faucet that reels me on the "loha" title
https://github.com/iWyse/favicon

If I'm moving in the right direction, explain how to finish this topic. Or am I doing something completely different from how it is done in real projects?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey delphinpro, 2021-12-04
@Wyse

1. Only favicon.ico (16x16 or 32x32) should be placed in the root. The rest of the icons can be easily thrown into any folder.
2. Why use any plugins to generate favicons at all, are you going to constantly update them? Once I generated the whole pack on some online service and forgot it for a couple of years. Connecting by hand, the same online generators will provide a ready-made code in which you can only adjust the paths for yourself, if you don’t put it in the root.
In general, I'm afraid you're bullshitting.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question