Skip to content

Commit d4b51ac

Browse files
committed
Add template structure
1 parent 9bcb112 commit d4b51ac

8 files changed

+243
-0
lines changed

.github/dependabot.yaml

+11
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,14 @@ updates:
2626
go:
2727
patterns:
2828
- '*'
29+
30+
- package-ecosystem: bundler
31+
directory: /docs/
32+
schedule:
33+
interval: monthly
34+
allow:
35+
- dependency-type: direct
36+
groups:
37+
website:
38+
patterns:
39+
- '*'

.github/workflows/continuous-integration.yaml

+18
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,21 @@ jobs:
5858
run: |
5959
go vet ./pkg/...
6060
go vet ./internal/...
61+
62+
pages:
63+
runs-on: ubuntu-latest
64+
defaults:
65+
run:
66+
working-directory: docs
67+
steps:
68+
- name: Checkout
69+
uses: actions/checkout@v3
70+
- name: Setup Ruby
71+
uses: ruby/setup-ruby@v1
72+
with:
73+
ruby-version: '3.1' # Not needed with a .ruby-version file
74+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
75+
cache-version: 0 # Increment this number if you need to re-download cached gems
76+
working-directory: '${{ github.workspace }}/docs'
77+
- name: Build with Jekyll
78+
run: bundle exec jekyll build

.github/workflows/pages.yml

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

docs/.gitignore

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# These are directly copied from Jekyll's first-party docs on `.gitignore` files:
2+
# https://jekyllrb.com/tutorials/using-jekyll-with-bundler/#commit-to-source-control
3+
4+
# Ignore the default location of the built site, and caches and metadata generated by Jekyll
5+
_site/
6+
.sass-cache/
7+
.jekyll-cache/
8+
.jekyll-metadata
9+
10+
# Ignore folders generated by Bundler
11+
.bundle/
12+
vendor/

docs/Gemfile

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
source 'https://rubygems.org'
2+
3+
gem "jekyll", "~> 4.3.3" # installed by `gem jekyll`
4+
# gem "webrick" # required when using Ruby >= 3 and Jekyll <= 4.2.2
5+
6+
gem "just-the-docs", "0.7.0" # pinned to the current release
7+
# gem "just-the-docs" # always download the latest release

docs/Gemfile.lock

+86
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
addressable (2.8.6)
5+
public_suffix (>= 2.0.2, < 6.0)
6+
colorator (1.1.0)
7+
concurrent-ruby (1.2.2)
8+
em-websocket (0.5.3)
9+
eventmachine (>= 0.12.9)
10+
http_parser.rb (~> 0)
11+
eventmachine (1.2.7)
12+
ffi (1.16.3)
13+
forwardable-extended (2.6.0)
14+
google-protobuf (3.25.1-arm64-darwin)
15+
google-protobuf (3.25.1-x86_64-linux)
16+
http_parser.rb (0.8.0)
17+
i18n (1.14.1)
18+
concurrent-ruby (~> 1.0)
19+
jekyll (4.3.3)
20+
addressable (~> 2.4)
21+
colorator (~> 1.0)
22+
em-websocket (~> 0.5)
23+
i18n (~> 1.0)
24+
jekyll-sass-converter (>= 2.0, < 4.0)
25+
jekyll-watch (~> 2.0)
26+
kramdown (~> 2.3, >= 2.3.1)
27+
kramdown-parser-gfm (~> 1.0)
28+
liquid (~> 4.0)
29+
mercenary (>= 0.3.6, < 0.5)
30+
pathutil (~> 0.9)
31+
rouge (>= 3.0, < 5.0)
32+
safe_yaml (~> 1.0)
33+
terminal-table (>= 1.8, < 4.0)
34+
webrick (~> 1.7)
35+
jekyll-include-cache (0.2.1)
36+
jekyll (>= 3.7, < 5.0)
37+
jekyll-sass-converter (3.0.0)
38+
sass-embedded (~> 1.54)
39+
jekyll-seo-tag (2.8.0)
40+
jekyll (>= 3.8, < 5.0)
41+
jekyll-watch (2.2.1)
42+
listen (~> 3.0)
43+
just-the-docs (0.7.0)
44+
jekyll (>= 3.8.5)
45+
jekyll-include-cache
46+
jekyll-seo-tag (>= 2.0)
47+
rake (>= 12.3.1)
48+
kramdown (2.4.0)
49+
rexml
50+
kramdown-parser-gfm (1.1.0)
51+
kramdown (~> 2.0)
52+
liquid (4.0.4)
53+
listen (3.8.0)
54+
rb-fsevent (~> 0.10, >= 0.10.3)
55+
rb-inotify (~> 0.9, >= 0.9.10)
56+
mercenary (0.4.0)
57+
pathutil (0.16.2)
58+
forwardable-extended (~> 2.6)
59+
public_suffix (5.0.4)
60+
rake (13.0.6)
61+
rb-fsevent (0.11.2)
62+
rb-inotify (0.10.1)
63+
ffi (~> 1.0)
64+
rexml (3.2.6)
65+
rouge (4.2.0)
66+
safe_yaml (1.0.5)
67+
sass-embedded (1.69.5-arm64-darwin)
68+
google-protobuf (~> 3.23)
69+
sass-embedded (1.69.5-x86_64-linux-gnu)
70+
google-protobuf (~> 3.23)
71+
terminal-table (3.0.2)
72+
unicode-display_width (>= 1.1.1, < 3)
73+
unicode-display_width (2.5.0)
74+
webrick (1.8.1)
75+
76+
PLATFORMS
77+
arm64-darwin-22
78+
arm64-darwin-23
79+
x86_64-linux
80+
81+
DEPENDENCIES
82+
jekyll (~> 4.3.3)
83+
just-the-docs (= 0.7.0)
84+
85+
BUNDLED WITH
86+
2.3.26

docs/_config.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
title: Just the Docs Template
2+
description: A starter template for a Jeykll site using the Just the Docs theme!
3+
theme: just-the-docs
4+
5+
url: https://just-the-docs.github.io
6+
7+
aux_links:
8+
Template Repository: https://github.com/just-the-docs/just-the-docs-template

docs/index.md

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
title: Home
3+
layout: home
4+
---
5+
6+
This is a *bare-minimum* template to create a Jekyll site that uses the [Just the Docs] theme. You can easily set the created site to be published on [GitHub Pages] – the [README] file explains how to do that, along with other details.
7+
8+
If [Jekyll] is installed on your computer, you can also build and preview the created site *locally*. This lets you test changes before committing them, and avoids waiting for GitHub Pages.[^1] And you will be able to deploy your local build to a different platform than GitHub Pages.
9+
10+
More specifically, the created site:
11+
12+
- uses a gem-based approach, i.e. uses a `Gemfile` and loads the `just-the-docs` gem
13+
- uses the [GitHub Pages / Actions workflow] to build and publish the site on GitHub Pages
14+
15+
Other than that, you're free to customize sites that you create with this template, however you like. You can easily change the versions of `just-the-docs` and Jekyll it uses, as well as adding further plugins.
16+
17+
[Browse our documentation][Just the Docs] to learn more about how to use this theme.
18+
19+
To get started with creating a site, simply:
20+
21+
1. click "[use this template]" to create a GitHub repository
22+
2. go to Settings > Pages > Build and deployment > Source, and select GitHub Actions
23+
24+
If you want to maintain your docs in the `docs` directory of an existing project repo, see [Hosting your docs from an existing project repo](https://github.com/just-the-docs/just-the-docs-template/blob/main/README.md#hosting-your-docs-from-an-existing-project-repo) in the template README.
25+
26+
----
27+
28+
[^1]: [It can take up to 10 minutes for changes to your site to publish after you push the changes to GitHub](https://docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll/creating-a-github-pages-site-with-jekyll#creating-your-site).
29+
30+
[Just the Docs]: https://just-the-docs.github.io/just-the-docs/
31+
[GitHub Pages]: https://docs.github.com/en/pages
32+
[README]: https://github.com/just-the-docs/just-the-docs-template/blob/main/README.md
33+
[Jekyll]: https://jekyllrb.com
34+
[GitHub Pages / Actions workflow]: https://github.blog/changelog/2022-07-27-github-pages-custom-github-actions-workflows-beta/
35+
[use this template]: https://github.com/just-the-docs/just-the-docs-template/generate

0 commit comments

Comments
 (0)