Skip to content

feat(docs): redesign homepage — interactive sections, rich footer, OG, sitemap#89

Merged
shouze merged 5 commits intomainfrom
feat/homepage-sections
Mar 7, 2026
Merged

feat(docs): redesign homepage — interactive sections, rich footer, OG, sitemap#89
shouze merged 5 commits intomainfrom
feat/homepage-sections

Conversation

@shouze
Copy link
Contributor

@shouze shouze commented Mar 7, 2026

Motivation

La homepage était du prose statique. Ce PR la transforme en une landing page moderne comparable à Bun.sh / Vite, tout en restant sobre et en phase avec la charte fulll.

Ce qui change

Nouveaux composants Vue

Composant Rôle
VersionBadge.vue Pill animée "🎉 v1.x.x is here" dans le hero — se met à jour automatiquement via vite.define + package.json à chaque docs:build, sans action manuelle
InstallSection.vue Flow 3 étapes avec terminaux macOS stylés, boutons copy-to-clipboard, badges shells/CI (zsh · bash · fish · macOS · Linux · Windows · GitHub Actions)
HowItWorks.vue 3 cards avec icônes brandées, flèches de connexion, hover elevation
UseCaseTabs.vue Pills interactives par use case, terminal macOS avec syntaxe colorée, transition fondu
ComparisonTable.vue Table ✓/✗ dans une card, intro text, hover rows
ProductionCta.vue Bannière CTA avec rocket SVG + animation flame pulse + color cycle
TestimonialsSection.vue 3 citations + card "Share your story" → GitHub Discussions
RichFooter.vue Footer 4 colonnes (brand · docs · project · community + lien fulll.fr) — homepage uniquement
MinimalFooter.vue Footer one-liner sobre (--vp-c-* natif) — toutes les autres pages

Config VitePress

  • Open Graph + Twitter Card : 10 balises <head>, PNG 1200 px généré automatiquement au build depuis docs/public/social-preview.svg via un plugin Vite + @resvg/resvg-js
  • Sitemap : sitemap: { hostname }✓ generating sitemap... au build
  • vite.define : __LATEST_VERSION__ + __LATEST_BLOG_SLUG__ injectés depuis package.json
  • Punch line hero : tagline chiffrée remplace la liste de features plate

Scripts & tooling

  • scripts/generate-og.ts : script standalone bun run docs:build:og pour régénérer le PNG OG indépendamment
  • knip.json : scripts/** et @resvg/resvg-js ignorés (docs-only)

Instructions release

.github/instructions/release.instructions.md — note ajoutée dans le post-release checklist : le badge version se met à jour automatiquement, aucune action manuelle requise.

Comment tester

git checkout feat/homepage-sections
bun install
bun run docs:build   # doit afficher "✓ generating sitemap..."
bun run docs:preview # ouvrir http://localhost:4173/github-code-search/

Vérifier :

  • Badge "🎉 v1.8.0 is here" visible dans le hero
  • Logos shells dans la section install
  • Footer riche sur la home, footer minimal sur /getting-started/
  • docs/.vitepress/dist/sitemap.xml présent
  • docs/public/social-preview.png régénéré (101 KB)

shouze added 5 commits March 7, 2026 03:17
- UseCaseTabs: pill-based tab selector with macOS terminal block, copy-to-clipboard, headline + description per use case
- ComparisonTable: styled card with intro text and icon-based ✓/✗ rows
- ProductionCta: CTA banner with animated SVG building icon cycling brand colours
- Register all three components globally in theme/index.ts
- Replace prose sections and markdown table in index.md with component tags
- 3-step guided install: curl command, token export, first search
- macOS-style terminal blocks with copy-to-clipboard on steps 1 and 3
- Connector line between steps with brand gradient
- Token hint with direct link to GitHub token generation page
- Full installation guide link at the bottom
- 3 card-based steps: Search across the org, Triage interactively, Export & replay
- Each card has a branded icon box, step badge, title and description
- Arrow connectors between steps
- Hover elevation matching feature card style
- Inserted between InstallSection and UseCaseTabs in index.md
Copilot AI review requested due to automatic review settings March 7, 2026 12:31
@github-actions
Copy link

github-actions bot commented Mar 7, 2026

Coverage after merging feat/homepage-sections into main will be

96.57%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   aggregate.ts100%100%100%100%
   api-utils.ts97.50%100%100%97.18%52, 60
   api.ts93.86%100%100%93.03%266–270, 326, 343, 63–69
   cache.ts98.08%100%100%97.87%28
   completions.ts99.35%100%100%99.29%252
   group.ts100%100%100%100%
   output.ts99.12%100%94.74%99.52%58
   render.ts94.05%100%88.89%94.33%153, 177–182, 184–186, 188–189, 216, 380–381, 424–427
   upgrade.ts88.06%100%94.12%87.50%122–123, 143–150, 153–159, 164, 169, 205–208
src/render
   filter-match.ts97.44%100%92.31%100%
   filter.ts100%100%100%100%
   highlight.ts96.62%100%90.40%99.31%284–285
   rows.ts97.87%100%100%97.73%54–55
   selection.ts100%100%100%100%
   summary.ts100%100%100%100%

@shouze shouze merged commit ebb77b2 into main Mar 7, 2026
8 checks passed
@shouze shouze deleted the feat/homepage-sections branch March 7, 2026 12:32
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR modernizes the VitePress docs homepage into a component-driven landing page, adds Open Graph/Twitter metadata with an auto-generated social preview image, and enables sitemap generation for improved sharing/SEO.

Changes:

  • Replaces the static docs/index.md homepage content with interactive Vue theme sections (install flow, use cases, comparison table, CTA, testimonials) plus a homepage-only rich footer.
  • Adds VitePress config enhancements: OG/Twitter <head> tags, vite.define for latest version/blog slug, a build-time OG PNG generator plugin, and sitemap config.
  • Introduces a standalone scripts/generate-og.ts helper + wiring in package.json, lockfile, and Knip ignores.

Reviewed changes

Copilot reviewed 17 out of 19 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
scripts/generate-og.ts Standalone script to render social-preview.svg to PNG.
package.json Adds docs:build:og script and @resvg/resvg-js dev dependency.
knip.json Ignores scripts/** and @resvg/resvg-js for docs-only tooling.
docs/index.md Swaps static markdown sections for homepage Vue components.
docs/.vitepress/config.mts Adds OG/Twitter meta, build-time OG PNG generation, vite.define version vars, and sitemap config.
docs/.vitepress/theme/index.ts Registers new homepage components and conditionally swaps rich vs minimal footer.
docs/.vitepress/theme/custom.css Hides default VitePress footer to rely on custom footers.
docs/.vitepress/theme/*.vue Adds homepage sections (install/how-it-works/use-cases/comparison/cta/testimonials) + rich/minimal footers + version badge.
bun.lock Locks @resvg/resvg-js and its platform packages.
.github/instructions/release.instructions.md Notes that the hero version badge auto-updates from package.json.

Comment on lines +28 to +32
<li><a href="/github-code-search/getting-started/">Getting started</a></li>
<li><a href="/github-code-search/getting-started/installation">Installation</a></li>
<li><a href="/github-code-search/usage/">Usage</a></li>
<li><a href="/github-code-search/reference/cli-options">CLI reference</a></li>
<li><a href="/github-code-search/reference/keyboard-shortcuts">Keyboard shortcuts</a></li>
Copy link

Copilot AI Mar 7, 2026

Choose a reason for hiding this comment

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

These links are hard-coded to /github-code-search/..., which will break when the docs are built with a different base (the config explicitly supports version snapshots via VITEPRESS_BASE). Prefer withBase('/getting-started/...') or VitePress useRouter() navigation so the footer works for versioned docs too.

Copilot uses AI. Check for mistakes.
</div>

<div class="ts-grid">
<blockquote class="ts-card" v-for="t in testimonials" :key="t.handle">
Copy link

Copilot AI Mar 7, 2026

Choose a reason for hiding this comment

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

:key="t.handle" uses a property that doesn't exist on the testimonials objects, so every item gets an undefined key (Vue will warn and may reuse DOM nodes incorrectly). Add a stable unique field (e.g. handle), or key by a guaranteed-unique value such as name (or name + role), or as a last resort use the v-for index.

Suggested change
<blockquote class="ts-card" v-for="t in testimonials" :key="t.handle">
<blockquote class="ts-card" v-for="t in testimonials" :key="t.name + ' - ' + t.role">

Copilot uses AI. Check for mistakes.
Comment on lines +75 to +83
<div class="uc-pills" role="tablist">
<button
v-for="(uc, i) in USE_CASES"
:key="uc.id"
class="uc-pill"
:class="{ active: active === i }"
role="tab"
:aria-selected="active === i"
@click="active = i"
Copy link

Copilot AI Mar 7, 2026

Choose a reason for hiding this comment

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

The markup declares role="tablist"/role="tab"/role="tabpanel", but it doesn't implement the required ARIA tab semantics (ids, aria-controls/aria-labelledby, roving tabindex, and keyboard navigation via arrow keys). Either implement full ARIA tabs behavior or remove the tab roles and treat these as a regular button group to avoid misrepresenting accessibility semantics.

Copilot uses AI. Check for mistakes.
Comment on lines +195 to +197
<pre
class="is-code"
><code><span class="is-prompt">$</span> github-code-search query <span class="is-str">"TODO"</span> --org my-org</code></pre>
Copy link

Copilot AI Mar 7, 2026

Choose a reason for hiding this comment

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

The displayed Step 3 command is duplicated in the template instead of reusing SEARCH_CMD (which is what gets copied). This can drift over time (copy button could copy something different than what the user sees). Consider rendering SEARCH_CMD in the terminal block and/or deriving both display + copy from the same constant.

Suggested change
<pre
class="is-code"
><code><span class="is-prompt">$</span> github-code-search query <span class="is-str">"TODO"</span> --org my-org</code></pre>
<pre class="is-code">
<code><span class="is-prompt">$</span> {{ SEARCH_CMD }}</code>
</pre>

Copilot uses AI. Check for mistakes.
<div class="rf-col">
<p class="rf-col-title">Project</p>
<ul class="rf-links">
<li><a href="/github-code-search/blog/">Blog</a></li>
Copy link

Copilot AI Mar 7, 2026

Choose a reason for hiding this comment

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

This internal link is hard-coded to /github-code-search/blog/, which will break for versioned docs builds where base is /github-code-search/vX/. Use withBase('/blog/') (or similar base-aware navigation) for internal links.

Suggested change
<li><a href="/github-code-search/blog/">Blog</a></li>
<li><a :href="withBase('/blog/')">Blog</a></li>

Copilot uses AI. Check for mistakes.
/**
* Converts docs/public/social-preview.svg → docs/public/social-preview.png (1200 px wide).
* Run standalone: bun scripts/generate-og.ts
* Also called automatically by the VitePress vite plugin in config.mts during docs:build.
Copy link

Copilot AI Mar 7, 2026

Choose a reason for hiding this comment

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

In this file header, the comment says the script is "called automatically by the VitePress vite plugin" during docs:build, but the plugin currently re-implements the logic inline instead of invoking this script. Please update the comment to reflect reality (or refactor the VitePress plugin to call this script) to avoid misleading future maintainers.

Suggested change
* Also called automatically by the VitePress vite plugin in config.mts during docs:build.
* The VitePress vite plugin in config.mts currently re-implements this logic inline during docs:build
* instead of invoking this script directly.

Copilot uses AI. Check for mistakes.

const CURL_CMD =
"curl -fsSL https://raw.githubusercontent.com/fulll/github-code-search/main/install.sh | bash";
const VERIFY_CMD = "github-code-search --version";
Copy link

Copilot AI Mar 7, 2026

Choose a reason for hiding this comment

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

VERIFY_CMD is declared but never used. Either remove it, or use it for a dedicated "verify" step/button (and rename copiedVerify/target accordingly) so the state variables match the UI intent.

Suggested change
const VERIFY_CMD = "github-code-search --version";

Copilot uses AI. Check for mistakes.
Comment on lines +203 to +206
<div class="is-footer">
<a href="/github-code-search/getting-started/installation" class="is-link-full">
Full installation guide →
</a>
Copy link

Copilot AI Mar 7, 2026

Choose a reason for hiding this comment

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

This internal link is hard-coded to /github-code-search/..., but the docs base is configurable via VITEPRESS_BASE for versioned snapshots (e.g. /github-code-search/vX/). Use withBase() (or derive from useData().site.value.base) for internal doc links so they work under both the canonical base and versioned bases.

Copilot uses AI. Check for mistakes.
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