Skip to content

Commit b5275af

Browse files
authored
Add devcontainer
1 parent 2412512 commit b5275af

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed

.devcontainer/Containerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM ghcr.io/gbraad-redhat/hugo:0.127.0
2+
3+
RUN dnf install -y git-core \
4+
&& dnf clean all \
5+
&& rm -rf /var/cache/yum

.devcontainer/devcontainer.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"name": "Hugo environment",
3+
"build": {
4+
"dockerfile": "Containerfile"
5+
},
6+
7+
"customizations": {
8+
"vscode": {
9+
"extensions": [
10+
]
11+
}
12+
}
13+
}

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,16 @@ $ cd blog
1717
$ git submodule update --init
1818
$ podman run --rm -v $PWD:/workspace ghcr.io/gbraad-redhat/hugo:0.127.0 --minify
1919
```
20+
21+
This will create a `./public/` folder that contains the output as published on GH Pages.
22+
23+
24+
### Devcontainer
25+
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.
26+
27+
This can be started from CodeSpaces, VS Code or the CLI
28+
29+
```
30+
$ npm install -g @devcontainers/cli
31+
$ devconatiner up
32+
```

0 commit comments

Comments
 (0)