docs: def setup(app):
      """Register directives.
  
      When sphinx loads the extension (= imports the extension module) it
      also executes the setup() function. Setup is the way extension
      informs Sphinx about everything that the extension enables: which
      config_values are introduced, which custom nodes/directives/roles
      and which events are defined in extension.
  
      In this case, only one new directive is created. All used nodes are
      constructed from already existing nodes in docutils.nodes package.
  
      """
      app.add_config_value('autoprocess_process_dir', '', 'env')
      app.add_config_value('autoprocess_source_base_url', '', 'env')
      app.add_config_value('autoprocess_definitions_uri', '', 'env')
  
      app.add_directive('autoprocess', AutoProcessDirective)
      app.add_directive('autoprocesscategory', AutoProcessCategoryDirective)
      app.add_directive('autoprocesstype', AutoProcessTypesDirective)
  
      # The setup() function can return a dictionary. This is treated by
      # Sphinx as metadata of the extension:
      return {'version': '0.2'}