From c2f78516b44053d4704ce2a1aa7e54e3d7de092b Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 22 Apr 2021 22:47:23 +0000 Subject: [PATCH 1/4] Upgrade to GitHub-native Dependabot --- .github/dependabot.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..c0cd718 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,14 @@ +version: 2 +updates: +- package-ecosystem: npm + directory: "/" + schedule: + interval: daily + time: "10:00" + open-pull-requests-limit: 10 +- package-ecosystem: bundler + directory: "/" + schedule: + interval: daily + time: "10:00" + open-pull-requests-limit: 10 From 2136b55a526cbd514da99e54f7438867d5de3935 Mon Sep 17 00:00:00 2001 From: max06 Date: Sun, 6 Mar 2022 12:42:18 +0000 Subject: [PATCH 2/4] Add standard jekyll devcontainer --- .devcontainer/Dockerfile | 14 +++++++++++++ .devcontainer/base.Dockerfile | 26 ++++++++++++++++++++++++ .devcontainer/devcontainer.json | 35 +++++++++++++++++++++++++++++++++ .devcontainer/post-create.sh | 12 +++++++++++ .vscode/tasks.json | 26 ++++++++++++++++++++++++ 5 files changed, 113 insertions(+) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/base.Dockerfile create mode 100644 .devcontainer/devcontainer.json create mode 100644 .devcontainer/post-create.sh create mode 100644 .vscode/tasks.json diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..19e7274 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,14 @@ +# [Choice] Debian OS version (use bullseye on local arm64/Apple Silicon): bullseye, buster +ARG VARIANT=bullseye +FROM mcr.microsoft.com/vscode/devcontainers/jekyll:0-${VARIANT} + +# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10 +ARG NODE_VERSION="none" +RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi + +# [Optional] Uncomment this section to install additional OS packages. +# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ +# && apt-get -y install --no-install-recommends + +# [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 \ No newline at end of file diff --git a/.devcontainer/base.Dockerfile b/.devcontainer/base.Dockerfile new file mode 100644 index 0000000..9e3296a --- /dev/null +++ b/.devcontainer/base.Dockerfile @@ -0,0 +1,26 @@ +# [Choice] Debian OS version (use 2.7-bullseye on local arm64/Apple Silicon): 2.7-bullseye, 2.7-buster +ARG VARIANT=2.7-bullseye +FROM mcr.microsoft.com/vscode/devcontainers/ruby:${VARIANT} +COPY library-scripts/meta.env /usr/local/etc/vscode-dev-containers + +# 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, latest jekyll, and github-pages for older jekyll +RUN gem install bundler jekyll github-pages + +# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10 +ARG NODE_VERSION="none" +RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi + +# [Optional] Uncomment this section to install additional OS packages. +# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ +# && apt-get -y install --no-install-recommends + +# [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..bca8024 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,35 @@ +// 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.224.2/containers/jekyll +{ + "name": "Just the docs", + "build": { + "dockerfile": "Dockerfile", + "args": { + // Update 'VARIANT' to pick a Debian OS version: bullseye, buster + // Use bullseye when on local arm64/Apple Silicon. + "VARIANT": "bullseye", + // Enable Node.js: pick the latest LTS version + "NODE_VERSION": "lts/*" + } + }, + + // Set *default* container specific settings.json values on container create. + "settings": {}, + + // 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 to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. + "remoteUser": "vscode" +} diff --git a/.devcontainer/post-create.sh b/.devcontainer/post-create.sh new file mode 100644 index 0000000..8c25f3d --- /dev/null +++ b/.devcontainer/post-create.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +# Install the version of Bundler. +if [ -f Gemfile.lock ] && grep "BUNDLED WITH" Gemfile.lock > /dev/null; then + cat Gemfile.lock | tail -n 2 | grep -C2 "BUNDLED WITH" | tail -n 1 | xargs gem install bundler -v +fi + +# 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 +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 From 45120c874206f11d436ac29a563c0f8cc523b229 Mon Sep 17 00:00:00 2001 From: max06 Date: Sun, 6 Mar 2022 12:45:05 +0000 Subject: [PATCH 3/4] Add info about the devcontainer to the readme --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 019a741..6671d3e 100644 --- a/README.md +++ b/README.md @@ -74,6 +74,8 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/just-t To set up your environment to develop this theme, run `bundle install`. +A modern [devcontainer configuration](https://code.visualstudio.com/docs/remote/containers) for VSCode is included. + Your theme is set up just like a normal Jekyll site! To test your theme, run `bundle exec jekyll serve` and open your browser at `http://localhost:4000`. This starts a Jekyll server using your theme. Add pages, documents, data, etc. like normal to test your theme's contents. As you make modifications to your theme and to your content, your site will regenerate and you should see the changes in the browser after a refresh, just like normal. When the theme is released, only the files in `_layouts`, `_includes`, and `_sass` tracked with Git will be released. From 00d3b4fe5ac4ef783d143dbe47253e18094cfaca Mon Sep 17 00:00:00 2001 From: max06 Date: Sun, 6 Mar 2022 12:46:49 +0000 Subject: [PATCH 4/4] Add github extension --- .devcontainer/devcontainer.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index bca8024..055d7e0 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -17,7 +17,9 @@ "settings": {}, // Add the IDs of extensions you want installed when the container is created. - "extensions": [], + "extensions": [ + "GitHub.vscode-pull-request-github" + ], // Use 'forwardPorts' to make a list of ports inside the container available locally. "forwardPorts": [