Show(layout, title='my title')

Hi, community!
I’m trying to set the title for the HTML document <title> tag, generated by show(). Normally I could use output_file(path,title='my title'), but I don’t want to override the current path. For save() there is a title parameter. Can I do something similar for show()?

I tried curdoc().set_title(), but there is no effect:

curdoc().set_title('my title')

Looking at the code, show ultimately just calls save, but it does not forward-on extra keyword args like title, so I would not expect that to work. I think your current options are:

  • use output_file to specify title and raise a browser automatically
  • use save (or file_html) to specify a title and raise a browser manually on the saved file

You can open a GitHub Issue to request this be looked at for future development.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.