Skip to content

Setup .gitpod.yml for super simple web based editing and live preview. #134

@bwklein

Description

@bwklein

It might be nice in this repo to provide a starting .gitpod.yml file that will run the example site in GitPod.io.
This would let people clone the site and then jump directly into editing and live preview of their new site without Docker, local installs of anything, etc.

Here is an example that works great with a Hugo+Docsy site I have setup.

image: klakegg/hugo:0.88.0-ext-ubuntu-ci
ports:
  - port: 1313
    onOpen: open-browser
tasks:
  - name: Setup environment and run Hugo server.
    init: |
      git submodule update --init --recursive
      npm install
    command: hugo server --buildDrafts --buildFuture --baseUrl $(gp url 1313) --liveReloadPort=443 --appendPort=false

Because I am using the klakegg/hugo image, I don't need to set --bind=0.0.0.0 as a parameter for the command. Otherwise, the --bind parameter is necessary to get Hugo's Live Reload feature to work correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions