1
0
mirror of https://github.com/tektoncd/catalog.git synced 2024-11-24 06:15:46 +00:00
catalog/task/hugo/0.1
Sumeet Parmar 962bb64bdc * task: added hugo (#1)
* first submission

* changed to non npm source repo

* added params to the hugo task

* added readme

* removed platform restriction doc

* updated task and readme

* added task description

* used fully qualified registry name for docker image

* updated OWNERS

* tagged image with digest

* updated `apiVersion` to `v1` from `v1beta1`
2024-03-29 20:00:39 +00:00
..
tests * task: added hugo (#1) 2024-03-29 20:00:39 +00:00
hugo.yaml * task: added hugo (#1) 2024-03-29 20:00:39 +00:00
README.md * task: added hugo (#1) 2024-03-29 20:00:39 +00:00

Hugo

Hugo is a static site generator written in Go. It is optimized for speed, easy use and configurability. Hugo takes a directory with content and templates and renders them into a full html website.

This tekton task generates a Hugo site. For 0.1 is only supports hugo modules.

Installing the Task

You can install the task with the following command:

kubectl apply -f https://raw.githubusercontent.com/tektoncd/catalog/main/task/hugo/0.1/hugo.yaml

Parameters

  • content-dir: The directory where the content is located. (default: "")
  • minify: Minify the output. (default: false)
  • base-url: The base URL for the site. (default: "")
  • verbose: Print verbose output. (default: false)

Workspaces

  • work-dir: The directory where hugo will be run. It should contain the config.toml file and the content and layouts directories.

Results

  • output: The directory where the generated site is located.

Usage

apiVersion: tekton.dev/v1
kind: Pipeline
metadata:
  name: hugo-task-test-pipeline
spec:
  workspaces:
    - name: work-dir

  tasks:
    - name: fetch-repository
      taskRef:
        name: git-clone
      workspaces:
        - name: output
          workspace: work-dir
      params:
        - name: url
          value: "https://github.com/shipit/hugotenberg.git"
        - name: subdirectory
          value: ""
        - name: deleteExisting
          value: "true"

    - name: build-project
      runAfter:
        - fetch-repository
      taskRef:
        name: hugo
      workspaces:
        - name: work-dir
          workspace: work-dir

Platforms

The Task can be run on linux/amd64 platform.