diff --git a/docs/astro.config.mjs b/docs/astro.config.mjs index f585e2a..28498ef 100644 --- a/docs/astro.config.mjs +++ b/docs/astro.config.mjs @@ -13,14 +13,22 @@ export default defineConfig({ integrations: [ starlight({ title: 'GitHub Stacked PRs', - description: 'Manage stacked branches and pull requests with the gh stack CLI extension.', + description: 'Break large changes into small, reviewable pull requests that build on each other — with native GitHub support and the gh stack CLI.', favicon: '/favicon.svg', logo: { src: './src/assets/github-invertocat.svg', alt: 'GitHub', }, head: [ - { tag: 'meta', attrs: { name: 'robots', content: 'noindex, nofollow' } }, + { tag: 'meta', attrs: { property: 'og:type', content: 'website' } }, + { tag: 'meta', attrs: { property: 'og:site_name', content: 'GitHub Stacked PRs' } }, + { tag: 'meta', attrs: { property: 'og:image', content: 'https://github.github.com/gh-stack/github-social-card.jpg' } }, + { tag: 'meta', attrs: { property: 'og:image:alt', content: 'GitHub Stacked PRs — Break large changes into small, reviewable pull requests' } }, + { tag: 'meta', attrs: { property: 'og:image:width', content: '1200' } }, + { tag: 'meta', attrs: { property: 'og:image:height', content: '630' } }, + { tag: 'meta', attrs: { name: 'twitter:card', content: 'summary_large_image' } }, + { tag: 'meta', attrs: { name: 'twitter:site', content: '@github' } }, + { tag: 'meta', attrs: { name: 'twitter:image', content: 'https://github.github.com/gh-stack/github-social-card.jpg' } }, ], components: { SocialIcons: './src/components/CustomHeader.astro', diff --git a/docs/public/favicon.svg b/docs/public/favicon.svg index 8f0bb34..848cf2c 100644 --- a/docs/public/favicon.svg +++ b/docs/public/favicon.svg @@ -1,5 +1,4 @@ - + - + diff --git a/docs/public/github-social-card.jpg b/docs/public/github-social-card.jpg new file mode 100644 index 0000000..7911cf1 Binary files /dev/null and b/docs/public/github-social-card.jpg differ diff --git a/docs/src/assets/stack-diagram.svg b/docs/src/assets/stack-diagram.svg deleted file mode 100644 index b0296ec..0000000 --- a/docs/src/assets/stack-diagram.svg +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - main - - - - - PR #1 · auth-layer - - - - - PR #2 · api-endpoints - - - - - PR #3 · frontend - - - - - - -← bottom -← top - diff --git a/docs/src/components/StackDiagram.astro b/docs/src/components/StackDiagram.astro new file mode 100644 index 0000000..583267b --- /dev/null +++ b/docs/src/components/StackDiagram.astro @@ -0,0 +1,62 @@ +--- +/** + * Inline SVG stack diagram — uses currentColor to inherit text color from the + * parent element, which is styled via external CSS. This avoids Safari bugs + * where @media (prefers-color-scheme) doesn't work inside SVG elements. + */ +--- +
+ + + + + + + + + + + main + + + + + PR #1 · auth-layer + + + + + PR #2 · api-endpoints + + + + + PR #3 · frontend + + + + + + + ← bottom + ← top + +
+ + diff --git a/docs/src/content/docs/index.mdx b/docs/src/content/docs/index.mdx index fdcb414..d6b8804 100644 --- a/docs/src/content/docs/index.mdx +++ b/docs/src/content/docs/index.mdx @@ -17,7 +17,7 @@ hero: import { Card, CardGrid, Aside } from '@astrojs/starlight/components'; import { Image } from 'astro:assets'; -import stackDiagram from '../../assets/stack-diagram.svg'; +import StackDiagram from '../../components/StackDiagram.astro'; import stackNavigator from '../../assets/screenshots/stack-navigator.png'; @@ -43,9 +43,7 @@ Large pull requests are hard to review, slow to merge, and prone to conflicts. R A **stack** is a series of pull requests in the same repository where each PR targets the branch of the PR below it, forming an ordered chain that ultimately lands on your main branch. -
- A stack of pull requests: main at the bottom, with auth-layer (PR #1), api-endpoints (PR #2), and frontend (PR #3) stacked on top -
+ GitHub understands stacks end-to-end: the pull request UI shows a **stack map** so reviewers can navigate between layers, branch protection rules are enforced against the **final target branch** (not just the direct base), and CI runs for every PR in the stack as if they were targeting the final branch.