code: def on_page_markdown(self, markdown, page, config,
                            site_navigation=None, **kwargs):
          "Provide a hook for defining functions from an external module"
  
          # the site_navigation argument has been made optional
          # (deleted in post 1.0 mkdocs, but maintained here
          # for backward compatibility)
  
          if not self.variables:
              return markdown
  
          else:
  
              # Create templae and get the variables
              md_template = Template(markdown)
  
              # Execute the jinja2 template and return
              return md_template.render(**self.variablesf on_page_markdown(self, markdown, page, config,
                            site_navigation=None, **kwargs):
          "Provide a hook for defining functions from an external module"
  
          # the site_navigation argument has been made optional
          # (deleted in post 1.0 mkdocs, but maintained here
          # for backward compatibility)
  
          if not self.variables:
              return markdown
  
          else:
  
              # Create templae and get the variables
              md_template = Template(markdown)
  
              # Execute the jinja2 template and return
              return md_template.render(**self.variables)
docs: Provide a hook for defining functions from an external module