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

Enable per-PR preview builds in netlify #191

Closed
matalo33 opened this issue Nov 2, 2018 · 6 comments
Closed

Enable per-PR preview builds in netlify #191

matalo33 opened this issue Nov 2, 2018 · 6 comments
Assignees
Labels
enhancement Improvements to existing features

Comments

@matalo33
Copy link
Contributor

matalo33 commented Nov 2, 2018

https://app.netlify.com/sites/learn/settings/deploys

@matalo33 matalo33 self-assigned this Nov 2, 2018
@pgorod
Copy link
Contributor

pgorod commented Nov 2, 2018

This is a setting in Netlify configuration...

I am getting these PR previews in my site which uses Learn Theme, but I believe this particular setting is not part of the theme, because it depends on how you're deploying the site you build with the theme.

This is an excellent Netlify feature, by the way. Do you think anything else needs to be done in the Theme files for this? Or were you just adding this Issue as a "note to self", as a reminder? :-)

@matalo33
Copy link
Contributor Author

This is a note-to-self. I don't think anything needs changing in the theme to achieve this.

@matalo33
Copy link
Contributor Author

Unsetting the environment variable HUGO_BASEURL (was //learn.netlify.com) in netlify builds seems to have fixed preview builds.

I do see an issue with the theme trying to load index.json (for search) without a baseurl. Looking into this before closing ticket but will leave the variable deleted

@pgorod
Copy link
Contributor

pgorod commented Dec 20, 2018

In my site Preview builds (and all other builds) work well, with HUGO_BASEURL set. I also have search working well.

https://github.com/salesagility/SuiteDocs/blob/master/netlify.toml

@matalo33
Copy link
Contributor Author

Excellent, do you give me permission to copy your netlify file?

The original maintainer only configured netlify via the UI and the baseurl was set global, which broke all preview builds.

@pgorod
Copy link
Contributor

pgorod commented Dec 20, 2018

Sure, go ahead.

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

No branches or pull requests

2 participants