Skip to content

Commit 2596bc4

Browse files
Copilotshenxianpeng
andcommitted
feat: Add unified Jekyll documentation site with commit-check and commit-check-action docs
Co-authored-by: shenxianpeng <3353385+shenxianpeng@users.noreply.github.com>
1 parent 5149525 commit 2596bc4

File tree

11 files changed

+873
-2
lines changed

11 files changed

+873
-2
lines changed

.github/workflows/deploy.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Deploy Jekyll Site to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: "pages"
16+
cancel-in-progress: true
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v5
24+
25+
- name: Setup Ruby
26+
uses: ruby/setup-ruby@v1
27+
with:
28+
ruby-version: '3.1'
29+
bundler-cache: true
30+
cache-version: 0
31+
32+
- name: Setup Pages
33+
id: pages
34+
uses: actions/configure-pages@v4
35+
36+
- name: Build with Jekyll
37+
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
38+
env:
39+
JEKYLL_ENV: production
40+
41+
- name: Upload artifact
42+
uses: actions/upload-pages-artifact@v3
43+
44+
deploy:
45+
if: github.ref == 'refs/heads/main'
46+
environment:
47+
name: github-pages
48+
url: ${{ steps.deployment.outputs.page_url }}
49+
runs-on: ubuntu-latest
50+
needs: build
51+
steps:
52+
- name: Deploy to GitHub Pages
53+
id: deployment
54+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Jekyll
2+
_site/
3+
.sass-cache/
4+
.jekyll-cache/
5+
.jekyll-metadata
6+
7+
# Ruby
8+
vendor/
9+
.bundle/
10+
Gemfile.lock
11+
12+
# macOS
13+
.DS_Store
14+
15+
# Windows
16+
Thumbs.db
17+
18+
# Logs
19+
*.log
20+
21+
# Temporary files
22+
*~

Gemfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
source "https://rubygems.org"
2+
3+
gem "github-pages", group: :jekyll_plugins
4+
gem "jekyll-feed", "~> 0.12"
5+
6+
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
7+
# and associated library.
8+
platforms :mingw, :x64_mingw, :mswin, :jruby do
9+
gem "tzinfo", ">= 1", "< 3"
10+
gem "tzinfo-data"
11+
end
12+
13+
# Performance-booster for watching directories on Windows
14+
gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,12 @@
1-
# commit-check.github.io
2-
Commit Check main website, blog, and more
1+
# Commit Check Documentation Site
2+
3+
This repository contains the unified documentation site for the Commit Check organization, hosted at [commit-check.github.io](https://commit-check.github.io).
4+
5+
## Structure
6+
7+
- **commit-check/**: Documentation for the main commit-check tool
8+
- **commit-check-action/**: Documentation for the GitHub Action
9+
10+
## Development
11+
12+
This site is built with Jekyll and automatically deployed via GitHub Pages.

_config.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Site settings
2+
title: Commit Check Documentation
3+
description: A powerful tool for enforcing commit metadata standards
4+
url: "https://commit-check.github.io"
5+
baseurl: ""
6+
7+
# Build settings
8+
markdown: kramdown
9+
highlighter: rouge
10+
11+
# Plugins
12+
plugins:
13+
- jekyll-feed
14+
- jekyll-sitemap
15+
16+
# Social links
17+
github_username: commit-check
18+
19+
# Exclude files
20+
exclude:
21+
- node_modules/
22+
- .sass-cache/
23+
- .jekyll-cache/
24+
- gemfile
25+
- gemfile.lock
26+
- vendor/
27+
- README.md

_includes/navigation.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<nav class="site-nav">
2+
<a href="{{ '/' | relative_url }}" {% if page.url == '/' %}class="current"{% endif %}>Home</a>
3+
<a href="{{ '/commit-check/' | relative_url }}" {% if page.url contains '/commit-check/' %}class="current"{% endif %}>Commit Check Tool</a>
4+
<a href="{{ '/commit-check-action/' | relative_url }}" {% if page.url contains '/commit-check-action/' %}class="current"{% endif %}>GitHub Action</a>
5+
<a href="https://github.com/commit-check" target="_blank">GitHub</a>
6+
</nav>

_layouts/default.html

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width, initial-scale=1">
7+
8+
<title>{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}</title>
9+
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
10+
11+
<link rel="stylesheet" href="{{ '/assets/main.css' | relative_url }}">
12+
<link rel="canonical" href="{{ page.url | replace:'index.html','' | absolute_url }}">
13+
14+
<style>
15+
.site-nav {
16+
background: #f8f9fa;
17+
padding: 1rem;
18+
margin-bottom: 2rem;
19+
border-bottom: 1px solid #e9ecef;
20+
}
21+
.site-nav a {
22+
margin-right: 1rem;
23+
text-decoration: none;
24+
color: #007bff;
25+
font-weight: 500;
26+
}
27+
.site-nav a:hover {
28+
text-decoration: underline;
29+
}
30+
.site-nav a.current {
31+
color: #495057;
32+
font-weight: bold;
33+
}
34+
.content {
35+
max-width: 800px;
36+
margin: 0 auto;
37+
padding: 0 1rem;
38+
}
39+
.footer {
40+
margin-top: 3rem;
41+
padding: 2rem 0;
42+
border-top: 1px solid #e9ecef;
43+
text-align: center;
44+
color: #6c757d;
45+
}
46+
</style>
47+
</head>
48+
49+
<body>
50+
{% include navigation.html %}
51+
52+
<div class="content">
53+
<main class="page-content" aria-label="Content">
54+
{{ content }}
55+
</main>
56+
</div>
57+
58+
<footer class="footer">
59+
<p>&copy; {{ site.time | date: '%Y' }} Commit Check. Licensed under the MIT License.</p>
60+
</footer>
61+
</body>
62+
</html>

0 commit comments

Comments
 (0)