Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Binary wrapper for Hugo
See Installation options for more details.
npm install hugo-bin --save-dev
import { execFile } from 'node:child_process';
import hugoPath from 'hugo-bin';
execFile(hugoPath, ['version'], (error, stdout) => {
if (error) {
throw error;
}
console.log(stdout);
});
npm exec hugo help
npm run create -- post/my-new-post.md # see below 'npm run-script'
npm exec hugo help
rem see below 'npm run-script'
npm run create -- post/my-new-post.md
{
"scripts": {
"build": "hugo",
"create": "hugo new",
"serve": "hugo server"
}
}
See the Hugo Documentation for more information.
hugo-bin supports options to change the variation of Hugo binaries, to overwrite the download repository and the Hugo version.
Each option can be configured in one of the following ways:
hugo-bin
section of your package.json
{
"name": "your-package",
"version": "0.0.1",
"hugo-bin": {
"buildTags": "extended",
"downloadRepo": "https://some.example.com/artifactory/github-releases",
"version": "0.124.1"
}
}
hugo_bin_build_tags = "extended"
hugo_bin_download_repo = "https://some.example.com/artifactory/github-releases"
hugo_bin_hugo_version = "0.124.1"
On Linux/macOS:
export HUGO_BIN_BUILD_TAGS="extended"
export HUGO_BIN_DOWNLOAD_REPO="https://some.example.com/artifactory/github-releases"
export HUGO_BIN_HUGO_VERSION="0.124.1"
On Windows:
set HUGO_BIN_BUILD_TAGS=extended
set HUGO_BIN_DOWNLOAD_REPO=https://some.example.com/artifactory/github-releases
set HUGO_BIN_HUGO_VERSION=0.124.1
Note that you have to run npm install hugo-bin
to re-install hugo-bin itself, if you change any of these options.
string
""
Set buildTags
to extended
to download the extended version binary.
If this is set to extended
but it's not available for the user's platform, then the normal version will be downloaded instead.
string
"https://github.com"
Set it to your proxy URL to download the hugo binary from a different download repository.
string
You can override the Hugo version here. Please note that if any of the URLs have changed upstream, you might not be able to use any version and you will probably need to update to a newer hugo-bin version which takes into consideration the new URLs.
See the package.json commit history.
MIT © Shun Sato
FAQs
Binary wrapper for Hugo
The npm package hugo-bin receives a total of 64,777 weekly downloads. As such, hugo-bin popularity was classified as popular.
We found that hugo-bin demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.