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

Simplify setup: install Hugo automatically (and get the right version) using NPM #841

Merged
merged 3 commits into from
Jan 19, 2022

Conversation

chalin
Copy link
Collaborator

@chalin chalin commented Jan 17, 2022

This PR introduces the use of the hugo-extended package, a "Plug-and-play binary wrapper for Hugo Extended".

By doing so we reduce the burden on contributors: the right version and variant (extended edition), gets fetched automatically when npm install is run. Also, from now on, every version of the website will be associated to the version of Hugo needed to build it, and npm will fetch the proper version on an install.

@LisaFC @emckean et all - WDYT? If you agree with this change, I'll make followup PRs to update the README, etc.

@chalin chalin added the CI/infra CI & infrastructure label Jan 17, 2022
I believe that we had to make an explicit call to `npm install` before, because the project wasn't using any NPM packages. We are now, so this removed the (now) redundant `npm install` command.
@chalin
Copy link
Collaborator Author

chalin commented Jan 17, 2022

@LisaFC @emckean - can either of you grant me the permissions to clear the Neltify deploy caches, or clear the cache and restart the deploy for this PR? I'd like to ensure that the build will pass (which it is now), even when run from an empty deploy cache. Thanks!

@deining deining added the netlify Tasks for Netlify label Jan 18, 2022
@emckean
Copy link
Collaborator

emckean commented Jan 18, 2022

glorious! I like the idea of making the default easy :)

I don't have Netlify privileges (I don't think ...) though

@chalin
Copy link
Collaborator Author

chalin commented Jan 18, 2022

Thanks for the feedback @emckean.

We can merge this w/o the cache-clearing test.

Can I go ahead and merge?

@chalin
Copy link
Collaborator Author

chalin commented Jan 18, 2022

Just to be clear: if ever there's an issue with the cache, it won't have to do with the hugo-extended package, but rather the simplifications I've done to netlify.toml, which I can easily revert if ever an issue surfaces.

@chalin
Copy link
Collaborator Author

chalin commented Jan 19, 2022

I'm going to take @emckean's "glorious" comment as an approval and merge this. :)

@chalin chalin merged commit 3900a6d into google:master Jan 19, 2022
@chalin chalin deleted the chalin-hugo-extended-npm-2022-01-17 branch January 19, 2022 09:41
@chalin
Copy link
Collaborator Author

chalin commented Jan 19, 2022

And the production build and deploy is green:

image

@LisaFC
Copy link
Collaborator

LisaFC commented Jan 19, 2022

This is great, thanks! Let me know if there's anything I need to do with my Netlify privileges, but it doesn't look like it as the production build is working.

@chalin
Copy link
Collaborator Author

chalin commented Jan 19, 2022

If you agree with this change, I'll make followup PRs to update the README, etc.

Hmm, I just realized that the README in this project doesn't describe how to build docsy and the user guide. We should change that: let's discuss this in #846.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/infra CI & infrastructure netlify Tasks for Netlify
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants