def METHOD_NAME(
    ctx: click.Context, site_name: Optional[str] = None, no_view: bool = False
) -> None:
    """Build Data Docs for a project."""
    context: FileDataContext = ctx.obj.data_context
    usage_event_end: str = ctx.obj.usage_event_end
    if site_name is not None and site_name not in context.get_site_names():
        toolkit.exit_with_failure_message_and_stats(
            data_context=context,
            usage_event=usage_event_end,
            message=f"<red>The specified site name `{site_name}` does not exist in this project.</red>",
        )
    if site_name is None:
        sites_to_build = context.get_site_names()
    else:
        sites_to_build = [site_name]
    build_docs(
        context,
        usage_stats_event=usage_event_end,
        site_names=sites_to_build,
        view=not no_view,
        assume_yes=ctx.obj.assume_yes,
    )
    send_usage_message(
        data_context=context,
        event=usage_event_end,
        success=True,
    )