Skip to content

[Hinode] Set a baseURL when deploying PR previews #416

Description

@MasterKale

The --baseURL arg can be passed when calling hugo to build the site to override the base URL set in config/_default/hugo.toml. This is particularly useful when previewing changes in PRs because various links in the preview will link to the preview build instead of the main site.

There's a CF_PAGES_URL environment variable we should be able to reference when building the preview site:

https://developers.cloudflare.com/pages/configuration/build-configuration/#environment-variables

I'm going to experiment with this as preview builds have a different configuration section in Cloudflare, so it shouldn't impact production deployments.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions