Skip to content

Commit f619d6d

Browse files
Copilotrrrutledge
andcommitted
Fix CSS loading in Codespaces by binding Hugo to 0.0.0.0 and configuring liveReloadPort
Co-authored-by: rrrutledge <[email protected]>
1 parent 086fa12 commit f619d6d

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.devcontainer/devcontainer.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@
2525
}
2626
},
2727
"forwardPorts": [1313],
28+
"portsAttributes": {
29+
"1313": {
30+
"label": "Hugo Server",
31+
"onAutoForward": "openBrowser"
32+
}
33+
},
2834
"remoteUser": "vscode",
2935
"postCreateCommand": "npm install; 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 && npm init -y && npm install hugo-bin@latest && hugo version && echo 'Hugo server ready to run! Use the Run and Debug view to start the server.'"
3036
}

.vscode/launch.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,16 @@
88
"program": "${workspaceFolder}/node_modules/.bin/hugo",
99
"args": [
1010
"server",
11+
"--bind=0.0.0.0",
1112
"--appendPort=false",
1213
"--baseURL=/",
14+
"--liveReloadPort=443",
1315
"-D"
1416
],
1517
"console": "integratedTerminal",
1618
"preLaunchTask": "Hugo: Check Environment",
1719
"serverReadyAction": {
18-
"pattern": "Web Server is available at //localhost:(\\d+)/",
19-
"uriFormat": "http://localhost:%s/",
20+
"pattern": "Web Server is available at",
2021
"action": "openExternally"
2122
}
2223
}

0 commit comments

Comments
 (0)