Closed verythorough closed 7 years ago
I thought the bundled binaries were for the CI server. My workflow is to cd to site, create the incident and use npm start instead of hugo build but I agree, there is room for improvement.
Certainly the bundled binaries avoid CI server issues, but we might as well use them to avoid local user issues, too. By leveraging bundled binaries, we don't need to make sure users are running the proper Hugo version locally, or even if they have Hugo installed at all.
The machine I'm on right now has 0.21 installed globally, so when I run the command above, it errors out. Since the required binary is already included in the repo, the fastest way to avoid that issue is to run
../bin/hugo_0.24.1_darwin_amd64 new incidents/whatever.md
but that's a messy instruction to give users, especially since it varies by OS. We already have OS handling built into the gulpfile, so we might as well leverage it for this, too.
Regarding the directory switching, I was using yarn instead of npm, and yarn complains that it can't find the package.json if you're not in the repo root. Hadn't tried yet with npm. Good to know that works without changing directory. :)
- Do you want to request a feature or report a bug? feature
- What is the current behavior? Current instructions direct users to create new incidents by running:
This runs the user's global version of Hugo, which loses the advantage of having the Hugo binary bundled directly in the repo. Also, changing into the site directory for this command, then having to change back out to build the site seems like an unnecessary hassle.
- What is the desired behavior? A specialized gulp task could leverage the bundled binaries and run directly from the repo root. If someone want to get really fancy, this could include the interactive prompts suggested in #16 as well.