Skip to content

Commit 1ed2cfd

Browse files
Copilotyuhattor
andcommitted
Fix Codespaces configuration to properly install Hugo
Co-authored-by: yuhattor <15963767+yuhattor@users.noreply.github.com>
1 parent 7e6b92d commit 1ed2cfd

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

.devcontainer/devcontainer.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
{
22
"name": "Hugo (InnerSource Commons Website)",
3-
"image": "hugomods/hugo:base-0.133.1",
3+
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
44
"features": {
5-
"ghcr.io/devcontainers/features/git:1": {}
5+
"ghcr.io/devcontainers/features/git:1": {},
6+
"ghcr.io/devcontainers/features/node:1": {
7+
"version": "lts"
8+
}
69
},
710
"customizations": {
811
"vscode": {
@@ -20,6 +23,6 @@
2023
}
2124
},
2225
"forwardPorts": [1313],
23-
"remoteUser": "root",
24-
"postCreateCommand": "which hugo && hugo version && echo 'Hugo server ready to run! Use the Run and Debug view to start the server.'"
26+
"remoteUser": "vscode",
27+
"postCreateCommand": "cd /tmp && wget -O hugo.deb https://github.com/gohugoio/hugo/releases/download/v0.133.1/hugo_extended_0.133.1_linux-amd64.deb && sudo dpkg -i hugo.deb && rm hugo.deb && hugo version && echo 'Hugo server ready to run! Use the Run and Debug view to start the server.'"
2528
}

CODESPACES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ If you encounter any issues:
7575
- **Hugo server not starting**: Try restarting the Codespace by clicking on the menu in the bottom left corner and selecting "Codespaces: Stop Current Codespace" and then restarting it.
7676
- **Changes not showing**: Make sure you've saved your files and that the Hugo server is running.
7777
- **Port not forwarding**: Click the "Ports" tab at the bottom of the Codespace and make sure port 1313 is forwarded.
78+
- **Container in recovery mode**: If you see a message about the container running in recovery mode, click the "Rebuild Container" button in the notification or run the "Codespaces: Rebuild Container" command from the command palette (F1).
7879

7980
## Getting Help
8081

0 commit comments

Comments
 (0)