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

Fix for gh-pages remove CNAME file for custom domain #3160

Merged
merged 3 commits into from
Dec 14, 2017
Merged

Fix for gh-pages remove CNAME file for custom domain #3160

merged 3 commits into from
Dec 14, 2017

Conversation

boda-sh
Copy link
Contributor

@boda-sh boda-sh commented Dec 8, 2017

So many people struggles with the fact gh-pages remove CNAME file in public directory, see these open issues.

If the user wants to use custom domain for their user.github.io, then the change in the package.json script will avoid this issue.

@gatsbybot
Copy link
Collaborator

gatsbybot commented Dec 8, 2017

Deploy preview ready!

Built with commit dfddbf2

https://deploy-preview-3160--gatsbygram.netlify.com

@gatsbybot
Copy link
Collaborator

Deploy preview ready!

Built with commit ea1469d

https://deploy-preview-3160--using-drupal.netlify.com

Copy link
Contributor

@KyleAMathews KyleAMathews left a comment

Choose a reason for hiding this comment

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

Thanks for improving the docs here! Just make the change to suggest using the static folder and I'll merge this.

Like with project sites, add `gh-pages` as a `devDependency` and add a `deploy`
script to your site's `package.json` file:

```
"scripts": {
"deploy": "gatsby build && gh-pages -d public --branch master",
 "deploy": "gatsby build && cp CNAME public/ && gh-pages -d public --branch master",
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi Kyle, that would mean the CNAME file would be under the static/ folder, for custom domain to work, CNAME has to be under the root folder

Copy link
Contributor

Choose a reason for hiding this comment

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

@BODAZ Files you place in you project static directory are copied to root output directory /public (not /public/static) so it's perfect place for it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@pieh 👍 thanks, I misread the docs 😞

@KyleAMathews KyleAMathews merged commit b16667e into gatsbyjs:master Dec 14, 2017
@KyleAMathews
Copy link
Contributor

Thanks!

@jlengstorf
Copy link
Contributor

Hiya @BODAZ! 👋

This is definitely late, but on behalf of the entire Gatsby community, I wanted to say thank you for being here.

Gatsby is built by awesome people like you. Let us say “thanks” in two ways:

  1. We’d like to send you some Gatsby swag. As a token of our appreciation, you can go to the Gatsby Swag Store and log in with your GitHub account to get a coupon code good for one free piece of swag. (We’ve got t-shirts and hats, plus some socks that are really razzing our berries right now.)
  2. If you’re not already part of it, we just invited you to join the Gatsby organization on GitHub. This will add you to our team of maintainers. You’ll receive an email shortly asking you to confirm. By joining the team, you’ll be able to label issues, review pull requests, and merge approved pull requests.

If you have questions, please don’t hesitate to reach out to us: tweet at @gatsbyjs and we’ll come a-runnin’.

Thanks again! 💪💜

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.

5 participants