Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: rewritten #161

Open
wants to merge 59 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
f84cc7b
init
unnoq Feb 18, 2025
dcdc80f
skeleton
unnoq Feb 18, 2025
883a582
home page
unnoq Feb 18, 2025
eed60a6
fix links
unnoq Feb 18, 2025
3ccf4a1
home page
unnoq Feb 18, 2025
8b455e0
structure
unnoq Feb 18, 2025
1bfbac8
wip
unnoq Feb 19, 2025
f19c321
redirect
unnoq Feb 19, 2025
ef88692
/docs/getting-started
unnoq Feb 19, 2025
63e0b21
/docs/getting-started
unnoq Feb 19, 2025
8930d32
/docs/getting-started
unnoq Feb 19, 2025
f87c233
/docs/openapi/getting-started
unnoq Feb 19, 2025
6db6fce
/docs/procedure
unnoq Feb 19, 2025
1838350
/docs/procedure
unnoq Feb 20, 2025
e048899
/docs/router
unnoq Feb 20, 2025
389b91d
/docs/middleware
unnoq Feb 20, 2025
fb0037e
/docs/context
unnoq Feb 20, 2025
3bbf00c
/docs/context
unnoq Feb 20, 2025
edd3661
/docs/error-handling
unnoq Feb 20, 2025
3d7e085
/docs/file-upload-download
unnoq Feb 20, 2025
03215ff
/docs/event-iterator
unnoq Feb 20, 2025
04ba9dd
/docs/rpc-handler
unnoq Feb 20, 2025
ce12e04
/docs/contract-first/define-contract
unnoq Feb 20, 2025
da93c5b
/docs/rpc-handler
unnoq Feb 20, 2025
cbdf72b
/docs/rpc-handler
unnoq Feb 20, 2025
5459ed9
/docs/contract-first/implement-contract
unnoq Feb 20, 2025
a6fcb39
/docs/router
unnoq Feb 20, 2025
b37a436
/docs/openapi/routing
unnoq Feb 21, 2025
eaf3951
/docs/openapi/input-output-structure
unnoq Feb 21, 2025
ace388e
/docs/openapi/error-handling
unnoq Feb 21, 2025
659e386
integrations
unnoq Feb 21, 2025
ce450d0
integrations
unnoq Feb 21, 2025
5d2bed9
integrations
unnoq Feb 21, 2025
8f64959
integrations
unnoq Feb 21, 2025
8fdbd8e
integrations
unnoq Feb 21, 2025
f68220c
integrations
unnoq Feb 21, 2025
3f0ee07
plugins
unnoq Feb 21, 2025
47f93e6
/docs/server-action
unnoq Feb 21, 2025
5023d5c
/docs/client/server-side
unnoq Feb 21, 2025
6054209
/docs/client/client-side
unnoq Feb 21, 2025
c92dc62
integrations
unnoq Feb 22, 2025
d30b4c6
integrations
unnoq Feb 22, 2025
1158bd5
/docs/client/server-side
unnoq Feb 22, 2025
da09586
/docs/client/error-handling
unnoq Feb 22, 2025
038361a
/docs/client/event-iterator
unnoq Feb 22, 2025
42ee21b
/docs/client/rpc-link
unnoq Feb 22, 2025
c985cd9
/docs/client/dynamic-link
unnoq Feb 22, 2025
9b014a8
/docs/tanstack-query
unnoq Feb 22, 2025
f3ec443
/docs/pinia-colada
unnoq Feb 23, 2025
0e3444d
comparison and playgrounds
unnoq Feb 23, 2025
4070778
/docs/advanced/validation-errors
unnoq Feb 23, 2025
143b667
wip
unnoq Feb 23, 2025
22c7599
/docs/lifecycle
unnoq Feb 24, 2025
3a8b7f9
/docs/openapi/bracket-notation
unnoq Feb 24, 2025
7d92337
improve
unnoq Feb 24, 2025
a7709af
/docs/openapi/openapi-handler
unnoq Feb 24, 2025
759a092
/docs/openapi/specification
unnoq Feb 24, 2025
b62f4bb
/docs/openapi/client/openapi-link
unnoq Feb 24, 2025
2108bfc
/docs/openapi/plugins/zod-smart-coercion
unnoq Feb 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
!.*.example
!.vscode/
!.github/
!.vitepress/

# Common generated folders
logs/
Expand Down
52 changes: 24 additions & 28 deletions apps/content/.gitignore
Original file line number Diff line number Diff line change
@@ -1,28 +1,24 @@
# deps
/node_modules

# generated content
.contentlayer
.content-collections
.source

# test & build
/coverage
/.next/
/out/
/build
*.tsbuildinfo

# misc
.DS_Store
*.pem
/.pnp
.pnp.js
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# others
.env*.local
.vercel
next-env.d.ts
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
2 changes: 2 additions & 0 deletions apps/content/.vitepress/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist
cache
190 changes: 190 additions & 0 deletions apps/content/.vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
import { transformerTwoslash } from '@shikijs/vitepress-twoslash'
import { defineConfig } from 'vitepress'
import { groupIconMdPlugin, groupIconVitePlugin } from 'vitepress-plugin-group-icons'

export default defineConfig({
lang: 'en-US',
title: 'oRPC',
description:
'oRPC makes it easy to build APIs that are end-to-end type-safe and adhere to OpenAPI standards, ensuring a smooth and enjoyable developer experience.',
lastUpdated: true,
ignoreDeadLinks: true,
cleanUrls: true,
markdown: {
theme: {
light: 'github-light',
dark: 'github-dark',
},
config(md) {
md.use(groupIconMdPlugin)
},
codeTransformers: [
transformerTwoslash(),
],
},
themeConfig: {
logo: '/logo.webp',
siteTitle: '',
socialLinks: [
{ icon: 'github', link: 'https://github.com/unnoq/orpc' },
{ icon: 'discord', link: 'https://discord.gg/TXEbwRBvQn' },
{ icon: 'x', link: 'https://x.com/unnoqcom' },
{ icon: 'bluesky', link: 'https://bsky.app/profile/unnoq.com' },
],
editLink: {
pattern: 'https://github.com/unnoq/orpc/blob/main/apps/content/:path',
text: 'Edit on GitHub',
},
footer: {
message: 'Released under the MIT License.',
copyright: 'Copyright © 2024-present Unnoq & oRPC contributors.',
},
nav: [
{ text: 'Docs', link: '/docs/getting-started', activeMatch: '/docs/(?!openapi/)' },
{ text: 'OpenAPI', link: '/docs/openapi/getting-started', activeMatch: '/docs/openapi/' },
{ text: 'Examples', link: '/examples/', activeMatch: '/examples/' },
{ text: 'Sponsor', link: '/sponsor' },
{
text: 'About',
items: [
{ text: 'Motivation', link: '/motivation' },
{ text: 'Releases', link: 'https://github.com/unnoq/orpc/releases' },
],
},
{ text: 'Discussions', link: 'https://github.com/unnoq/orpc/discussions' },
],
sidebar: {
'/docs/': [
{ text: 'Getting Started', link: '/docs/getting-started' },
{ text: 'Procedure', link: '/docs/procedure' },
{ text: 'Router', link: '/docs/router' },
{ text: 'Middleware', link: '/docs/middleware' },
{ text: 'Context', link: '/docs/context' },
{ text: 'Error Handling', link: '/docs/error-handling' },
{ text: 'File Upload/Download', link: '/docs/file-upload-download' },
{ text: 'Event Iterator (SSE)', link: '/docs/event-iterator' },
{ text: 'Server Action', link: '/docs/server-action' },
{ text: 'RPC Handler', link: '/docs/rpc-handler' },
{ text: 'Lifecycle', link: '/docs/lifecycle' },
{
text: 'Contract First',
collapsed: true,
items: [
{ text: 'Define Contract', link: '/docs/contract-first/define-contract' },
{ text: 'Implement Contract', link: '/docs/contract-first/implement-contract' },
],
},
{
text: 'Integrations',
collapsed: true,
items: [
{ text: 'Fetch server', link: '/docs/integrations/fetch-server' },
{ text: 'Node', link: '/docs/integrations/node' },
{ text: 'Bun', link: '/docs/integrations/bun' },
{ text: 'Cloudflare Workers', link: '/docs/integrations/cloudflare-workers' },
{ text: 'Deno', link: '/docs/integrations/deno' },
{ text: 'Express', link: '/docs/integrations/express' },
{ text: 'Next.js', link: '/docs/integrations/nextjs' },
{ text: 'Nuxt', link: '/docs/integrations/nuxt' },
{ text: 'Hono', link: '/docs/integrations/hono' },
{ text: 'Tanstack Start', link: '/docs/integrations/tanstack-start' },
{ text: 'Elysia', link: '/docs/integrations/elysia' },
{ text: 'SvelteKit', link: '/docs/integrations/svelte-kit' },
{ text: 'Remix', link: '/docs/integrations/remix' },
{ text: 'SolidStart', link: '/docs/integrations/solid-start' },
],
},
{
text: 'Plugins',
collapsed: true,
items: [
{ text: 'CORS', link: '/docs/plugins/cors' },
{ text: 'Response Headers', link: '/docs/plugins/response-headers' },
],
},
{
text: 'Client',
collapsed: true,
items: [
{ text: 'Server-Side', link: '/docs/client/server-side' },
{ text: 'Client-Side', link: '/docs/client/client-side' },
{ text: 'Error Handling', link: '/docs/client/error-handling' },
{ text: 'Event Iterator', link: '/docs/client/event-iterator' },
{ text: 'RPC Link', link: '/docs/client/rpc-link' },
{ text: 'Dynamic Link', link: '/docs/client/dynamic-link' },
],
},
{
text: 'Tanstack Query',
collapsed: true,
items: [
{ text: 'Basic', link: '/docs/tanstack-query/basic' },
{ text: 'React', link: '/docs/tanstack-query/react' },
{ text: 'Vue', link: '/docs/tanstack-query/vue' },
],
},
{
text: 'Advanced',
collapsed: true,
items: [
{ text: 'Validation Errors', link: '/docs/advanced/validation-errors' },
{ text: 'RPC Protocol', link: '/docs/advanced/rpc-protocol' },
],
},
{
text: 'Others',
collapsed: true,
items: [
{ text: 'Pinia Colada', link: '/docs/pinia-colada' },
{ text: 'Playgrounds', link: '/docs/playgrounds' },
{ text: 'Comparison', link: '/docs/comparison' },
],
},
],
'/docs/openapi/': [
{ text: 'Getting Started', link: '/docs/openapi/getting-started' },
{ text: 'Routing', link: '/docs/openapi/routing' },
{ text: 'Input/Output Structure', link: '/docs/openapi/input-output-structure' },
{ text: 'Error Handling', link: '/docs/openapi/error-handling' },
{ text: 'Bracket Notation', link: '/docs/openapi/bracket-notation' },
{ text: 'OpenAPI Handler', link: '/docs/openapi/openapi-handler' },
{ text: 'OpenAPI Specification', link: '/docs/openapi/openapi-specification' },
{
text: 'Plugins',
collapsed: true,
items: [
{ text: 'Zod Smart Coercion', link: '/docs/openapi/plugins/zod-smart-coercion' },
],
},
{
text: 'Client',
collapsed: true,
items: [
{ text: 'OpenAPI Link', link: '/docs/openapi/client/openapi-link' },
],
},
],
'/examples/': [

],
},
},
head: [
['meta', { property: 'og:image', content: 'https://orpc.unnoq.com/og.jpg' }],
['meta', { property: 'og:type', content: 'website' }],
['meta', { property: 'twitter:domain', content: 'orpc.unnoq.com' }],
['meta', { property: 'twitter:image', content: 'https://orpc.unnoq.com/og.jpg' }],
['meta', { property: 'twitter:card', content: 'summary_large_image' }],
['link', { rel: 'shortcut icon', href: '/icon.svg', type: 'image/svg+xml' }],
],
titleTemplate: ':title - oRPC',
vite: {
plugins: [
groupIconVitePlugin({
customIcon: {
cloudflare: 'logos:cloudflare-workers-icon',
},
}),
],
},
})
38 changes: 38 additions & 0 deletions apps/content/.vitepress/theme/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
:root {
--vp-font-family-base: -apple-system, BlinkMacSystemFont, segoe ui, Helvetica, Arial, sans-serif, apple color emoji,
segoe ui emoji;
--vp-font-family-mono: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
}

.vp-doc h1,
.vp-doc h2,
.vp-doc h3,
.vp-doc h4,
.vp-doc h5,
.vp-doc h6 {
font-weight: 700;
}

.title {
font-weight: 700 !important;
}

.tagline {
max-width: 500px !important;
}

body {
-webkit-font-smoothing: subpixel-antialiased;
}

.VPImage.image-src {
padding-top: 12%;
max-width: 512px;
max-height: 512px;
}

@media screen and (max-width: 960px) {
.VPHero.has-image .image {
display: none;
}
}
14 changes: 14 additions & 0 deletions apps/content/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import type { EnhanceAppContext } from 'vitepress'
import TwoslashFloatingVue from '@shikijs/vitepress-twoslash/client'
import Theme from 'vitepress/theme'

import 'virtual:group-icons.css'
import '@shikijs/vitepress-twoslash/style.css'
import './custom.css'

export default {
extends: Theme,
enhanceApp({ app }: EnhanceAppContext) {
app.use(TwoslashFloatingVue)
},
}
26 changes: 0 additions & 26 deletions apps/content/README.md

This file was deleted.

Loading