Nap Joseph Calub

Software Engineer and Open Source Enthusiast

Using Hugo on Gitpod

Published on July 31, 2020

Hugo

Create the necessary Gitpod files on the root of your repository.

$ touch .gitpod.Dockerfile
$ touch .gitpod.yml

.gitpod.Dockerfile

1FROM gitpod/workspace-full
2
3USER root
4
5RUN apt-get update && apt-get install -yq hugo

.gitpod.yml

1image:
2 file: .gitpod.Dockerfile
3
4tasks:
5 - command: 'hugo server --baseUrl $(gp url 1313) --appendPort=false'
6
7ports:
8 - port: 1313
9 onOpen: open-preview

After commiting and merging your code, you can then go to https://gitpod.io/#https://github.com/<YOUR_USERNAME>/<YOUR_REPO_NAME> to start your Gitpod workspace.

Optionally, you can also add a Gitpod badge on your README file:

README.md

1[![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/<YOUR_USERNAME>/<YOUR_REPO_NAME>)

####Sources

Setup configuration was copied from esttech/theia-dev-conf.

© 2021 Nap Joseph Calub. All rights reserved.

Light Mode
Dark Mode