Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add devcontainer #25

Merged
merged 1 commit into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .devcontainer/Containerfile
Original file line number Diff line number Diff line change
@@ -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
13 changes: 13 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "Hugo environment",
"build": {
"dockerfile": "Containerfile"
},

"customizations": {
"vscode": {
"extensions": [
]
}
}
}
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```