From c8c219a270303e1647cb27a668060ed5d6777722 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Fri, 13 Nov 2026 09:31:35 +0100 Subject: [PATCH 1/2] workflow: publish specifications to gh-pages Add a workflow that publishes the specification READMEs and .proto files to the gh-pages branch when a v* tag is pushed. It can also be started manually with workflow_dispatch. Assisted-By: AskBob Signed-off-by: Niels de Vos --- .github/workflows/publish-specs.yaml | 61 ++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .github/workflows/publish-specs.yaml diff --git a/.github/workflows/publish-specs.yaml b/.github/workflows/publish-specs.yaml new file mode 100644 index 0000000..09ef33f --- /dev/null +++ b/.github/workflows/publish-specs.yaml @@ -0,0 +1,61 @@ +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 + # GitHub Pages renders the markdown with Jekyll + cat > _site_src/_config.yml < Date: Fri, 13 Nov 2026 10:16:59 +0100 Subject: [PATCH 2/2] workflow: style published specs like csi-addons.github.io Add a Jekyll layout and stylesheet that follow the look of the main csi-addons.github.io site, and stage them together with the Jekyll configuration when publishing to gh-pages. Assisted-By: AskBob Signed-off-by: Niels de Vos --- .github/pages/_config.yml | 14 ++ .github/pages/_layouts/default.html | 39 +++++ .github/pages/assets/css/style.css | 238 +++++++++++++++++++++++++++ .github/workflows/publish-specs.yaml | 15 +- 4 files changed, 293 insertions(+), 13 deletions(-) create mode 100644 .github/pages/_config.yml create mode 100644 .github/pages/_layouts/default.html create mode 100644 .github/pages/assets/css/style.css diff --git a/.github/pages/_config.yml b/.github/pages/_config.yml new file mode 100644 index 0000000..4ceb1f3 --- /dev/null +++ b/.github/pages/_config.yml @@ -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 diff --git a/.github/pages/_layouts/default.html b/.github/pages/_layouts/default.html new file mode 100644 index 0000000..8f79b72 --- /dev/null +++ b/.github/pages/_layouts/default.html @@ -0,0 +1,39 @@ + + + + + + {% if page.title %}{{ page.title }} - {% endif %}{{ site.title }} + + + + + +
+ {{ content }} +
+ + + + diff --git a/.github/pages/assets/css/style.css b/.github/pages/assets/css/style.css new file mode 100644 index 0000000..5754d0d --- /dev/null +++ b/.github/pages/assets/css/style.css @@ -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; + } +} diff --git a/.github/workflows/publish-specs.yaml b/.github/workflows/publish-specs.yaml index 09ef33f..36d8d7f 100644 --- a/.github/workflows/publish-specs.yaml +++ b/.github/workflows/publish-specs.yaml @@ -37,19 +37,8 @@ jobs: cp "${dir}"/*.proto "_site_src/${dir}/" 2>/dev/null || true fi done - # GitHub Pages renders the markdown with Jekyll - cat > _site_src/_config.yml <