Strikes me that scoop is like a poor man’s chocolatey. Oddly enough it is also rather like a poor-man’s npm.
I don’t see that it would be that difficult to build an npm-based installer and runner for Hugo. I already have a package.json
file (npm’s configuration file) for running Hugo server, building a site and building a template. I did start to try to create a script to download the latest version of Hugo from GitHub as well but then the format changed somewhat and it broke the script so possibly not so sustainable.
Happy to share the package.json though anyone who has ever used npm would easily be able to create their own.
So my take on this is that we need a Node.JS, cross-platform script that takes parameters to download the latest version but we would also need an agreed folder layout so that everything works in a consistent way.
Happy to coordinate something if there was enough interest but I’m afraid I’ve too many projects running to take on developing the script.
Here is my package.json
in case anyone is interested. I’m just using npm as a task runner.
{
"name": "itblog",
"version": "1.0.1",
"description": "Julian Knight's IT Blog (Much Ado About IT)",
"scripts": {
"start": "C:/src/Hugo/bin/hugo.exe server -D --disableFastRender",
"build": "C:/src/Hugo/bin/hugo",
"build-theme": "cd ./themes/twenty-sixteen; C:/src/Hugo/bin/hugo",
"hugo-version": "C:/src/Hugo/bin/hugo version",
"test": "echo \"No tests available\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+ssh://git@gitlab.com/TotallyInformation/itblog.git"
},
"keywords": [
"Hugo"
],
"author": "Julian Knight (Totally Information)",
"license": "MIT",
"bugs": {
"url": "https://gitlab.com/TotallyInformation/itblog/issues"
},
"homepage": "https://gitlab.com/TotallyInformation/itblog#README",
"dependencies": {
"scrape-twitter": "^0.11.0",
"bulma": "^0.7.1"
}
}
As you will see, all my dev files live under the C:\src
folder. Hugo sites live under c:\src\Hugo
which also contains the bin
folder. twenty-sixteen
is my theme and it uses the Bulma CSS framework.