mirror of
				https://github.com/jakejarvis/hugo-extended.git
				synced 2025-10-31 00:26:05 -04:00 
			
		
		
		
	
			
				
					
						
					
					0195454bb3e804a825fd0ae3b4e165856ec4e99b
				
			
			
		
	hugo-bin 
Binary wrapper for Hugo
Install
npm install --save-dev hugo-bin
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.
Configuration
This can be form of a hugoBin field in a package.json file.
{
  "name": "some-package",
  "version": "1.0.0",
  "hugoBin": {
    "hugoVersion": "0.15"
  }
}
- hugoVersion- Hugo binary version (defualt: See- hugo-bin/package.jsonfile). The supported version is- >=0.10.
Full example
Super Inspired By
License
MIT © Shun Sato
					Languages
				
				
								
								
									JavaScript
								
								100%
							
						
					