Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/pages/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
title: CSI-Addons Specifications
plugins:
- jekyll-default-layout
- jekyll-optional-front-matter
- jekyll-readme-index
- jekyll-relative-links
- jekyll-titles-from-headings
relative_links:
enabled: true
collections: false
titles_from_headings:
enabled: true
strip_title: true
collections: false
39 changes: 39 additions & 0 deletions .github/pages/_layouts/default.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% if page.title %}{{ page.title }} - {% endif %}{{ site.title }}</title>
<link rel="stylesheet" href="{{ site.github.url }}/assets/css/style.css">
</head>
<body>
<nav class="navbar">
<div class="container nav-container">
<a href="https://csi-addons.github.io/" class="nav-logo">
<svg class="logo-icon" viewBox="0 0 32 32" width="32" height="32" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="32" height="32" rx="6" fill="#2563eb"/>
<path d="M8 12h6v8H8zM18 8h6v12h-6zM13 16h6v4h-6z" fill="#fff" opacity="0.9"/>
<path d="M13 10h6v4h-6z" fill="#93c5fd"/>
</svg>
<span>CSI-Addons</span>
</a>
<ul class="nav-links">
<li><a href="{{ site.github.url }}/">Specifications</a></li>
<li><a href="https://csi-addons.github.io/">Project</a></li>
<li><a href="https://github.com/csi-addons/spec" class="nav-github">GitHub</a></li>
</ul>
</div>
</nav>

<main class="container content">
{{ content }}
</main>

<footer class="footer">
<div class="container">
<p>Licensed under the
<a href="https://github.com/csi-addons/spec/blob/main/LICENSE">Apache License 2.0</a>.</p>
</div>
</footer>
</body>
</html>
238 changes: 238 additions & 0 deletions .github/pages/assets/css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,238 @@
/* Styling matches https://csi-addons.github.io/ */
*,
*::before,
*::after {
margin: 0;
padding: 0;
box-sizing: border-box;
}

:root {
--color-primary: #2563eb;
--color-primary-dark: #1d4ed8;
--color-primary-light: #93c5fd;
--color-primary-bg: #eff6ff;
--color-text: #1e293b;
--color-text-secondary: #475569;
--color-text-muted: #64748b;
--color-bg: #fff;
--color-bg-alt: #f8fafc;
--color-border: #e2e8f0;
--color-code-bg: #0f172a;
--color-code-text: #e2e8f0;
--font-sans: -apple-system, blinkmacsystemfont, "Segoe UI", roboto, "Helvetica Neue", arial, sans-serif;
--font-mono: "SFMono-Regular", consolas, "Liberation Mono", menlo, monospace;
--radius: 8px;
}

body {
font-family: var(--font-sans);
color: var(--color-text);
background: var(--color-bg);
line-height: 1.6;
-webkit-font-smoothing: antialiased;
}

a {
color: var(--color-primary);
text-decoration: none;
}

a:hover {
text-decoration: underline;
}

.container {
max-width: 1000px;
margin: 0 auto;
padding: 0 24px;
}

/* Footer */
.footer {
background: var(--color-code-bg);
color: var(--color-text-muted);
padding: 32px 0;
text-align: center;
font-size: 0.85rem;
}

.footer a {
color: var(--color-primary-light);
}

/* Navbar */
.navbar {
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 100;
background: rgb(255 255 255 / 95%);
backdrop-filter: blur(8px);
border-bottom: 1px solid var(--color-border);
}

.nav-container {
display: flex;
align-items: center;
justify-content: space-between;
height: 64px;
max-width: 1200px;
}

.nav-logo {
display: flex;
align-items: center;
gap: 10px;
font-size: 1.25rem;
font-weight: 700;
color: var(--color-text);
}

.nav-logo:hover {
text-decoration: none;
}

.nav-links {
display: flex;
align-items: center;
gap: 32px;
list-style: none;
}

.nav-links a {
color: var(--color-text-secondary);
font-size: 0.9rem;
font-weight: 500;
}

.nav-links a:hover {
color: var(--color-primary);
text-decoration: none;
}

.nav-github {
padding: 6px 16px;
border: 1px solid var(--color-border);
border-radius: 6px;
}

.nav-github:hover {
background: var(--color-bg-alt);
}

/* Rendered markdown */
.content {
padding-top: 104px;
padding-bottom: 64px;
min-height: 80vh;
}

.content h1,
.content h2,
.content h3,
.content h4 {
font-weight: 800;
letter-spacing: -0.02em;
line-height: 1.25;
margin: 2rem 0 1rem;
}

.content h1 {
font-size: 2.25rem;
margin-top: 0;
}

.content h2 {
font-size: 1.6rem;
padding-bottom: 0.3rem;
border-bottom: 1px solid var(--color-border);
}

.content h3 {
font-size: 1.25rem;
}

.content p,
.content ul,
.content ol,
.content table,
.content pre,
.content blockquote {
margin-bottom: 1rem;
}

.content ul,
.content ol {
padding-left: 1.5rem;
}

.content li {
color: var(--color-text-secondary);
}

.content p {
color: var(--color-text-secondary);
}

.content img {
max-width: 100%;
}

.content blockquote {
padding: 0.5rem 1rem;
background: var(--color-primary-bg);
border-left: 4px solid var(--color-primary-light);
border-radius: 0 var(--radius) var(--radius) 0;
}

.content table {
border-collapse: collapse;
display: block;
overflow-x: auto;
}

.content th,
.content td {
padding: 8px 14px;
border: 1px solid var(--color-border);
}

.content th {
background: var(--color-bg-alt);
}

.content code {
font-family: var(--font-mono);
font-size: 0.875em;
padding: 0.15em 0.4em;
background: var(--color-bg-alt);
border: 1px solid var(--color-border);
border-radius: 4px;
}

.content pre {
padding: 20px;
overflow-x: auto;
background: var(--color-code-bg);
border-radius: 12px;
}

.content pre code {
padding: 0;
background: none;
border: none;
color: var(--color-code-text);
line-height: 1.7;
}

@media (width <= 768px) {
.nav-links {
gap: 16px;
}

.content h1 {
font-size: 1.75rem;
}
}
50 changes: 50 additions & 0 deletions .github/workflows/publish-specs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: publish-specs

on:
push:
tags: [ 'v*' ]
workflow_dispatch:

permissions:
contents: read

concurrency:
group: publish-specs
cancel-in-progress: true

jobs:
publish:
runs-on: ubuntu-latest

permissions:
# required to push to the gh-pages branch
contents: write

steps:
- name: checkout source
uses: actions/checkout@v7

- name: stage specifications
run: |
mkdir -p _site_src
cp README.md _site_src/
cp -r images _site_src/
for dir in */; do
dir=${dir%/}
if [ -f "${dir}/README.md" ]; then
mkdir -p "_site_src/${dir}"
cp "${dir}/README.md" "_site_src/${dir}/"
cp "${dir}"/*.proto "_site_src/${dir}/" 2>/dev/null || true
fi
done
# Jekyll config, layout and CSS used by GitHub Pages to render the markdown
cp -r .github/pages/. _site_src/

- name: publish to gh-pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _site_src
publish_branch: gh-pages
# do not add .nojekyll, GitHub Pages needs to render the markdown
enable_jekyll: true
Loading