Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support emitting CNAME file for publishing at a custom domain #1311

Merged
merged 1 commit into from
Sep 6, 2020
Merged

Support emitting CNAME file for publishing at a custom domain #1311

merged 1 commit into from
Sep 6, 2020

Conversation

dtolnay
Copy link
Member

@dtolnay dtolnay commented Sep 2, 2020

This PR adds a cname configuration to [output.html] which is rendered into a CNAME file in the root of the generated site as required by GitHub Pages (see Managing a custom domain for your GitHub Pages site).

[output.html]
cname = "serde.rs"

The CNAME file is how GitHub knows which repo's site to serve when someone visits your domain. DNS records only point from domain (serde.rs) to domain (serde-rs.github.io), so the additional information is required to know that serde-rs.github.io/serde (i.e. the Pages site for github.com/serde-rs/serde) is the right repo to serve for that domain.

Copy link
Contributor

@ehuss ehuss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants