We love Hugo at Forestry.io but we also know the start can be quite tough. To get you started our very own Hugo wizard @chrisdmacrae whipped up this quick step-by-step tutorial to create your first site with Hugo.
To keep the workflow streamlined he’s using his Hugo Boilerplate - if you like it, make sure you’re giving it a git-star.
We also published part II of this series now - Check out how to set up your site with CI & CD http://bit.ly/2DwzrKK
Why do you have users install an entire NodeJS setup? Unless I’m missing something, that’s a completely unnecessary complication. Just run
Hi @lpar, thanks for your input. Our thoughts on that setup: NodeJS is essentially becoming the standard for JAMStack development, so it makes sense to get new Hugo users set up with NodeJS right away so they have an easier time getting into other parts of the JAMStack. Because of that we assume a lot of our readers are set up with it already and enjoy working with it. Another reason why we think NodeJS is important is that Hugo doesn’t offer any asset processing (the Hugo-Boilerplate does) which is important from a modern web development stand point and if you actually want to go into production with your website.
A base set of asset processing will be implemented in one the coming Hugo releases.
Seems to me if you’re going to assume the users will be wanting to work in Node, you’d be better off teaching them how to use a NodeJS static site generator that will integrate better with all the other stuff you expect them to run.
Where is hugo being declared and how can we remove hugo-bin and instead look for the local hugo version? I’m not fan of that dependency since it’s typically always behind.
@Randy_Lough - I just tried a few things that I thought could work but, it seems to me that at the moment it is not possible to lift that dependency easily. The author, @chrisdmacrae, might know more, otherwise I’d invite you to add an issue to the GitHub project so it can be discussed further.
I got it to work without it.
For people coming across this: change
import hugo from "hugo-bin" to
const hugo = 'hugo' and delete
hugo-bin in package.json
Here is Part II of this series. @chrisdmacrae shows you how to set your Hugo (or any) site up with Continuous Integration & Continuous Delivery using GitHub, Husky and Forestry CMS.