-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: Devcontainer with Jekyll + Compiler theme (#1)
- Loading branch information
Showing
16 changed files
with
570 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
FROM python:3.12 | ||
|
||
ENV PYTHONDONTWRITEBYTECODE=1 \ | ||
PYTHONUNBUFFERED=1 \ | ||
USER=compiler | ||
|
||
RUN useradd --create-home --shell /bin/bash $USER && \ | ||
chown -R $USER /home/$USER | ||
|
||
WORKDIR /home/$USER/site | ||
|
||
RUN apt-get update | ||
RUN apt-get install -y ruby-full && gem install bundler | ||
RUN python -m pip install --upgrade pip | ||
COPY Gemfile Gemfile | ||
#COPY Gemfile.lock Gemfile.lock | ||
RUN bundle install | ||
|
||
COPY .devcontainer/requirements.txt .devcontainer/requirements.txt | ||
RUN pip install --no-cache-dir -r .devcontainer/requirements.txt | ||
|
||
USER $USER | ||
ENV PATH "$PATH:/home/$USER/.local/bin" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// 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.183.0/containers/jekyll | ||
{ | ||
"name": "compilerla/compilerla.github.io", | ||
"dockerComposeFile": "../compose.yml", | ||
"service": "site", | ||
"workspaceFolder": "/home/compiler/site", | ||
"postAttachCommand": ["/bin/bash", ".devcontainer/postAttach.sh"], | ||
"customizations": { | ||
"vscode": { | ||
"settings": { | ||
"terminal.integrated.defaultProfile.linux": "bash", | ||
"terminal.integrated.profiles.linux": { | ||
"bash": { | ||
"path": "/bin/bash" | ||
} | ||
} | ||
}, | ||
"extensions": [ | ||
"eamodio.gitlens", | ||
"esbenp.prettier-vscode", | ||
"mhutchie.git-graph", | ||
"redhat.vscode-xml", | ||
"sissel.shopify-liquid" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env bash | ||
set -eu | ||
|
||
git config --global --add safe.directory /home/compiler/site | ||
|
||
# initialize hook environments | ||
pre-commit install --install-hooks --overwrite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pre-commit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
ci: | ||
autofix_commit_msg: "chore(pre-commit): autofix run" | ||
autoupdate_commit_msg: "chore(pre-commit): autoupdate hooks" | ||
|
||
default_install_hook_types: | ||
- pre-commit | ||
- commit-msg | ||
|
||
repos: | ||
- repo: https://github.com/compilerla/conventional-pre-commit | ||
rev: v3.6.0 | ||
hooks: | ||
- id: conventional-pre-commit | ||
stages: [commit-msg] | ||
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v5.0.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: mixed-line-ending | ||
- id: end-of-file-fixer | ||
- id: requirements-txt-fixer | ||
- id: check-yaml | ||
args: ["--unsafe"] | ||
- id: check-added-large-files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"tabWidth": 2, | ||
"useTabs": false, | ||
"printWidth": 130 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"editor.formatOnSave": true, | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"files.encoding": "utf8", | ||
"files.eol": "\n", | ||
"files.insertFinalNewline": true, | ||
"files.trimFinalNewlines": true, | ||
"files.trimTrailingWhitespace": true, | ||
"editor.tabSize": 2, | ||
"files.associations": { | ||
"*.html": "liquid" | ||
}, | ||
"[liquid]": { | ||
"editor.formatOnSave": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
// See https://go.microsoft.com/fwlink/?LinkId=733558 | ||
// for the documentation about the tasks.json format | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "Jekyll: Build Dev", | ||
"detail": "jekyll serve --force_polling --livereload", | ||
"type": "shell", | ||
"linux": { | ||
"command": "bundle exec jekyll serve --force_polling --livereload" | ||
}, | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
}, | ||
"presentation": { | ||
"echo": true, | ||
"reveal": "always", | ||
"focus": false, | ||
"panel": "shared", | ||
"showReuseMessage": true, | ||
"clear": false | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
source 'https://rubygems.org' | ||
|
||
gem "github-pages", "~> 232", group: :jekyll_plugins |
Oops, something went wrong.