How to change favicon

How can I change the favicon via Templates?

@philippjfr writes here that it’s done via “Templates”, but I don’t get how. Adding pn.template.BootstrapTemplate(favicon='images/my_lovely_favicon.ico') to my content doesn’t do at all what I want it to…

That looks like the right way, I haven’t tried it though. You say it doesn’t do what you want, but what happens exactly?

Sorry, that wasn’t very clear of me. it just adds like 20 or so input fields to the layout.

Ush weird! Do you have a small example to reproduce that?

It looks like you’re putting the template inside pn.panel/pn.Row/pn.Column. Try something like this:

import panel as pn

template = pn.template.BootstrapTemplate(favicon="images/favicon.ico")

template.servable()

Screenshot 2022-08-01 08.43.57

Yah, that works. And now I successfully added content with template.main.append(my_awesome_content)

Thanks! : :blush: :pray:

1 Like