def html_page_context(app, pagename, templatename, context, doctree):
 if (doctree and doctree.get('bokeh_plot_include_bokehjs')):
  context['bokeh_css_files'] = resources.css_files
  context['bokeh_js_files'] = resources.js_files

def html_page_context ( app , pagename , templatename , context , doctree ) : if ( doctree and doctree . get ( 'bokeh_plot_include_bokehjs' ) ) : context [ 'bokeh_css_files' ] = resources . css_files context [ 'bokeh_js_files' ] = resources . js_files
add bokehjs to pages that contain plots .