code: def add_link(app, pagename, templatename, context, doctree):
      
  
      # we can only show the slidelink if we can resolve the filename
      context['show_slidelink'] = (
          app.config.slide_link_html_to_slides and
          hasattr(app.builder, 'get_outfilename')
      )
  
      if context['show_slidelink']:
          context['slide_path'] = slide_path(app.builder, pagename)
docs: Add the slides link to the HTML context.