Skip to content

Update Gemfile, add .devcontainer #67

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 26, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add DevContainers
  • Loading branch information
olivierlemasle committed Feb 24, 2024
commit 6fb31b9e8b757def7d37adb66b3ef8c1cfd49b11
27 changes: 27 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "Jekyll",
"image": "mcr.microsoft.com/devcontainers/base:debian",
"containerEnv": {
"ENV LANG": "en_US.UTF-8",
"LANGUAGE": "en_US:en",
"TZ": "Etc/UTC",
"LANG": "en_US.UTF-8"
},
"features": {
"ghcr.io/devcontainers-contrib/features/ruby-asdf:0": {
// Cf Ruby version in https://pages.github.com/versions/
"version": "2.7.4"
}
},
"postCreateCommand": [
".devcontainer/post-create.sh"
],
"forwardPorts": [
// Jekyll server
4000,
// Live reload server
35729
],
// Set `remoteUser` to `root` to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode"
}
14 changes: 14 additions & 0 deletions .devcontainer/post-create.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh

# Install the version of Bundler.
if [ -f Gemfile.lock ] && grep "BUNDLED WITH" Gemfile.lock >/dev/null; then
tail -n 2 Gemfile.lock | 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 --version
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -6,6 +6,14 @@

This site uses Jekyll. You can find instructions for how to install and configure Jekyll on [https://jekyllrb.com/docs/](https://jekyllrb.com/docs/).

You may also use a tool or service supporting [Development Containers](https://containers.dev/), such as Visual Studio Code or GitHub Codespaces. In that case, your development environment is already set up and includes Jekyll with the right version.

Run Jekyll with:

```bash
bundle exec jekyll serve --livereload
```

## How to Contribute
You can contribute by:
- writing an article,