Unleash awesomeness. Private packages, team management tools, and powerful integrations. Get started with npm Orgs »

hugo-bin

0.41.0 • Public • Published

hugo-bin Build Status dependencies Status devDependencies Status

Binary wrapper for Hugo

Install

npm install --save-dev hugo-bin

hugo-bin now supports the Extended Hugo version. See Installation options for more details.

Usage

API

const execFile = require('child_process').execFile;
const hugo = require('hugo-bin');
 
execFile(hugo, ['version'], (err, stdout) => {
  console.log(stdout);
});

CLI

$(npm bin)/hugo --help
npm run create -- 'post/my-new-post' # see below 'npm-run-script' 

npm-run-script

{
  "scripts": {
    "build": "hugo",
    "create": "hugo new",
    "serve": "hugo server -ws"
  }
}

See the Hugo Documentation for more information.

Installation options

hugo-bin supports options to change the variation of Hugo binaries.

Each option can be configured in the hugo-bin section of your package.json:

{
  "name": "your-package",
  "version": "0.0.1",
  "hugo-bin": {
    "buildTags": "extended"
  }
}

Also as local or global .npmrc configuration file:

hugo_bin_build_tags = "extended"

Also as an environment variable:

export HUGO_BIN_BUILD_TAGS="extended"

Note that you have to run npm install hugo-bin to re-install hugo-bin itself, if you change any of these options.

Options

buildTags

Default: ""

Set it 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.

Supported versions

See the package.json commit history.

Full example

Super Inspired By

License

MIT © Shun Sato

Keywords

none

install

npm i hugo-bin

Downloadsweekly downloads

5,198

version

0.41.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
Report a vulnerability