diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..49a2dfb --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,29 @@ +FROM mcr.microsoft.com/vscode/devcontainers/ruby:0-2 + +# ENV Variables required by Jekyll +ENV LANG=en_US.UTF-8 \ + LANGUAGE=en_US:en \ + TZ=Etc/UTC \ + LC_ALL=en_US.UTF-8 \ + LANG=en_US.UTF-8 \ + LANGUAGE=en_US + +# Install bundler +RUN gem install bundler + +# [Option] Install Node.js +ARG NODE_VERSION="lts/*" +RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1" + +RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-key C99B11DEB97541F0 \ + && apt-add-repository https://cli.github.com/packages + +# [Optional] Uncomment this section to install additional OS packages. +RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ + && apt-get -y install --no-install-recommends gh + +# [Optional] Uncomment this line to install additional gems. +# RUN gem install + +# [Optional] Uncomment this line to install global node packages. +# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g " 2>&1 diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..a9c8438 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,34 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: +// https://github.com/microsoft/vscode-dev-containers/tree/v0.163.1/containers/jekyll +{ + "name": "Jekyll (Community)", + "build": { + "dockerfile": "Dockerfile", + "args": { + // Enable Node.js: pick the latest LTS version + "NODE_VERSION": "lts/*" + } + }, + + // Set *default* container specific settings.json values on container create. + "settings": { + "terminal.integrated.shell.linux": "/bin/bash" + }, + + // Add the IDs of extensions you want installed when the container is created. + "extensions": [], + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + "forwardPorts": [ + // Jekyll server + 4000, + // Live reload server + 35729 + ], + + // Use 'postCreateCommand' to run commands after the container is created. + "postCreateCommand": "sh .devcontainer/post-create.sh", + + // Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. + "remoteUser": "vscode" +} \ No newline at end of file diff --git a/.devcontainer/post-create.sh b/.devcontainer/post-create.sh new file mode 100644 index 0000000..440a9cd --- /dev/null +++ b/.devcontainer/post-create.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +# If there's a Gemfile, then run `bundle install` +# It's assumed that the Gemfile will install Jekyll too +if [ -f Gemfile ]; then + bundle install +else + # If there's no Gemfile, install Jekyll + sudo gem install jekyll +fi diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..e8b6253 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,26 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "label": "Serve", + "type": "shell", + "command": "bundle exec jekyll serve --livereload", + "group": { + "kind": "test", + "isDefault": true + }, + "isBackground": true, + }, + { + "label": "Build", + "type": "shell", + "command": "bundle exec jekyll build", + "group": { + "kind": "build", + "isDefault": true + }, + } + ] +} \ No newline at end of file