Skip to content

Commit

Permalink
added devcontainer
Browse files Browse the repository at this point in the history
  • Loading branch information
lipkau committed Jan 26, 2024
1 parent ac92170 commit 21d2a80
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/jekyll
{
"name": "AtlassianPS Dev Environment - Jekyll",
"image": "mcr.microsoft.com/devcontainers/jekyll:2-bullseye",
"features": {
"ghcr.io/devcontainers-contrib/features/zsh-plugins:0": {}
},
"postCreateCommand": ".devcontainer/post-create.sh",
"customizations": {
"vscode": {
"settings": {}
},
"extensions": [
"DavidAnson.vscode-markdownlint",
"editorconfig.editorconfig",
"ginfuru.ginfuru-vscode-jekyll-syntax",
"ginfuru.vscode-jekyll-snippets",
"jasonnutter.vscode-codeowners",
"streetsidesoftware.code-spell-checker"
]
}
}
18 changes: 18 additions & 0 deletions .devcontainer/post-create.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env sh

# Jekyll does not work on ruby v3.3*
rvm install "ruby-2.6"
rvm use

# Install the version of Bundler specified in the Gemfile.lock
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

bundle exec jekyll serve --force-polling

0 comments on commit 21d2a80

Please sign in to comment.