🌜
🌞
hugo-bin

hugo-bin

v0.89.0

Binary wrapper for Hugo

npm install hugo-bin

README

hugo-bin npm version Build Status

Binary wrapper for Hugo

Install

npm install hugo-bin --save-dev

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

Usage

API

import { execFile } from 'node:child_process';
import hugo from 'hugo-bin';

execFile(hugo, ['version'], (error, stdout) => {
  if (error) {
    throw error;
  }

  console.log(stdout);
});

CLI

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

or on Windows:

for /f "delims=" %F in ('npm bin') do call "%F\hugo" help
rem see below 'npm run-script'
npm run create -- post/my-new-post.md

npm run-script

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

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.

Super Inspired By

License

MIT © Shun Sato

General

License
MIT
Typescript Types
None found
Tree-shakeable
Yes

Popularity

GitHub Stargazers
72
Community Interest
96
Number of Forks
21

Maintenance

Commits
10/219/22025
Last Commit
Jun 16, 2022
Open Issues
7
Closed Issues
29
Open Pull Requests
1
Closed Pull Requests
10

Versions

Versions Released
10/219/2209
Latest Version Released
Current Tags
latest0.89.0

Dependencies

Dependencies (4)
Dev Dependencies (3)

Contributors

XhmikosR
XhmikosR
Commits: 262
satoshun00
satoshun00
Commits: 100
bbodine1
bbodine1
Commits: 2
MattSturgeon
MattSturgeon
Commits: 1
tygerbytes
tygerbytes
Commits: 1
real34
real34
Commits: 1