Skip to content

Commit 3a69733

Browse files
authoredSep 26, 2022
Hugo updated
Signed-off-by: GitHub <[email protected]>
1 parent c977ad1 commit 3a69733

File tree

3 files changed

+98
-2618
lines changed

3 files changed

+98
-2618
lines changed
 

‎.devcontainer/Dockerfile

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Update the NODE_VERSION arg in docker-compose.yml to pick a Node version: 18, 16, 14
2+
ARG NODE_VERSION=16
3+
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${NODE_VERSION}
4+
5+
# VARIANT can be either 'hugo' for the standard version or 'hugo_extended' for the extended version.
6+
ARG VARIANT=hugo
7+
# VERSION can be either 'latest' or a specific version number
8+
ARG VERSION=latest
9+
10+
# Download Hugo
11+
RUN apt-get update && apt-get install -y ca-certificates openssl git curl && \
12+
rm -rf /var/lib/apt/lists/* && \
13+
case ${VERSION} in \
14+
latest) \
15+
export VERSION=$(curl -s https://api.github.com/repos/gohugoio/hugo/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4)}') ;;\
16+
esac && \
17+
echo ${VERSION} && \
18+
case $(uname -m) in \
19+
aarch64) \
20+
export ARCH=ARM64 ;; \
21+
*) \
22+
export ARCH=64bit ;; \
23+
esac && \
24+
echo ${ARCH} && \
25+
wget -O ${VERSION}.tar.gz https://github.com/gohugoio/hugo/releases/download/v${VERSION}/${VARIANT}_${VERSION}_Linux-${ARCH}.tar.gz && \
26+
tar xf ${VERSION}.tar.gz && \
27+
mv hugo /usr/bin/hugo
28+
29+
# Hugo dev server port
30+
EXPOSE 1313
31+
32+
# [Optional] Uncomment this section to install additional OS packages you may want.
33+
#
34+
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
35+
# && apt-get -y install --no-install-recommends <your-package-list-here>
36+
37+
# [Optional] Uncomment if you want to install more global node packages
38+
# RUN sudo -u node npm install -g <your-package-list-here>

‎.devcontainer/devcontainer.json

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/hugo
3+
{
4+
"name": "Hugo (Community)",
5+
"build": {
6+
"dockerfile": "Dockerfile",
7+
"args": {
8+
// Update VARIANT to pick hugo variant.
9+
// Example variants: hugo, hugo_extended
10+
// Rebuild the container if it already exists to update.
11+
"VARIANT": "hugo_extended",
12+
// Update VERSION to pick a specific hugo version.
13+
// Example versions: latest, 0.73.0, 0,71.1
14+
// Rebuild the container if it already exists to update.
15+
"VERSION": "latest",
16+
// Update NODE_VERSION to pick the Node.js version: 12, 14
17+
"NODE_VERSION": "14"
18+
}
19+
},
20+
21+
// Configure tool-specific properties.
22+
"customizations": {
23+
// Configure properties specific to VS Code.
24+
"vscode": {
25+
// Set *default* container specific settings.json values on container create.
26+
"settings": {
27+
"html.format.templating": true
28+
},
29+
30+
// Add the IDs of extensions you want installed when the container is created.
31+
"extensions": [
32+
"bungcip.better-toml",
33+
"davidanson.vscode-markdownlint"
34+
]
35+
}
36+
},
37+
38+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
39+
"forwardPorts": [
40+
1313
41+
],
42+
43+
// Use 'postCreateCommand' to run commands after the container is created.
44+
// "postCreateCommand": "uname -a",
45+
46+
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
47+
"remoteUser": "node"
48+
}

‎package-lock.json

+12-2,618
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
Please sign in to comment.