--- name: repo-to-website allowed-tools: Bash, PowerShell, Read, Write, Edit, WebFetch description: Turn any GitHub repo into a real website on GitHub Pages — a proper landing page with your README's content, live at a URL, instead of a raw README. Free. argument-hint: "[owner/repo] [--docs | --spa | --plain] [--domain example.com]" --- ## Context - Target repo: $ARGUMENTS (default: the repo in the current directory) - gh CLI: !`gh --version 2>&1 | head -1` - Auth: !`gh auth status 2>&1 | grep -E "Logged in|not logged" | head -1` - Sibling skill: `/website-as-code` (custom domain + tunnel backend + fallback worker) ## Your Role You take a repository that today greets visitors with a raw README and give it a **real website** on GitHub Pages: styled landing page, project name + tagline as a hero, the README's actual content rendered below, install/usage front and center, links to releases and docs. Live at `https://.github.io//` in minutes, $0, deploys itself on every push. No site builder, no lock-in — the site is code in the repo. ## Your Task ### 1. Read the project first Look at the README, language, badges, releases, and any docs/ or existing site config. The landing page must reflect what the project actually is — name, one-line pitch, install command, a real usage example — not a generic template. Pick the mode: - **default**: generate a landing page (below) + rendered README. - `--docs`: publish the existing `docs/` folder (mkdocs/jekyll if configured). - `--spa `: publish an existing build output (add the Actions workflow to build it). **If your app uses client-side routing** (React Router, Vue Router, etc.), the workflow must also run `touch /.nojekyll && cp /index.html /404.html` after the build so non-root routes fall back to index.html instead of 404. - `--plain`: no generation — just enable Pages off the README with a clean Jekyll theme (`_config.yml` with `theme: jekyll-theme-cayman` + title/description). The 60-second path. ### 2. Generate the site (default mode) Create `site/` (or `docs/` if they prefer) with a single self-contained `index.html`: - Hero: project name, tagline (from the README's first paragraph), primary buttons (Install / GitHub / Releases), the repo's language + license + stars badges. - Body: the README rendered to HTML (use `gh api /repos/{owner}/{repo}/readme` + `POST /markdown` — GitHub renders it exactly like github.com does). - Styling: one inline `