From 2e2056508903540b4f9b78dfccd24b03267457c1 Mon Sep 17 00:00:00 2001 From: Lubos Date: Thu, 4 Apr 2024 14:52:26 +0100 Subject: [PATCH] chore(docs): update documentation --- .editorconfig | 3 +++ README.md | 13 ++----------- docs/.vitepress/config/shared.ts | 8 +++++++- docs/index.md | 31 +++++++++++++++++++++++++++++-- 4 files changed, 41 insertions(+), 14 deletions(-) diff --git a/.editorconfig b/.editorconfig index 90e3ce9f3..19d2c846e 100755 --- a/.editorconfig +++ b/.editorconfig @@ -11,5 +11,8 @@ indent_size = 4 [*.hbs] indent_style = tab +[*.md] +indent_size = 2 + [*.yml] indent_size = 2 diff --git a/README.md b/README.md index 85cefea68..0e865c720 100644 --- a/README.md +++ b/README.md @@ -8,18 +8,9 @@ `openapi-ts` started as a fork of [openapi-typescript-codegen](https://github.com/ferdikoomen/openapi-typescript-codegen). We created it after the original project became [unmaintained](https://github.com/ferdikoomen/openapi-typescript-codegen/issues/1276#issuecomment-1302392146) to add support for OpenAPI v3.1. We plan to resolve the most pressing issues in the original project – open an issue if you'd like to prioritise your use case! -## Features +## Documentation -- Generate TypeScript clients from OpenAPI v2.0, v3.0, and v3.1 specifications -- Support JSON or YAML input files -- Handle external references using [JSON Schema $Ref Parser](https://github.com/APIDevTools/json-schema-ref-parser/) -- Generate Fetch, Node-Fetch, Axios, Angular, or XHR HTTP clients -- Can be used with CLI, Node.js, or npx -- Abortable requests through cancellable promise pattern - -## Getting Started - -Please follow the documentation [here](https://heyapi.vercel.app/). +Please visit our [website](https://heyapi.vercel.app/) for documentation, guides, migrating, and more. ## Contributing diff --git a/docs/.vitepress/config/shared.ts b/docs/.vitepress/config/shared.ts index c92c4d195..05f0f9033 100644 --- a/docs/.vitepress/config/shared.ts +++ b/docs/.vitepress/config/shared.ts @@ -8,11 +8,17 @@ export default defineConfig({ }, head: [ ['link', { rel: 'icon', type: 'image/png', href: '/logo.png' }], + ['meta', { property: 'og:type', content: 'website' }], + ['meta', { property: 'og:locale', content: 'en' }], + ['meta', { property: 'og:title', content: 'Turn your OpenAPI specification into a beautiful TypeScript client' }], + ['meta', { property: 'og:site_name', content: 'OpenAPI TypeScript' }], + ['meta', { property: 'og:image', content: '/logo.png' }], + ['meta', { property: 'og:url', content: 'https://heyapi.vercel.app' }], ], themeConfig: { logo: '/logo.png', socialLinks: [ - { icon: 'npm', link: 'https://www.npmjs.com/package/@hey-api/openapi-ts' }, + { icon: 'npm', link: 'https://npmjs.com/package/@hey-api/openapi-ts' }, { icon: 'github', link: 'https://github.com/hey-api/openapi-ts' }, ], search: { diff --git a/docs/index.md b/docs/index.md index cba100f1d..30a4a2498 100644 --- a/docs/index.md +++ b/docs/index.md @@ -2,8 +2,8 @@ layout: home hero: - name: "OpenAPI TypeScript" - tagline: "Turn your OpenAPI specification into a beautiful TypeScript client" + name: OpenAPI TypeScript + tagline: Turn your OpenAPI specification into a beautiful TypeScript client actions: - theme: brand text: Get Started @@ -17,10 +17,37 @@ hero: features: - title: Full Support + icon: 📝 details: Generate TypeScript clients from OpenAPI v2.0, v3.0, and v3.1 specifications. - title: Local or External + icon: 📝 details: Support for JSON and YAML input files, or pass a remote URL to your specification. - title: Clients + icon: 📝 details: Generate a Fetch, Node-Fetch, Axios, Angular, or XHR HTTP client. --- +