From b5275afb961197a1f8d140e50e4d6a1ef3969b18 Mon Sep 17 00:00:00 2001 From: Gerard Braad Date: Tue, 26 Nov 2024 14:33:38 +0000 Subject: [PATCH] Add devcontainer --- .devcontainer/Containerfile | 5 +++++ .devcontainer/devcontainer.json | 13 +++++++++++++ README.md | 13 +++++++++++++ 3 files changed, 31 insertions(+) create mode 100644 .devcontainer/Containerfile create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/Containerfile b/.devcontainer/Containerfile new file mode 100644 index 0000000..0490c17 --- /dev/null +++ b/.devcontainer/Containerfile @@ -0,0 +1,5 @@ +FROM ghcr.io/gbraad-redhat/hugo:0.127.0 + +RUN dnf install -y git-core \ + && dnf clean all \ + && rm -rf /var/cache/yum \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..c9b8a54 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,13 @@ +{ + "name": "Hugo environment", + "build": { + "dockerfile": "Containerfile" + }, + + "customizations": { + "vscode": { + "extensions": [ + ] + } + } +} \ No newline at end of file diff --git a/README.md b/README.md index 1d9e87e..d02c2b4 100644 --- a/README.md +++ b/README.md @@ -17,3 +17,16 @@ $ cd blog $ git submodule update --init $ podman run --rm -v $PWD:/workspace ghcr.io/gbraad-redhat/hugo:0.127.0 --minify ``` + +This will create a `./public/` folder that contains the output as published on GH Pages. + + +### Devcontainer +You can also use the devcontainer setup. This will start the generation container and allows you to use the `hugo` command line directlky from inside the editor. + +This can be started from CodeSpaces, VS Code or the CLI + +``` +$ npm install -g @devcontainers/cli +$ devconatiner up +``` \ No newline at end of file