feat(site-template): build mcp-server sites, drop innerHTML, add main landmark and meta#83
Merged
Merged
Conversation
… landmark and meta [skip version] The shared template could not build an MCP-server repo: build_site.py exited 1 when .cursor-plugin/plugin.json was absent, which MCP servers do not ship, so they hand-rolled their pages instead (T1). It also used innerHTML for the theme and copy icons (C1), had no main landmark or skip link (A1), and emitted no og:image when site.ogImage was unset (S1). - build_site.py: plugin.json is now optional. When absent it falls back to site.json + package.json for display name (humanized from the package name, acronyms like MCP upper-cased), description, repository, version, and license. site.json is the one required input. - template.html.j2: theme-toggle and install copy-button icons are built with DOMParser + importNode instead of innerHTML, matching the catalog's hardening. Wrapped content in <main id="main"> with a visually-hidden skip link, and the theme toggle now sets an aria-label reflecting the current state. - template head: og:image defaults to the directory logo when site.ogImage is unset, plus Twitter card tags and an optional canonical/og:url from site.canonical. - SETUP-PROMPT.md: documents the plugin.json fallback and updates troubleshooting. Verified by building site-template/build_site.py against C:\Dev\screencast-mcp with no synthesized plugin.json: it builds and renders (title and h1 "Screencast MCP", 25-tool table, footer v0.8.12), the rendered output has zero innerHTML and a populated themeIcon, and the source repo is untouched. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: TMHSDigital <TMHospitalityStrategies@gmail.com>
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Template parity and MCP-server support from
site-audit.md: T1, C1, A1 (template-side), S1 (template-side). No VERSION bump ([skip version]).Findings addressed
build_site.pyexited 1 when.cursor-plugin/plugin.jsonwas absent, so MCP-server repos could not use the shared template.plugin.jsonis now optional: when absent it falls back tosite.json+package.jsonfor display name (humanized, acronyms like MCP upper-cased), description, repository, version, and license.site.jsonis the one required input.DOMParser+importNodeinstead ofinnerHTML, matching the catalog's hardening. Rendered output has zeroinnerHTML.<main id="main">with a visually-hidden skip link.og:imagedefaults to the directory logo whensite.ogImageis unset; added Twitter card tags and optionalcanonical/og:urlfromsite.canonical. Theme toggle also gained a state-reflectingaria-label.Verification (proves T1)
Built
build_site.pyagainstC:\Dev\screencast-mcpwith no synthesizedplugin.json:innerHTML,<main id="main">+ skip link present, og:image defaulted, Twitter tags present.#themeIconpopulated via DOMParser; togglearia-label= "Theme: auto (click to change)".git status).🤖 Generated with Claude Code