code: def main(ctx, root_project_dir, verbose):
      
      root_project_dir = discover_conf_py_directory(root_project_dir)
  
      # Subcommands should use the click.pass_obj decorator to get this
      # ctx.obj object as the first argument.
      ctx.obj = {'root_project_dir': root_project_dir,
                 'verbose': verbose}
  
      # Set up application logging. This ensures that only documenteer's
      # logger is activated. If necessary, we can add other app's loggers too.
      if verbose:
          log_level = logging.DEBUG
      else:
          log_level = logging.INFO
      logger = logging.getLogger('documenteer')
      logger.addHandler(logging.StreamHandler())
      logger.setLevel(log_level)
docs: stack-docs is a CLI for building LSST Stack documentation, such as
      pipelines.lsst.io.
  
      This command should be run on the "main" documentation repository, namely
      https://github.com/lsst/pipelines_lsst_io.
  
      The stack-docs command replaces the usual Makefile and sphinx-build system
      for Sphinx projects. This dedicated tool provide subcommands that are
      engineered specifically for building the ``pipelines_lsst_io`` project.
  
      The key commands provided by stack-docs are:
  
      - ``stack-docs build``: compile the pipelines.lsst.io site from the
        ``pipelines_lsst_io`` repository and linked packages.
  
      - ``stack-docs clean``: removes build products. Use this command to
        clear the build cache.
  
      See also: package-docs, a tool for building previews of package
      documentation.
  
      For more information about stack-docs, see https://documenteer.lsst.io.