Skip to content

Commit

Permalink
Update template
Browse files Browse the repository at this point in the history
  • Loading branch information
forFudan committed Mar 10, 2024
1 parent c492ea0 commit 17fb193
Show file tree
Hide file tree
Showing 78 changed files with 4,283 additions and 574 deletions.
14 changes: 14 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 <your-package-list-here>

# [Optional] Uncomment this line to install global node packages.
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1
26 changes: 26 additions & 0 deletions .devcontainer/base.Dockerfile
Original file line number Diff line number Diff line change
@@ -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 <your-package-list-here>

# [Optional] Uncomment this line to install global node packages.
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1
35 changes: 35 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -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": ["GitHub.vscode-pull-request-github"],

// 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"
}
12 changes: 12 additions & 0 deletions .devcontainer/post-create.sh
Original file line number Diff line number Diff line change
@@ -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
28 changes: 23 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,18 +1,36 @@
# Copied from https://github.com/github/gitignore/blob/main/Jekyll.gitignore
# Ignore metadata generated by Jekyll
# Not sure what a .gitignore is?
# See: https://git-scm.com/docs/gitignore

# The first files are directly copied from Jekyll's first-party docs on `.gitignore` files:
# https://jekyllrb.com/tutorials/using-jekyll-with-bundler/#commit-to-source-control

# Ignore the default location of the built site, and caches and metadata generated by Jekyll
_site/
.sass-cache/
.jekyll-cache/
.jekyll-metadata

# Ignore folders generated by Bundler
.bundle/
# vendor/
vendor/

# These next files are used by Just the Docs developers. They are not necessary for end users of the theme, only developers.

# Ignore local settings
/.vscode
# We use Stylelint and Prettier, JavaScript tools, to lint and format our own code.
# We use Node.js as our runtime, so we ignore node_modules
node_modules

# .DS_Store is a macOS-only metadata file about directories. Convention is to not commit them.
# See: https://en.wikipedia.org/wiki/.DS_Store
.DS_Store

# These are legacy globs that typically target Ruby theme developers. We may change these at a later date.
*.gem
.bundle
.ruby-version

.vscode

# Ignore locally-generated dictionary files
/_archived
/beta/hotfix
Expand Down
13 changes: 5 additions & 8 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
source 'https://rubygems.org'
source "https://rubygems.org"
gemspec

gem "jekyll", "~> 4.3" # installed by `gem jekyll`
# gem "webrick" # required when using Ruby >= 3 and Jekyll <= 4.2.2
gem "jekyll-github-metadata", ">= 2.15"

# gem "just-the-docs", "0.5.0" # pinned to the current release
gem "just-the-docs" # always download the latest release
gem "jekyll-include-cache", group: :jekyll_plugins

gem "webrick", "~> 1.7"

gem "liquid", "4.0.4"
gem "html-proofer", "~> 5.0", :group => :development
89 changes: 80 additions & 9 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,23 +1,63 @@
PATH
remote: .
specs:
just-the-docs (0.8.1)
jekyll (>= 3.8.5)
jekyll-include-cache
jekyll-seo-tag (>= 2.0)
rake (>= 12.3.1)

GEM
remote: https://rubygems.org/
specs:
Ascii85 (1.1.0)
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
afm (0.2.2)
async (2.9.0)
console (~> 1.10)
fiber-annotation
io-event (~> 1.5, >= 1.5.1)
timers (~> 4.1)
bigdecimal (3.1.6)
colorator (1.1.0)
concurrent-ruby (1.2.2)
console (1.23.5)
fiber-annotation
fiber-local
json
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
ethon (0.16.0)
ffi (>= 1.15.0)
eventmachine (1.2.7)
faraday (2.9.0)
faraday-net_http (>= 2.0, < 3.2)
faraday-net_http (3.1.0)
net-http
ffi (1.16.3)
ffi (1.16.3-x64-mingw-ucrt)
fiber-annotation (0.2.0)
fiber-local (1.0.0)
forwardable-extended (2.6.0)
google-protobuf (3.25.1-arm64-darwin)
google-protobuf (3.25.1-x64-mingw-ucrt)
google-protobuf (3.25.1-x86_64-linux)
hashery (2.1.2)
html-proofer (5.0.8)
addressable (~> 2.3)
async (~> 2.1)
nokogiri (~> 1.13)
pdf-reader (~> 2.11)
rainbow (~> 3.0)
typhoeus (~> 1.3)
yell (~> 2.0)
zeitwerk (~> 2.5)
http_parser.rb (0.8.0)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
io-event (1.5.1)
jekyll (4.3.3)
addressable (~> 2.4)
colorator (~> 1.0)
Expand All @@ -34,6 +74,9 @@ GEM
safe_yaml (~> 1.0)
terminal-table (>= 1.8, < 4.0)
webrick (~> 1.7)
jekyll-github-metadata (2.16.1)
jekyll (>= 3.4, < 5.0)
octokit (>= 4, < 7, != 4.4.0)
jekyll-include-cache (0.2.1)
jekyll (>= 3.7, < 5.0)
jekyll-sass-converter (3.0.0)
Expand All @@ -42,11 +85,7 @@ GEM
jekyll (>= 3.8, < 5.0)
jekyll-watch (2.2.1)
listen (~> 3.0)
just-the-docs (0.8.1)
jekyll (>= 3.8.5)
jekyll-include-cache
jekyll-seo-tag (>= 2.0)
rake (>= 12.3.1)
json (2.7.1)
kramdown (2.4.0)
rexml
kramdown-parser-gfm (1.1.0)
Expand All @@ -56,37 +95,69 @@ GEM
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.4.0)
net-http (0.4.1)
uri
nokogiri (1.16.2-arm64-darwin)
racc (~> 1.4)
nokogiri (1.16.2-x64-mingw-ucrt)
racc (~> 1.4)
nokogiri (1.16.2-x86_64-linux)
racc (~> 1.4)
octokit (6.1.1)
faraday (>= 1, < 3)
sawyer (~> 0.9)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
pdf-reader (2.12.0)
Ascii85 (~> 1.0)
afm (~> 0.2.1)
hashery (~> 2.0)
ruby-rc4
ttfunk
public_suffix (5.0.4)
racc (1.7.3)
rainbow (3.1.1)
rake (13.1.0)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
rexml (3.2.6)
rouge (4.2.0)
ruby-rc4 (0.1.5)
safe_yaml (1.0.5)
sass-embedded (1.71.1-arm64-darwin)
google-protobuf (~> 3.25)
sass-embedded (1.71.1-x64-mingw-ucrt)
google-protobuf (~> 3.25)
sass-embedded (1.71.1-x86_64-linux)
google-protobuf (~> 3.25)
sawyer (0.9.2)
addressable (>= 2.3.5)
faraday (>= 0.17.3, < 3)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
timers (4.3.5)
ttfunk (1.8.0)
bigdecimal (~> 3.1)
typhoeus (1.4.1)
ethon (>= 0.9.0)
unicode-display_width (2.5.0)
uri (0.13.0)
webrick (1.8.1)
yell (2.2.2)
zeitwerk (2.6.13)

PLATFORMS
arm64-darwin
x64-mingw-ucrt
x86_64-linux

DEPENDENCIES
jekyll (~> 4.3)
just-the-docs
liquid (= 4.0.4)
webrick (~> 1.7)
bundler (>= 2.3.5)
html-proofer (~> 5.0)
jekyll-github-metadata (>= 2.15)
jekyll-include-cache
just-the-docs!

BUNDLED WITH
2.4.13
Loading

0 comments on commit 17fb193

Please sign in to comment.