1
mirror of https://github.com/jakejarvis/hugo-extended.git synced 2025-04-27 04:38:25 -04:00

Update README.md

This commit is contained in:
XhmikosR 2023-03-17 11:12:53 +02:00 committed by GitHub
parent b7b9837c4d
commit 0a6308695b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,16 +2,17 @@
> Binary wrapper for [Hugo](https://gohugo.io/) > Binary wrapper for [Hugo](https://gohugo.io/)
- hugo-bin supports the [Extended Hugo version](https://github.com/gohugoio/hugo/releases/tag/v0.43)
- For usage within corporate networks or behind corporate proxies, the download repository can be overwritten
See [Installation options](#installation-options) for more details.
## Install ## Install
```sh ```sh
npm install hugo-bin --save-dev npm install hugo-bin --save-dev
``` ```
hugo-bin supports the [Extended Hugo version](https://github.com/gohugoio/hugo/releases/tag/v0.43). See [Installation options](#installation-options) for more details.
For usage within corporate networks or behind corporate proxies, the download repository can be overwritten, see [Installation options](#installation-options) for more details.
## Usage ## Usage
### API ### API
@ -31,20 +32,22 @@ execFile(hugo, ['version'], (error, stdout) => {
### CLI ### CLI
#### Unix
```sh ```sh
# older npm # older npm
$(npm bin)/hugo --help $(npm bin)/hugo --help
# newer npm # newer npm (v9+)
npm exec hugo help npm exec hugo help
npm run create -- post/my-new-post.md # see below 'npm run-script' npm run create -- post/my-new-post.md # see below 'npm run-script'
``` ```
or on Windows: #### Windows
```bat ```bat
rem older npm rem older npm
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 newer npm rem newer npm (v9+)
npm exec hugo help npm exec hugo help
rem see below 'npm run-script' rem see below 'npm run-script'
npm run create -- post/my-new-post.md npm run create -- post/my-new-post.md
@ -68,7 +71,9 @@ See the [Hugo Documentation](https://gohugo.io/) for more information.
hugo-bin supports options to change the variation of Hugo binaries and to overwrite the download repository. hugo-bin supports options to change the variation of Hugo binaries and to overwrite the download repository.
Each option can be configured in the `hugo-bin` section of your `package.json`: Each option can be configured in one of the following ways:
### The `hugo-bin` section of your `package.json`
```json ```json
{ {
@ -76,19 +81,19 @@ Each option can be configured in the `hugo-bin` section of your `package.json`:
"version": "0.0.1", "version": "0.0.1",
"hugo-bin": { "hugo-bin": {
"buildTags": "extended", "buildTags": "extended",
"downloadRepo" : "https://some.example.com/artifactory/github-releases" "downloadRepo": "https://some.example.com/artifactory/github-releases"
} }
} }
``` ```
Also as local or global [.npmrc](https://docs.npmjs.com/files/npmrc) configuration file: ### As local or global [.npmrc](https://docs.npmjs.com/files/npmrc) configuration file
```ini ```ini
hugo_bin_build_tags = "extended" hugo_bin_build_tags = "extended"
hugo_bin_download_repo = "https://some.example.com/artifactory/github-releases" hugo_bin_download_repo = "https://some.example.com/artifactory/github-releases"
``` ```
Also as an environment variable: ### As environment variables
```sh ```sh
export HUGO_BIN_BUILD_TAGS="extended" export HUGO_BIN_BUILD_TAGS="extended"
@ -103,7 +108,7 @@ export HUGO_BIN_DOWNLOAD_REPO="https://some.example.com/artifactory/github-relea
Default: `""` Default: `""`
Set it to `extended` to download the [extended version](https://github.com/gohugoio/hugo/releases/tag/v0.43) binary. Set `buildTags` 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. If this is set to `extended` but it's not available for the user's platform, then the normal version will be downloaded instead.
@ -111,7 +116,7 @@ If this is set to `extended` but it's not available for the user's platform, the
Default: `"https://github.com"` Default: `"https://github.com"`
Set it to your corporate proxy url to download the hugo binary from a different download repository. Set it to your proxy URL to download the hugo binary from a different download repository.
## Supported versions ## Supported versions