uhugo.post_install.providers.cloudflare — uHugo 1.1.10 documentation

# uhugo.post_install.providers.cloudflare

class uhugo.post_install.providers.cloudflare.Cloudflare(api_key: str = None, email_address: str = None, account_id: str = None, hugo_version: str = None)

  Cloudflare provider

  Parameters:

    - hugo_version – New Hugo version

    - api_key – Authentication key for Cloudflare

    - email_address – Registered email address

    - account_id – Cloudflare worker account ID

  Raises:

    ValueError – If `email_address` and `account_id` is not provided

  current_version(project_name: str = None) → str | None

    Gets the current Hugo version

    Parameters:

      project_name – Name of the project to check from

  get_projects(project_name: str = None) → Response

    This checks and gets the projects available

    Parameters:

      project_name – Name of the project to get

    Returns:

      Returns HTTP response

  update_api(project_name: str) → Response

    Updates Cloudflare Pages environment variable of `HUGO_VERSION`.

    Parameters:

      project_name – Name of the project to update

    Returns: