Search code examples
bokeh

Is it possible to customize the app_index.html when serving multiple apps with bokeh serve?


When serving multiple apps with bokeh at once e.g. bokeh serve app1.py app2.py app3.py --port=12345, you will be shown an app index page at localhost:12345, which has links to your apps available on localhost:12345/app1, localhost:12345/app2 and localhost:12345/app3.

My question is: can you edit/customize that app index page? Or can you at least edit the link text, so it says "My awesome app" for example instead of "app1" (without changing the filename obviously)?

Maybe I used the wrong search terms but the only thing I found so far was how to deactivate said app index page.


Solution

  • Seems like the only way is to mutate the value of bokeh.server.urls.toplevel_patterns so that the very first tuple becomes

    (r'/?', RootHandler, dict(index="my_app_index.html"))