File tree Expand file tree Collapse file tree 11 files changed +294
-0
lines changed Expand file tree Collapse file tree 11 files changed +294
-0
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "name" : " Jekyll" ,
3+ "image" : " mcr.microsoft.com/devcontainers/jekyll:2-bullseye" ,
4+ "onCreateCommand" : " git config --global --add safe.directory ${containerWorkspaceFolder}" ,
5+ "postCreateCommand" : " bash .devcontainer/post-create.sh" ,
6+ "customizations" : {
7+ "vscode" : {
8+ "settings" : {
9+ "terminal.integrated.defaultProfile.linux" : " zsh"
10+ },
11+ "extensions" : [
12+ // Liquid tags auto-complete
13+ " killalau.vscode-liquid-snippets" ,
14+ // Liquid syntax highlighting and formatting
15+ " Shopify.theme-check-vscode" ,
16+ // Shell
17+ " timonwong.shellcheck" ,
18+ " mkhl.shfmt" ,
19+ // Common formatter
20+ " EditorConfig.EditorConfig" ,
21+ " esbenp.prettier-vscode" ,
22+ " stylelint.vscode-stylelint" ,
23+ " yzhang.markdown-all-in-one" ,
24+ // Git
25+ " mhutchie.git-graph"
26+ ]
27+ }
28+ }
29+ }
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ if [ -f package.json ]; then
4+ bash -i -c " nvm install --lts && nvm install-latest-npm"
5+ npm i
6+ npm run build
7+ fi
8+
9+ # Install dependencies for shfmt extension
10+ curl -sS https://webi.sh/shfmt | sh & > /dev/null
11+
12+ # Add OMZ plugins
13+ git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~ /.oh-my-zsh/custom/plugins/zsh-syntax-highlighting
14+ git clone https://github.com/zsh-users/zsh-autosuggestions ~ /.oh-my-zsh/custom/plugins/zsh-autosuggestions
15+ sed -i -E " s/^(plugins=\()(git)(\))/\1\2 zsh-syntax-highlighting zsh-autosuggestions\3/" ~ /.zshrc
16+
17+ # Avoid git log use less
18+ echo -e " \nunset LESS" >> ~/.zshrc
Original file line number Diff line number Diff line change 1+ root = true
2+
3+ [* ]
4+ charset = utf-8
5+ indent_style = space
6+ indent_size = 2
7+ trim_trailing_whitespace = true
8+ # Unix-style newlines with a newline ending every file
9+ end_of_line = lf
10+ insert_final_newline = true
11+
12+ [* .{js,css,scss} ]
13+ quote_type = single
14+
15+ [* .{yml,yaml} ]
16+ quote_type = double
17+
18+ [* .md ]
19+ trim_trailing_whitespace = false
Original file line number Diff line number Diff line change 1+ # Set default behavior to automatically normalize line endings.
2+ * text =auto
3+
4+ # Force bash scripts to always use LF line endings so that if a repo is accessed
5+ # in Unix via a file share from Windows, the scripts will work.
6+ * .sh text eol =lf
7+
8+ # Force batch scripts to always use CRLF line endings so that if a repo is accessed
9+ # in Windows via a file share from Linux, the scripts will work.
10+ * .{cmd, [cC ][mM ][dD ]} text eol =crlf
11+ * .{bat, [bB ][aA ][tT ]} text eol =crlf
12+
13+ # Denote all files that are truly binary and should not be modified.
14+ * .png binary
15+ * .jpg binary
16+ * .ico binary
Original file line number Diff line number Diff line change 1515node_modules
1616package-lock.json
1717
18+ # IDE Configurations
19+ .idea
20+ .vscode /*
21+ ! .vscode /settings.json
22+ ! .vscode /extensions.json
23+ ! .vscode /tasks.json
24+
1825# Miscellaneous
1926_sass /vendors
2027assets /js /dist
Original file line number Diff line number Diff line change 1+ [submodule "assets/lib "]
2+ path = assets/lib
3+ url = https://github.com/cotes2020/chirpy-static-assets.git
Original file line number Diff line number Diff line change 1+ {
2+ "recommendations" : [" ms-vscode-remote.remote-containers" ]
3+ }
Original file line number Diff line number Diff line change 1+ {
2+ // Prettier
3+ "editor.defaultFormatter" : " esbenp.prettier-vscode" ,
4+ "editor.formatOnSave" : true ,
5+ // Shopify Liquid
6+ "files.associations" : {
7+ "*.html" : " liquid"
8+ },
9+ "[markdown]" : {
10+ "editor.defaultFormatter" : " yzhang.markdown-all-in-one"
11+ },
12+ // Formatter
13+ "[html][liquid]" : {
14+ "editor.defaultFormatter" : " Shopify.theme-check-vscode"
15+ },
16+ "[shellscript]" : {
17+ "editor.defaultFormatter" : " mkhl.shfmt"
18+ },
19+ // Disable vscode built-in stylelint
20+ "css.validate" : false ,
21+ "scss.validate" : false ,
22+ "less.validate" : false ,
23+ // Stylint extension settings
24+ "stylelint.snippet" : [" css" , " scss" ],
25+ "stylelint.validate" : [" css" , " scss" ],
26+ // Run tasks in macOS
27+ "terminal.integrated.profiles.osx" : {
28+ "zsh" : { "path" : " /bin/zsh" , "args" : [" -l" , " -i" ] }
29+ }
30+ }
Original file line number Diff line number Diff line change 1+ {
2+ "version" : " 2.0.0" ,
3+ "tasks" : [
4+ {
5+ "label" : " Run Jekyll Server" ,
6+ "type" : " shell" ,
7+ "command" : " ./tools/run.sh" ,
8+ "group" : {
9+ "kind" : " build" ,
10+ "isDefault" : true
11+ },
12+ "problemMatcher" : [],
13+ "detail" : " Runs the Jekyll server with live reload."
14+ },
15+ {
16+ "label" : " Build Jekyll Site" ,
17+ "type" : " shell" ,
18+ "command" : " ./tools/test.sh" ,
19+ "group" : {
20+ "kind" : " build"
21+ },
22+ "problemMatcher" : [],
23+ "detail" : " Build the Jekyll site for production."
24+ }
25+ ]
26+ }
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ #
3+ # Run jekyll serve and then launch the site
4+
5+ prod=false
6+ command=" bundle exec jekyll s -l"
7+ host=" 127.0.0.1"
8+
9+ help () {
10+ echo " Usage:"
11+ echo
12+ echo " bash /path/to/run [options]"
13+ echo
14+ echo " Options:"
15+ echo " -H, --host [HOST] Host to bind to."
16+ echo " -p, --production Run Jekyll in 'production' mode."
17+ echo " -h, --help Print this help information."
18+ }
19+
20+ while (( $# )) ; do
21+ opt=" $1 "
22+ case $opt in
23+ -H | --host)
24+ host=" $2 "
25+ shift 2
26+ ;;
27+ -p | --production)
28+ prod=true
29+ shift
30+ ;;
31+ -h | --help)
32+ help
33+ exit 0
34+ ;;
35+ * )
36+ echo -e " > Unknown option: '$opt '\n"
37+ help
38+ exit 1
39+ ;;
40+ esac
41+ done
42+
43+ command=" $command -H $host "
44+
45+ if $prod ; then
46+ command=" JEKYLL_ENV=production $command "
47+ fi
48+
49+ if [ -e /proc/1/cgroup ] && grep -q docker /proc/1/cgroup; then
50+ command=" $command --force_polling"
51+ fi
52+
53+ echo -e " \n> $command \n"
54+ eval " $command "
You can’t perform that action at this time.
0 commit comments