datalad / datalad-catalog

Create a user-friendly data catalog from structured metadata
https://datalad-catalog.netlify.app
MIT License
15 stars 12 forks source link

NF: add option to provide custom favicon via config #274

Open jsheunis opened 1 year ago

jsheunis commented 1 year ago

Currently it uses datalad branded favicon, which should be the default. But a custom one is also useful. It can be specified in the same way as the custom logo via config.json, e.g. with the favicon_path field:

{
    "catalog_name": "DataCat",
    "logo_path": "",
    "favicon_path": "",
    "link_color": "#fba304",
    "link_hover_color": "#af7714",
...
}

the current favicon files include:

<link rel="icon" href="assets/favicon/favicon.ico" type="image/x-icon">
<link rel="icon" type="image/png" sizes="32x32" href="assets/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="assets/favicon/favicon-16x16.png">

and we would need to double check whether all are necessary or used, and in which contexts. It could be sufficient for users to perhaps only supply a .ico file, so the code that copies the supplied custom favicon will have to do either expect specific files or have some logic to put files in the right place and/or rename as necessary.