diff --git a/README.md b/README.md
index 8ad1da2a7..23806719d 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
-
+
OpenAPI TypeScript
🚀 The OpenAPI to TypeScript codegen. Generate clients, SDKs, validators, and more.
diff --git a/docs/.vitepress/config/shared.ts b/docs/.vitepress/config/shared.ts
index 61b5d01f9..51114ba0f 100644
--- a/docs/.vitepress/config/shared.ts
+++ b/docs/.vitepress/config/shared.ts
@@ -3,7 +3,33 @@ import { defineConfig, type HeadConfig } from 'vitepress';
export default defineConfig({
cleanUrls: true,
head: [
- ['link', { href: '/logo.png', rel: 'icon', type: 'image/png' }],
+ [
+ 'link',
+ {
+ href: '/images/logo-16w.png',
+ rel: 'icon',
+ sizes: '16x16',
+ type: 'image/png',
+ },
+ ],
+ [
+ 'link',
+ {
+ href: '/images/logo-32w.png',
+ rel: 'icon',
+ sizes: '32x32',
+ type: 'image/png',
+ },
+ ],
+ [
+ 'link',
+ {
+ href: '/images/logo-48w.png',
+ rel: 'icon',
+ sizes: '48x48',
+ type: 'image/png',
+ },
+ ],
['meta', { content: 'website', property: 'og:type' }],
['meta', { content: 'en', property: 'og:locale' }],
[
@@ -15,7 +41,7 @@ export default defineConfig({
},
],
['meta', { content: 'OpenAPI TypeScript', property: 'og:site_name' }],
- ['meta', { content: '/logo.png', property: 'og:image' }],
+ ['meta', { content: '/images/logo-640w.png', property: 'og:image' }],
['meta', { content: 'https://heyapi.dev', property: 'og:url' }],
[
'script',
@@ -33,7 +59,7 @@ export default defineConfig({
},
themeConfig: {
externalLinkIcon: true,
- logo: '/logo.png',
+ logo: '/images/logo-48w.png',
search: {
provider: 'local',
},
diff --git a/docs/index.md b/docs/index.md
index 7bdfcc0ff..613706e42 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -5,18 +5,18 @@ hero:
name: High-quality tools for interacting with APIs
tagline: Codegen for your TypeScript projects. Trusted more than 700k times each month to generate reliable API clients and SDKs.
actions:
- - theme: brand
+ - link: /openapi-ts/get-started
text: Get Started
- link: /openapi-ts/get-started
- - theme: alt
+ theme: brand
+ - link: https://stackblitz.com/edit/hey-api-example?file=openapi-ts.config.ts,src%2Fclient%2Fschemas.gen.ts,src%2Fclient%2Fsdk.gen.ts,src%2Fclient%2Ftypes.gen.ts
text: View Demo
- link: https://stackblitz.com/edit/hey-api-example?file=openapi-ts.config.ts,src%2Fclient%2Fschemas.gen.ts,src%2Fclient%2Fsdk.gen.ts,src%2Fclient%2Ftypes.gen.ts
- - theme: alt
+ theme: alt
+ - link: https://github.com/orgs/hey-api/discussions/1495
text: Roadmap
- link: https://github.com/orgs/hey-api/discussions/1495
+ theme: alt
image:
- src: /logo.png
- alt: logo
+ alt: Hey API logo
+ src: /images/logo-640w.png
features:
- icon:
diff --git a/docs/public/images/logo-150w.png b/docs/public/images/logo-150w.png
new file mode 100644
index 000000000..db3a6b673
Binary files /dev/null and b/docs/public/images/logo-150w.png differ
diff --git a/docs/public/images/logo-16w.png b/docs/public/images/logo-16w.png
new file mode 100644
index 000000000..0e9a8c314
Binary files /dev/null and b/docs/public/images/logo-16w.png differ
diff --git a/docs/public/images/logo-32w.png b/docs/public/images/logo-32w.png
new file mode 100644
index 000000000..40d71caef
Binary files /dev/null and b/docs/public/images/logo-32w.png differ
diff --git a/docs/public/images/logo-48w.png b/docs/public/images/logo-48w.png
new file mode 100644
index 000000000..b403f13a1
Binary files /dev/null and b/docs/public/images/logo-48w.png differ
diff --git a/docs/public/images/logo-640w.png b/docs/public/images/logo-640w.png
new file mode 100644
index 000000000..1bede6606
Binary files /dev/null and b/docs/public/images/logo-640w.png differ
diff --git a/docs/public/images/stainless-logo-1200w.jpeg b/docs/public/images/stainless-logo-1200w.jpeg
deleted file mode 100644
index 70ae1f464..000000000
Binary files a/docs/public/images/stainless-logo-1200w.jpeg and /dev/null differ
diff --git a/docs/public/images/stainless-logo-1200w.png b/docs/public/images/stainless-logo-1200w.png
deleted file mode 100644
index 3f78482a2..000000000
Binary files a/docs/public/images/stainless-logo-1200w.png and /dev/null differ
diff --git a/docs/public/images/stainless-logo-1200w.webp b/docs/public/images/stainless-logo-1200w.webp
deleted file mode 100644
index c1064d5a4..000000000
Binary files a/docs/public/images/stainless-logo-1200w.webp and /dev/null differ
diff --git a/docs/public/images/stainless-logo-480w.jpeg b/docs/public/images/stainless-logo-480w.jpeg
deleted file mode 100644
index 5d08eebd2..000000000
Binary files a/docs/public/images/stainless-logo-480w.jpeg and /dev/null differ
diff --git a/docs/public/images/stainless-logo-480w.png b/docs/public/images/stainless-logo-480w.png
deleted file mode 100644
index 1c760adca..000000000
Binary files a/docs/public/images/stainless-logo-480w.png and /dev/null differ
diff --git a/docs/public/images/stainless-logo-480w.webp b/docs/public/images/stainless-logo-480w.webp
deleted file mode 100644
index 962abb019..000000000
Binary files a/docs/public/images/stainless-logo-480w.webp and /dev/null differ
diff --git a/docs/public/images/stainless-logo-768w.jpeg b/docs/public/images/stainless-logo-768w.jpeg
deleted file mode 100644
index ffa07f783..000000000
Binary files a/docs/public/images/stainless-logo-768w.jpeg and /dev/null differ
diff --git a/docs/public/images/stainless-logo-768w.png b/docs/public/images/stainless-logo-768w.png
deleted file mode 100644
index 0c55dd17d..000000000
Binary files a/docs/public/images/stainless-logo-768w.png and /dev/null differ
diff --git a/docs/public/images/stainless-logo-768w.webp b/docs/public/images/stainless-logo-768w.webp
deleted file mode 100644
index d02462422..000000000
Binary files a/docs/public/images/stainless-logo-768w.webp and /dev/null differ
diff --git a/docs/public/images/stainless-logo-wordmark-1200w.jpeg b/docs/public/images/stainless-logo-wordmark-1200w.jpeg
deleted file mode 100644
index 9adcb3086..000000000
Binary files a/docs/public/images/stainless-logo-wordmark-1200w.jpeg and /dev/null differ
diff --git a/docs/public/images/stainless-logo-wordmark-480w.png b/docs/public/images/stainless-logo-wordmark-480w.png
deleted file mode 100644
index 807e14c5e..000000000
Binary files a/docs/public/images/stainless-logo-wordmark-480w.png and /dev/null differ
diff --git a/docs/public/images/stainless-logo-wordmark-768w.jpeg b/docs/public/images/stainless-logo-wordmark-768w.jpeg
deleted file mode 100644
index 90981dce7..000000000
Binary files a/docs/public/images/stainless-logo-wordmark-768w.jpeg and /dev/null differ
diff --git a/docs/public/images/stainless-logo-wordmark-768w.png b/docs/public/images/stainless-logo-wordmark-768w.png
deleted file mode 100644
index 586241f36..000000000
Binary files a/docs/public/images/stainless-logo-wordmark-768w.png and /dev/null differ
diff --git a/docs/public/raw/stainless-logo-wordmark.png b/docs/public/stainless-logo-wordmark.png
similarity index 100%
rename from docs/public/raw/stainless-logo-wordmark.png
rename to docs/public/stainless-logo-wordmark.png
diff --git a/docs/public/raw/stainless-logo.png b/docs/public/stainless-logo.png
similarity index 100%
rename from docs/public/raw/stainless-logo.png
rename to docs/public/stainless-logo.png
diff --git a/docs/scripts/optimize-images.js b/docs/scripts/optimize-images.js
index 442e366fe..3c5fa60d1 100644
--- a/docs/scripts/optimize-images.js
+++ b/docs/scripts/optimize-images.js
@@ -3,12 +3,53 @@ import path from 'node:path';
import sharp from 'sharp';
-const inputDir = 'public/raw';
-const outputDir = 'public/images';
+const allowedImageExtensions = ['.png', '.jpg', '.jpeg', '.webp'];
+const images = [
+ {
+ sizes: [
+ {
+ formats: ['png'],
+ width: 16,
+ },
+ {
+ formats: ['png'],
+ width: 32,
+ },
+ {
+ formats: ['png'],
+ width: 48,
+ },
+ {
+ formats: ['png'],
+ width: 150,
+ },
+ {
+ formats: ['png'],
+ width: 640,
+ },
+ ],
+ source: 'logo.png',
+ },
+ {
+ sizes: [
+ {
+ formats: ['jpeg', 'webp'],
+ width: 480,
+ },
+ {
+ formats: ['webp'],
+ width: 768,
+ },
+ {
+ formats: ['png', 'webp'],
+ width: 1200,
+ },
+ ],
+ source: 'stainless-logo-wordmark.png',
+ },
+];
-const supportedExtensions = ['.png', '.jpg', '.jpeg', '.webp'];
-const sizes = [480, 768, 1200];
-const formats = ['png', 'webp', 'jpeg'];
+const outputDir = 'public/images';
if (fs.existsSync(outputDir)) {
fs.rmSync(outputDir, { force: true, recursive: true });
@@ -17,22 +58,23 @@ if (fs.existsSync(outputDir)) {
fs.mkdirSync(outputDir, { recursive: true });
async function processImages() {
- const files = fs.readdirSync(inputDir);
-
- for (const file of files) {
- const inputPath = path.join(inputDir, file);
- const ext = path.extname(file).toLowerCase();
- const baseName = path.basename(file, ext);
+ for (const image of images) {
+ const inputPath = path.join('public', image.source);
+ const ext = path.extname(image.source).toLowerCase();
+ const name = path.basename(image.source, ext);
- if (!supportedExtensions.includes(ext)) {
+ if (!allowedImageExtensions.includes(ext)) {
continue;
}
- console.log(`Processing ${file}...`);
-
- for (const size of sizes) {
+ for (const imageSize of image.sizes) {
+ const size = typeof imageSize === 'object' ? imageSize.width : imageSize;
+ const formats =
+ typeof imageSize === 'object'
+ ? imageSize.formats || image.formats
+ : image.formats;
for (const format of formats) {
- const outputFileName = `${baseName}-${size}w.${format}`;
+ const outputFileName = `${name}-${size}w.${format}`;
const outputPath = path.join(outputDir, outputFileName);
let image = sharp(inputPath).resize(size).toFormat(format, {
@@ -44,12 +86,9 @@ async function processImages() {
}
await image.toFile(outputPath);
-
- console.log(`Generated: ${outputFileName}`);
}
}
}
- console.log('✅ Image optimization complete!');
}
processImages().catch((err) => {
diff --git a/packages/client-axios/README.md b/packages/client-axios/README.md
index 3f6101a86..fc8722041 100644
--- a/packages/client-axios/README.md
+++ b/packages/client-axios/README.md
@@ -1,5 +1,5 @@
-
+
Axios Client
🚀 Axios client for `@hey-api/openapi-ts` codegen.
diff --git a/packages/client-fetch/README.md b/packages/client-fetch/README.md
index 01bd3510b..fb393610a 100644
--- a/packages/client-fetch/README.md
+++ b/packages/client-fetch/README.md
@@ -1,5 +1,5 @@
-
+
Fetch API Client
🚀 Fetch API client for `@hey-api/openapi-ts` codegen.
diff --git a/packages/openapi-ts/README.md b/packages/openapi-ts/README.md
index 8ad1da2a7..23806719d 100644
--- a/packages/openapi-ts/README.md
+++ b/packages/openapi-ts/README.md
@@ -1,5 +1,5 @@
-
+
OpenAPI TypeScript
🚀 The OpenAPI to TypeScript codegen. Generate clients, SDKs, validators, and more.