mirror of
https://github.com/jakejarvis/hugo-extended.git
synced 2025-04-28 03:20:30 -04:00
update readme, license, etc.
This commit is contained in:
parent
cb88ac1257
commit
9d5f8ac522
@ -1,6 +1,6 @@
|
|||||||
The MIT License (MIT)
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2016 FennecLab
|
Copyright (c) 2020-present Jake Jarvis <jake@jarv.is>, (c) 2016 FennecLab.
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
100
README.md
100
README.md
@ -1,14 +1,16 @@
|
|||||||
# hugo-bin [](https://www.npmjs.com/package/hugo-bin) [](https://travis-ci.org/fenneclab/hugo-bin) [](https://david-dm.org/fenneclab/hugo-bin) [](https://david-dm.org/fenneclab/hugo-bin?type=dev)
|
# hugo-node [](.github/workflows) [](https://github.com/gohugoio/hugo) [](https://github.com/jakejarvis/hugo-node/pulls?q=is%3Apr+label%3Adependencies)
|
||||||
|
|
||||||
> Binary wrapper for [Hugo](https://gohugo.io/)
|
> Plug-and-play binary wrapper for [Hugo](https://gohugo.io/), the awesomest static-site generator.
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
npm install hugo-bin --save-dev
|
npm install hugo-node --save-dev
|
||||||
|
# or...
|
||||||
|
yarn add hugo-node --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-node` defaults to the [extended version](https://gohugo.io/getting-started/installing/#linux) of Hugo on [supported platforms](https://github.com/gohugoio/hugo/releases), and falls back to vanilla Hugo automatically if unsupported.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
@ -16,7 +18,7 @@ hugo-bin now supports the [Extended Hugo version](https://github.com/gohugoio/hu
|
|||||||
|
|
||||||
```js
|
```js
|
||||||
const { execFile } = require('child_process');
|
const { execFile } = require('child_process');
|
||||||
const hugo = require('hugo-bin');
|
const hugo = require('hugo-node');
|
||||||
|
|
||||||
execFile(hugo, ['version'], (error, stdout) => {
|
execFile(hugo, ['version'], (error, stdout) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
@ -27,88 +29,40 @@ execFile(hugo, ['version'], (error, stdout) => {
|
|||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
### CLI
|
### package.json
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"scripts": {
|
||||||
|
"build": "hugo",
|
||||||
|
"start": "hugo serve",
|
||||||
|
"create": "hugo new"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### CLI
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$(npm bin)/hugo --help
|
$(npm bin)/hugo --help
|
||||||
npm run create -- post/my-new-post.md # see below 'npm run-script'
|
npm run create -- post/my-new-post.md
|
||||||
```
|
```
|
||||||
|
|
||||||
or on Windows:
|
or on Windows:
|
||||||
|
|
||||||
```bat
|
```bat
|
||||||
for /f "delims=" %F in ('npm bin') do call "%F\hugo" help
|
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 create -- post/my-new-post.md
|
||||||
```
|
```
|
||||||
|
|
||||||
### npm run-script
|
See the [Hugo Documentation](https://gohugo.io/documentation/) for additional functionality.
|
||||||
|
|
||||||
```json
|
## Examples
|
||||||
{
|
|
||||||
"scripts": {
|
|
||||||
"build": "hugo",
|
|
||||||
"create": "hugo new",
|
|
||||||
"serve": "hugo server"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
See the [Hugo Documentation](https://gohugo.io/) for more information.
|
- [jakejarvis/jarv.is](https://github.com/jakejarvis/jarv.is)
|
||||||
|
|
||||||
## 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`:
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"name": "your-package",
|
|
||||||
"version": "0.0.1",
|
|
||||||
"hugo-bin": {
|
|
||||||
"buildTags": "extended"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
Also as local or global [.npmrc](https://docs.npmjs.com/files/npmrc) configuration file:
|
|
||||||
|
|
||||||
```ini
|
|
||||||
hugo_bin_build_tags = "extended"
|
|
||||||
```
|
|
||||||
|
|
||||||
Also as an environment variable:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
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](https://github.com/gohugoio/hugo/releases/tag/v0.43) 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](https://github.com/fenneclab/hugo-bin/commits/master/package.json).
|
|
||||||
|
|
||||||
## Full example
|
|
||||||
|
|
||||||
- [fenneclab/blog.fenneclab.com](https://github.com/fenneclab/blog.fenneclab.com)
|
|
||||||
|
|
||||||
## Super Inspired By
|
|
||||||
|
|
||||||
- [mastilver/apex-bin](https://github.com/mastilver/apex-bin)
|
|
||||||
- [imagemin/jpegtran-bin](https://github.com/imagemin/jpegtran-bin)
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
MIT © [Shun Sato](http://blog.fenneclab.com/)
|
Forked from [fenneclab/hugo-bin](https://github.com/fenneclab/hugo-bin) under the [MIT License](https://github.com/fenneclab/hugo-bin/blob/master/LICENSE), (c) [Shun Sato](http://blog.fenneclab.com/).
|
||||||
|
|
||||||
|
Hugo is distributed under the [Apache License 2.0](https://github.com/gohugoio/hugo/blob/master/LICENSE).
|
||||||
|
11
package.json
11
package.json
@ -1,10 +1,19 @@
|
|||||||
{
|
{
|
||||||
"name": "@jakejarvis/hugo",
|
"name": "hugo-node",
|
||||||
"version": "0.63.2",
|
"version": "0.63.2",
|
||||||
"hugoVersion": "0.63.2",
|
"hugoVersion": "0.63.2",
|
||||||
"description": "Binary wrapper for Hugo",
|
"description": "Binary wrapper for Hugo",
|
||||||
"repository": "jakejarvis/hugo-node",
|
"repository": "jakejarvis/hugo-node",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"keywords": [
|
||||||
|
"hugo",
|
||||||
|
"gohugoio",
|
||||||
|
"cli",
|
||||||
|
"bin",
|
||||||
|
"binary",
|
||||||
|
"wrapper",
|
||||||
|
"static site generator"
|
||||||
|
],
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
"hugo": "cli.js"
|
"hugo": "cli.js"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user