Skip to content

Commit e869a33

Browse files
committed
Initialize Commit
0 parents  commit e869a33

File tree

219 files changed

+37792
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

219 files changed

+37792
-0
lines changed

.devcontainer/Dockerfile

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# [Choice] Debian OS version (use bullseye on local arm64/Apple Silicon): bullseye, buster
2+
ARG VARIANT=bullseye
3+
FROM mcr.microsoft.com/vscode/devcontainers/jekyll:0-${VARIANT}
4+
5+
# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
6+
ARG NODE_VERSION="none"
7+
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
8+
9+
# [Optional] Uncomment this section to install additional OS packages.
10+
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
11+
# && apt-get -y install --no-install-recommends <your-package-list-here>
12+
13+
# [Optional] Uncomment this line to install global node packages.
14+
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1

.devcontainer/base.Dockerfile

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# [Choice] Debian OS version (use 2.7-bullseye on local arm64/Apple Silicon): 2.7-bullseye, 2.7-buster
2+
ARG VARIANT=2.7-bullseye
3+
FROM mcr.microsoft.com/vscode/devcontainers/ruby:${VARIANT}
4+
COPY library-scripts/meta.env /usr/local/etc/vscode-dev-containers
5+
6+
# ENV Variables required by Jekyll
7+
ENV LANG=en_US.UTF-8 \
8+
LANGUAGE=en_US:en \
9+
TZ=Etc/UTC \
10+
LC_ALL=en_US.UTF-8 \
11+
LANG=en_US.UTF-8 \
12+
LANGUAGE=en_US
13+
14+
# Install bundler, latest jekyll, and github-pages for older jekyll
15+
RUN gem install bundler jekyll github-pages
16+
17+
# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
18+
ARG NODE_VERSION="none"
19+
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
20+
21+
# [Optional] Uncomment this section to install additional OS packages.
22+
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
23+
# && apt-get -y install --no-install-recommends <your-package-list-here>
24+
25+
# [Optional] Uncomment this line to install global node packages.
26+
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1

.devcontainer/devcontainer.json

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.224.2/containers/jekyll
3+
{
4+
"name": "DevSecOps Guides",
5+
"build": {
6+
"dockerfile": "Dockerfile",
7+
"args": {
8+
// Update 'VARIANT' to pick a Debian OS version: bullseye, buster
9+
// Use bullseye when on local arm64/Apple Silicon.
10+
"VARIANT": "bullseye",
11+
// Enable Node.js: pick the latest LTS version
12+
"NODE_VERSION": "lts/*"
13+
}
14+
},
15+
16+
// Set *default* container specific settings.json values on container create.
17+
"settings": {},
18+
19+
// Add the IDs of extensions you want installed when the container is created.
20+
"extensions": ["GitHub.vscode-pull-request-github"],
21+
22+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
23+
"forwardPorts": [
24+
// Jekyll server
25+
4000,
26+
// Live reload server
27+
35729
28+
],
29+
30+
// Use 'postCreateCommand' to run commands after the container is created.
31+
"postCreateCommand": "sh .devcontainer/post-create.sh",
32+
33+
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
34+
"remoteUser": "vscode"
35+
}

.devcontainer/post-create.sh

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/sh
2+
3+
# Install the version of Bundler.
4+
if [ -f Gemfile.lock ] && grep "BUNDLED WITH" Gemfile.lock > /dev/null; then
5+
cat Gemfile.lock | tail -n 2 | grep -C2 "BUNDLED WITH" | tail -n 1 | xargs gem install bundler -v
6+
fi
7+
8+
# If there's a Gemfile, then run `bundle install`
9+
# It's assumed that the Gemfile will install Jekyll too
10+
if [ -f Gemfile ]; then
11+
bundle install
12+
fi

.github/ISSUE_TEMPLATE/bug_report.md

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Browser [e.g. chrome, safari]
29+
- Version [e.g. 22]
30+
31+
**Smartphone (please complete the following information):**
32+
- Device: [e.g. iPhone6]
33+
- OS: [e.g. iOS8.1]
34+
- Browser [e.g. stock browser, safari]
35+
- Version [e.g. 22]
36+
37+
**Additional context**
38+
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/config.yml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Ask a question
4+
url: https://github.com/just-the-docs/just-the-docs/discussions
5+
about: Ask questions and discuss with other community members
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/dependabot.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: npm
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
time: "10:00"
8+
open-pull-requests-limit: 10
9+
- package-ecosystem: bundler
10+
directory: "/"
11+
schedule:
12+
interval: daily
13+
time: "10:00"
14+
open-pull-requests-limit: 10

.github/workflows/ci.yml

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
pull_request:
6+
branches:
7+
- main
8+
9+
name: CI
10+
11+
jobs:
12+
jekyll-build:
13+
name: Build (jekyll gem)
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
jekyll-version: [3.9, 4.3]
18+
os: [ ubuntu-latest, macos-latest, windows-latest ]
19+
ruby-version: [2.7, 3.1]
20+
runs-on: ${{ matrix.os }}
21+
steps:
22+
- uses: actions/checkout@v3
23+
- name: Setup Ruby ${{ matrix.ruby-version }}
24+
uses: ruby/setup-ruby@v1
25+
with:
26+
ruby-version: ${{ matrix.ruby-version }}
27+
bundler-cache: false
28+
- name: Bundle Install
29+
run: bundle install
30+
- name: Install Jekyll ${{ matrix.jekyll-version }}
31+
run: gem install jekyll -v ${{ matrix.jekyll-version }}
32+
- name: Init Search
33+
run: bundle exec rake search:init
34+
- name: Build Site
35+
run: bundle exec jekyll build
36+
37+
github-pages-build:
38+
name: Build (github-pages gem)
39+
runs-on: ubuntu-latest
40+
steps:
41+
- uses: actions/checkout@v3
42+
- name: Setup Ruby
43+
uses: ruby/setup-ruby@v1
44+
with:
45+
ruby-version: '3.1'
46+
bundler-cache: false
47+
- name: Bundle Install
48+
run: BUNDLE_GEMFILE=fixtures/Gemfile-github-pages bundle install
49+
- name: Build Site
50+
run: BUNDLE_GEMFILE=fixtures/Gemfile-github-pages bundle exec jekyll build
51+
52+
assets:
53+
name: Test CSS and JS
54+
runs-on: ubuntu-latest
55+
56+
strategy:
57+
matrix:
58+
node-version: [18.x]
59+
60+
steps:
61+
- uses: actions/checkout@v3
62+
- name: Use Node.js ${{ matrix.node-version }}
63+
uses: actions/setup-node@v1
64+
with:
65+
node-version: ${{ matrix.node-version }}
66+
- run: npm install
67+
- run: npm test

.github/workflows/deploy.yml

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
6+
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
7+
name: Deploy Jekyll site to Pages
8+
9+
on:
10+
push:
11+
branches: ["main"]
12+
13+
# Allows you to run this workflow manually from the Actions tab
14+
workflow_dispatch:
15+
16+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
17+
permissions:
18+
contents: read
19+
pages: write
20+
id-token: write
21+
22+
# Allow one concurrent deployment
23+
concurrency:
24+
group: "pages"
25+
cancel-in-progress: true
26+
27+
jobs:
28+
# Build job
29+
build:
30+
runs-on: ubuntu-latest
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v3
34+
- name: Setup Ruby
35+
uses: ruby/setup-ruby@v1
36+
with:
37+
ruby-version: '3.1' # Not needed with a .ruby-version file
38+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
39+
cache-version: 0 # Increment this number if you need to re-download cached gems
40+
- name: Setup Pages
41+
id: pages
42+
uses: actions/configure-pages@v2
43+
- name: Build with Jekyll
44+
# Outputs to the './_site' directory by default
45+
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
46+
env:
47+
JEKYLL_ENV: production
48+
- name: Upload artifact
49+
# Automatically uploads an artifact from the './_site' directory by default
50+
uses: actions/upload-pages-artifact@v1
51+
52+
# Deployment job
53+
deploy:
54+
environment:
55+
name: github-pages
56+
url: ${{ steps.deployment.outputs.page_url }}
57+
runs-on: ubuntu-latest
58+
needs: build
59+
steps:
60+
- name: Deploy to GitHub Pages
61+
id: deployment
62+
uses: actions/deploy-pages@v1

.github/workflows/publish-gem.yml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Publish Ruby Gem
2+
3+
on:
4+
workflow_dispatch
5+
6+
jobs:
7+
build:
8+
name: Publish
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v3
13+
- name: Set up Ruby 3.1
14+
uses: actions/setup-ruby@v1
15+
with:
16+
ruby-version: 3.1
17+
18+
- name: Publish to GPR
19+
run: |
20+
mkdir -p $HOME/.gem
21+
touch $HOME/.gem/credentials
22+
chmod 0600 $HOME/.gem/credentials
23+
printf -- "---\n:github: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
24+
gem build *.gemspec
25+
gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem
26+
env:
27+
GEM_HOST_API_KEY: "Bearer ${{secrets.GITHUB_TOKEN}}"
28+
OWNER: ${{ github.repository_owner }}
29+
30+
# Disabled as this does not handle 2FA
31+
# - name: Publish to RubyGems
32+
# run: |
33+
# mkdir -p $HOME/.gem
34+
# touch $HOME/.gem/credentials
35+
# chmod 0600 $HOME/.gem/credentials
36+
# printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
37+
# gem build *.gemspec
38+
# gem push *.gem
39+
# env:
40+
# GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Update Vendor plugin - jekyll-anchor-headings
2+
on:
3+
# schedule:
4+
# # once per week
5+
# - cron: "0 15 * * 0"
6+
workflow_dispatch:
7+
jobs:
8+
update-deps:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
13+
- name: Get latest release information
14+
id: latest-release
15+
uses: pozetroninc/github-action-get-latest-release@master
16+
with:
17+
owner: allejo
18+
repo: jekyll-anchor-headings
19+
excludes: prerelease, draft
20+
21+
- name: Update jekyll-anchor-headings
22+
id: update
23+
uses: suisei-cn/actions-download-file@v1.3.0
24+
with:
25+
url: "https://github.com/allejo/jekyll-anchor-headings/releases/download/${{ steps.latest-release.outputs.release }}/anchor_headings.html"
26+
target: _includes/vendor/
27+
28+
- name: Create PR
29+
uses: peter-evans/create-pull-request@v4
30+
with:
31+
commit-message: "chore[dependency]: Update `jekyll-anchor-headings` to `${{ steps.latest-release.outputs.release }}`"
32+
title: "auto: Update `jekyll-anchor-headings` to `${{ steps.latest-release.outputs.release }}`"
33+
body: |
34+
Update `jekyll-anchor-headings` to `${{ steps.latest-release.outputs.release }}`
35+
This is an automated pull request.
36+
branch: update/vendor/jekyll-anchor-headings
37+
delete-branch: true
38+
labels: |
39+
kind/update
40+
area/dependency
41+
add-paths: |
42+
_includes/vendor/anchor_headings.html
43+
token: ${{ secrets.GITHUB_TOKEN }}

.gitignore

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
*.gem
2+
.bundle
3+
.ruby-version
4+
.jekyll-cache
5+
.sass-cache
6+
_site
7+
Gemfile.lock
8+
node_modules
9+
.DS_Store

0 commit comments

Comments
 (0)