diff --git a/website/public/example.gif b/website/public/example.gif deleted file mode 100644 index d1c8ad5..0000000 Binary files a/website/public/example.gif and /dev/null differ diff --git a/website/public/example.webp b/website/public/example.webp new file mode 100644 index 0000000..d8585bd Binary files /dev/null and b/website/public/example.webp differ diff --git a/website/public/widget-default.gif b/website/public/widget-default.gif deleted file mode 100644 index 182e04b..0000000 Binary files a/website/public/widget-default.gif and /dev/null differ diff --git a/website/public/widget-default.webp b/website/public/widget-default.webp new file mode 100644 index 0000000..55c9ca5 Binary files /dev/null and b/website/public/widget-default.webp differ diff --git a/website/public/widget-icon.gif b/website/public/widget-icon.gif deleted file mode 100644 index c6fb203..0000000 Binary files a/website/public/widget-icon.gif and /dev/null differ diff --git a/website/public/widget-icon.webp b/website/public/widget-icon.webp new file mode 100644 index 0000000..c149ea0 Binary files /dev/null and b/website/public/widget-icon.webp differ diff --git a/website/public/widget-small.gif b/website/public/widget-small.gif deleted file mode 100644 index 8caa8e3..0000000 Binary files a/website/public/widget-small.gif and /dev/null differ diff --git a/website/public/widget-small.webp b/website/public/widget-small.webp new file mode 100644 index 0000000..1fcbbd4 Binary files /dev/null and b/website/public/widget-small.webp differ diff --git a/website/src/components/Header.astro b/website/src/components/Header.astro index 4437f17..b6791a1 100644 --- a/website/src/components/Header.astro +++ b/website/src/components/Header.astro @@ -14,6 +14,7 @@ const shouldRenderSearch = diff --git a/website/src/components/HomepageContributors.astro b/website/src/components/HomepageContributors.astro new file mode 100644 index 0000000..8ac0bda --- /dev/null +++ b/website/src/components/HomepageContributors.astro @@ -0,0 +1,126 @@ +--- +type GhContributor = { + login: string; + avatar_url: string; + html_url: string; + contributions: number; + type: string; +}; + +let contributors: GhContributor[] = []; + +try { + const res = await fetch( + 'https://api.github.com/repos/multivmlabs/aeo.js/contributors?per_page=100', + { headers: { 'User-Agent': 'aeojs-docs-build', Accept: 'application/vnd.github+json' } } + ); + if (res.ok) { + const data = (await res.json()) as GhContributor[]; + contributors = data + .filter((c) => c.type === 'User') + .sort((a, b) => b.contributions - a.contributions); + } +} catch { + // Silently skip the strip on fetch failure — homepage stays clean. +} + +const top = contributors.slice(0, 8); +const remaining = Math.max(0, contributors.length - top.length); +--- + +{contributors.length > 0 && ( +
+

Built by

+
+ {top.map((c) => ( + + {c.login} + + ))} + {remaining > 0 && ( + + +{remaining} + + )} +
+ + View all {contributors.length} contributor{contributors.length === 1 ? '' : 's'} → + +
+)} + + diff --git a/website/src/content/docs/features/widget.mdx b/website/src/content/docs/features/widget.mdx index 7fa47fe..0f8e174 100644 --- a/website/src/content/docs/features/widget.mdx +++ b/website/src/content/docs/features/widget.mdx @@ -91,7 +91,7 @@ widget: { | Default | Small | Icon | |---------|-------|------| -| ![Default widget](/widget-default.gif) | ![Small widget](/widget-small.gif) | ![Icon widget](/widget-icon.gif) | +| ![Default widget](/widget-default.webp) | ![Small widget](/widget-small.webp) | ![Icon widget](/widget-icon.webp) | | `size: 'default'` | `size: 'small'` | `size: 'icon-only'` | | Full labels with icons | Compact — ~30% smaller | Just icons, no labels | diff --git a/website/src/content/docs/getting-started/introduction.mdx b/website/src/content/docs/getting-started/introduction.mdx index cef0064..e409f14 100644 --- a/website/src/content/docs/getting-started/introduction.mdx +++ b/website/src/content/docs/getting-started/introduction.mdx @@ -3,7 +3,7 @@ title: Introduction description: What is aeo.js and why you need Answer Engine Optimization. --- -![aeo.js in action](/example.gif) +![aeo.js in action](/example.webp) ## What is Answer Engine Optimization? diff --git a/website/src/content/docs/index.mdx b/website/src/content/docs/index.mdx index b9b7851..c8704c0 100644 --- a/website/src/content/docs/index.mdx +++ b/website/src/content/docs/index.mdx @@ -16,6 +16,7 @@ hero: import { Tabs, TabItem } from '@astrojs/starlight/components'; import StickyNav from '../../components/StickyNav.astro'; +import HomepageContributors from '../../components/HomepageContributors.astro'; @@ -304,3 +305,5 @@ public/

Free — no signup required. Powered by AEO Checker

+ + diff --git a/website/src/pages/contributors.astro b/website/src/pages/contributors.astro new file mode 100644 index 0000000..6b1cbff --- /dev/null +++ b/website/src/pages/contributors.astro @@ -0,0 +1,149 @@ +--- +import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro'; + +type GhContributor = { + login: string; + avatar_url: string; + html_url: string; + contributions: number; + type: string; +}; + +let contributors: GhContributor[] = []; +let fetchError = false; + +try { + const res = await fetch( + 'https://api.github.com/repos/multivmlabs/aeo.js/contributors?per_page=100', + { headers: { 'User-Agent': 'aeojs-docs-build', Accept: 'application/vnd.github+json' } } + ); + if (res.ok) { + const data = (await res.json()) as GhContributor[]; + contributors = data + .filter((c) => c.type === 'User') + .sort((a, b) => b.contributions - a.contributions); + } else { + fetchError = true; + } +} catch { + fetchError = true; +} +--- + + + {fetchError ? ( +

+ Couldn't load contributors right now. View the full list on + + GitHub + + . +

+ ) : ( + <> +

+ {contributors.length} contributor{contributors.length === 1 ? '' : 's'} have shaped aeo.js. Thank you. 🙏 +

+ +

+ Want to join them? + + Open a PR + + . +

+ + )} +
+ +