You've already forked hugo-extended
mirror of
https://github.com/jakejarvis/hugo-extended.git
synced 2025-07-03 19:16:37 -04:00
Update README.md
This commit is contained in:
14
README.md
14
README.md
@ -5,7 +5,7 @@
|
|||||||
## Install
|
## Install
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
npm install --save-dev hugo-bin
|
npm install hugo-bin --save-dev
|
||||||
```
|
```
|
||||||
|
|
||||||
hugo-bin now supports the [Extended Hugo version](https://github.com/gohugoio/hugo/releases/tag/v0.43). See [Installation options](#installation-options) for more details.
|
hugo-bin now supports the [Extended Hugo version](https://github.com/gohugoio/hugo/releases/tag/v0.43). See [Installation options](#installation-options) for more details.
|
||||||
@ -15,10 +15,14 @@ hugo-bin now supports the [Extended Hugo version](https://github.com/gohugoio/hu
|
|||||||
### API
|
### API
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const execFile = require('child_process').execFile;
|
const { execFile } = require('child_process');
|
||||||
const hugo = require('hugo-bin');
|
const hugo = require('hugo-bin');
|
||||||
|
|
||||||
execFile(hugo, ['version'], (err, stdout) => {
|
execFile(hugo, ['version'], (error, stdout) => {
|
||||||
|
if (error) {
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
|
||||||
console.log(stdout);
|
console.log(stdout);
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
@ -27,10 +31,10 @@ execFile(hugo, ['version'], (err, stdout) => {
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
$(npm bin)/hugo --help
|
$(npm bin)/hugo --help
|
||||||
npm run create -- 'post/my-new-post' # see below 'npm-run-script'
|
npm run create -- 'post/my-new-post' # see below 'npm run-script'
|
||||||
```
|
```
|
||||||
|
|
||||||
### npm-run-script
|
### npm run-script
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user