Skip to content

feat(docs): add KP:1 spec home page with CITATION-driven metadata#46

Merged
tymofiy merged 3 commits into
mainfrom
site/spec-home-redesign
Jun 20, 2026
Merged

feat(docs): add KP:1 spec home page with CITATION-driven metadata#46
tymofiy merged 3 commits into
mainfrom
site/spec-home-redesign

Conversation

@tymofiy

@tymofiy tymofiy commented Jun 20, 2026

Copy link
Copy Markdown
Owner

KP:1 spec home page

Adds a static, self-contained spec home served from /docs via GitHub Pages.

The page

  • Typeset and accessible: WCAG AA contrast, keyboard-navigable, reduced-motion fallback.
  • Preserves the scholarly citation / Dublin Core / Open Graph metadata for Google Scholar and Crossref indexing, and adds a social preview image.
  • Self-hosted display / text / mono webfonts; no external runtime dependencies — loads fast and degrades gracefully.
  • Includes a small, real KP:1 fragment that demonstrates the format in its own notation.

Metadata can't go stale

scripts/build_docs.py projects the version, release date, DOIs, and licence from CITATION.cff into the page. make docs writes them; make docs-check verifies. A CI step and a pre-commit hook fail if the page falls out of sync with CITATION.cff.

After merge

Enable Pages: Settings → Pages → Source main / /docs. The page goes live at https://tymofiy.github.io/kp/.

A static, self-contained spec home served from /docs via GitHub Pages:
- Typeset and accessible (WCAG AA); preserves the citation and Dublin Core
  metadata for Scholar/Crossref indexing, and adds an Open Graph image.
- Self-hosted display/text/mono webfonts; no external runtime dependencies.
- A self-demonstrating KP:1 fragment shows the format's own notation.

scripts/build_docs.py projects version, date, DOIs, and licence from
CITATION.cff into the page so they cannot drift: `make docs` writes them and
`make docs-check` verifies. Enforced by a CI step and a pre-commit hook.

Co-Authored-By: Claude <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 20, 2026 19:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a static KP:1 specification home page under /docs (for GitHub Pages) and introduces tooling/CI guards to keep its citation/release metadata automatically synchronized with CITATION.cff.

Changes:

  • Add docs/index.html (self-contained landing page) plus supporting static assets for a GitHub Pages spec home.
  • Add scripts/build_docs.py and Makefile targets to project version/date/license/DOIs from CITATION.cff into the page (with a --check mode).
  • Enforce metadata sync via pre-commit (lefthook.yml) and CI (.github/workflows/ci.yml).

Reviewed changes

Copilot reviewed 5 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
scripts/build_docs.py New sync/check script that injects CITATION-driven metadata into docs/index.html.
Makefile Adds docs / docs-check convenience targets to run the metadata sync/check.
lefthook.yml Adds a pre-commit guard to block commits when docs/index.html is out of sync with CITATION.cff.
docs/kp.svg Adds a small SVG mark used by the docs page.
docs/index.html Adds the static spec home page with citation/OpenGraph/Dublin Core metadata and body anchors for CITATION-driven fields.
docs/.nojekyll Disables Jekyll processing so Pages serves files as-is.
.github/workflows/ci.yml Adds a CI step to enforce docs/index.html metadata stays in sync with CITATION.cff.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/build_docs.py
Comment on lines +68 to +71
if len(concept_hits) != 1:
fail(f"expected exactly one concept DOI (description containing 'concept'); found {len(concept_hits)}")
if len(version_hits) != 1:
fail(f"expected exactly one DOI whose description names {version!r}; found {len(version_hits)}")
Comment thread scripts/build_docs.py
Comment on lines +95 to +99
def meta(name: str, value: str, html: str) -> str:
# Tolerate attribute order/spacing so an IDE reformat of <head> can't
# silently skip a field (a true miss still fails loudly via search()).
pat = re.compile(r'(<meta[^>]*\bname="' + re.escape(name) + r'"[^>]*\bcontent=")([^"]*)(")')
mt = pat.search(html)

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4a43d205d1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/index.html
@@ -0,0 +1,440 @@
<!DOCTYPE html>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include the generated page in leak scans

Because this commit adds the public Pages content as docs/index.html, it falls outside the repository's public-text guards: the CI leak scan only includes md/txt/yml/yaml/json/cff/toml, and the mirrored lefthook globs use the same set. Prohibited process language or private engagement names added to this home page would therefore pass the guards and be publishable; please add *.html to the workflow and hook scans alongside the new page.

Useful? React with 👍 / 👎.

tymofiy and others added 2 commits June 20, 2026 15:23
…ml, Canela favicon

- build_docs.py: match <meta> tags order-independently (lookahead) so an HTML
  reformat cannot silently skip a field; correct the concept-DOI error message
  to name the wording it actually matches.
- ci.yml + lefthook.yml: include *.html in the public-text leak/deny scans so the
  published page is covered, not only md/yml/etc.
- kp.svg: redraw the favicon as the genuine Canela "KP:1" (real K/P/1 outlines
  plus a matched colon).

Co-Authored-By: Claude <noreply@anthropic.com>
@tymofiy tymofiy merged commit 1688bac into main Jun 20, 2026
4 checks passed
@tymofiy tymofiy deleted the site/spec-home-redesign branch June 20, 2026 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants