mirror of
				https://github.com/jakejarvis/hugo-extended.git
				synced 2025-10-31 03:56:05 -04:00 
			
		
		
		
	
			
				
					
						
					
					53bb1ab4db597f9ffa15ab235c99972c70967248
				
			
			
		
	 via NPM
 via NPM  
  
  
 
Plug-and-play binary wrapper for Hugo Extended, the awesomest static-site generator.
Install
npm install hugo-extended --save-dev
# or...
yarn add hugo-extended --dev
hugo-extended defaults to the extended version of Hugo on supported platforms, and falls back to vanilla Hugo automatically if unsupported.
Usage
See the Hugo Documentation for additional functionality.
package.json
{
  "scripts": {
    "build": "hugo",
    "start": "hugo serve",
    "create": "hugo new"
  }
}
CLI:
$(npm bin)/hugo --help
npm run create -- post/my-new-post.md
or on Windows:
for /f "delims=" %F in ('npm bin') do call "%F\hugo" help
npm run create -- post/my-new-post.md
API
const { execFile } = require('child_process');
const hugo = require('hugo-extended');
execFile(hugo, ['version'], (error, stdout) => {
  if (error) {
    throw error;
  }
  console.log(stdout);
});
Examples
License
Forked from fenneclab/hugo-bin under the MIT License, (c) Shun Sato.
Hugo is distributed under the Apache License 2.0.
					Languages
				
				
								
								
									JavaScript
								
								100%