mirror of
https://github.com/drone-plugins/drone-hugo.git
synced 2026-06-04 18:24:11 +08:00
Updated to the latest Hugo version v.0.37.1, see https://github.com/gohugoio/hugo/releases
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
# cbrgm/drone-hugo
|
||||
|
||||
[](https://github.com/cbrgm/drone-hugo/releases)   [](https://hub.docker.com/r/cbrgm/drone-hugo/tags/)
|
||||
[](https://github.com/cbrgm/drone-hugo/releases) 
|
||||

|
||||
[](https://hub.docker.com/r/cbrgm/drone-hugo/tags/)
|
||||
|
||||
**Automatically create static web page files using Hugo within your drone pipeline!**
|
||||
|
||||
@@ -17,7 +19,7 @@ The example below demonstrates how you can use the plugin to automatically creat
|
||||
```yml
|
||||
pipeline:
|
||||
hugo:
|
||||
image: cbrgm/drone-hugo:latest
|
||||
image: cbrgm/drone-hugo:0.37.1
|
||||
validate: true
|
||||
```
|
||||
|
||||
@@ -30,7 +32,7 @@ You can customize the paths for e. g. the theme, layout, content directory and o
|
||||
```yml
|
||||
pipeline:
|
||||
hugo:
|
||||
image: cbrgm/drone-hugo:latest
|
||||
image: cbrgm/drone-hugo:0.37.1
|
||||
+ config: path/to/config
|
||||
+ content: path/to/content/
|
||||
+ layout: path/to/layout
|
||||
@@ -47,7 +49,7 @@ You can also define a base URL directly in the pipeline, which is used when gene
|
||||
```yml
|
||||
pipeline:
|
||||
hugo:
|
||||
image: cbrgm/drone-hugo:latest
|
||||
image: cbrgm/drone-hugo:0.37.1
|
||||
config: path/to/config
|
||||
content: path/to/content/
|
||||
output: path/to/public
|
||||
@@ -68,7 +70,7 @@ You can set the `buildDrafts`, `buildExpired`, `buildFuture` settings to configu
|
||||
```yml
|
||||
pipeline:
|
||||
hugo:
|
||||
image: cbrgm/drone-hugo:latest
|
||||
image: cbrgm/drone-hugo:0.37.1
|
||||
+ buildDrafts: true
|
||||
+ buildExpired: true
|
||||
+ buildFuture: true
|
||||
@@ -88,7 +90,7 @@ Here is a short example of how to define a pipeline that automatically generates
|
||||
```yml
|
||||
pipeline:
|
||||
build:
|
||||
image: cbrgm/drone-hugo:latest
|
||||
image: cbrgm/drone-hugo:0.37.1
|
||||
output: site # Output path
|
||||
validate: true
|
||||
when:
|
||||
@@ -101,7 +103,6 @@ pipeline:
|
||||
port: 54321
|
||||
target: /var/www/ # Path to your web directory
|
||||
source: site/* # Copy all files from output path
|
||||
|
||||
```
|
||||
|
||||
You can also use secrets to hide credentials:
|
||||
@@ -109,7 +110,7 @@ You can also use secrets to hide credentials:
|
||||
```yml
|
||||
pipeline:
|
||||
build:
|
||||
image: cbrgm/drone-hugo:latest
|
||||
image: cbrgm/drone-hugo:0.37.1
|
||||
output: site # Output path
|
||||
validate: true
|
||||
when:
|
||||
@@ -123,7 +124,6 @@ pipeline:
|
||||
port: 54321
|
||||
target: /var/www/ # Path to your web directory
|
||||
source: site/* # Copy all files from output path
|
||||
|
||||
```
|
||||
|
||||
## Basic Usage using a Docker Container
|
||||
@@ -148,16 +148,16 @@ docker run --rm \
|
||||
|
||||
## Parameter Reference
|
||||
|
||||
`buildDrafts` - include content marked as draft
|
||||
`buildExpired` - include expired content
|
||||
`buildFuture` - include content with publishdate in the future
|
||||
`config` - config file (default is path/config.yaml|json|toml)
|
||||
`content` - filesystem path to content directory
|
||||
`layout` - filesystem path to layout directory
|
||||
`output` - filesystem path to write files to
|
||||
`source` - filesystem path to read files relative from
|
||||
`theme` - theme to use (located in /themes/THEMENAME/)
|
||||
`url` - hostname (and path) to the root
|
||||
`buildDrafts` - include content marked as draft<br>
|
||||
`buildExpired` - include expired content<br>
|
||||
`buildFuture` - include content with publishdate in the future<br>
|
||||
`config` - config file (default is path/config.yaml|json|toml)<br>
|
||||
`content` - filesystem path to content directory<br>
|
||||
`layout` - filesystem path to layout directory<br>
|
||||
`output` - filesystem path to write files to<br>
|
||||
`source` - filesystem path to read files relative from<br>
|
||||
`theme` - theme to use (located in /themes/THEMENAME/)<br>
|
||||
`url` - hostname (and path) to the root<br>
|
||||
`validate` - validate config file before generation
|
||||
|
||||
## Contributing
|
||||
|
||||
Reference in New Issue
Block a user