Skip to content

Commit 9b2a899

Browse files
authored
docs: generated docs site with vitepress (#34)
1 parent 934f30f commit 9b2a899

File tree

115 files changed

+5559
-2007
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+5559
-2007
lines changed

alchemy-web/.gitignore

+1-20
Original file line numberDiff line numberDiff line change
@@ -1,20 +1 @@
1-
# build output
2-
dist/
3-
.output/
4-
5-
# dependencies
6-
node_modules/
7-
8-
# logs
9-
npm-debug.log*
10-
yarn-debug.log*
11-
yarn-error.log*
12-
pnpm-debug.log*
13-
14-
# environment variables
15-
.env
16-
.env.production
17-
18-
# macOS-specific files
19-
.DS_Store
20-
.astro/
1+
.vitepress/cache

alchemy-web/.vitepress/config.mts

+194
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,194 @@
1+
import { transformerTwoslash } from "@shikijs/vitepress-twoslash";
2+
import footnotePlugin from "markdown-it-footnote";
3+
import { defineConfig } from "vitepress";
4+
5+
// https://vitepress.dev/reference/site-config
6+
export default defineConfig({
7+
title: "Alchemy",
8+
description: "Alchemy Docs",
9+
markdown: {
10+
// @ts-ignore
11+
codeTransformers: [transformerTwoslash()],
12+
theme: { light: "light-plus", dark: "dark-plus" },
13+
config: (md) => md.use(footnotePlugin),
14+
},
15+
// https://vitepress.dev/reference/default-theme-config
16+
themeConfig: {
17+
nav: [
18+
{ text: "Home", link: "/" },
19+
{ text: "Docs", link: "/docs/getting-started" },
20+
],
21+
sidebar: [
22+
{ text: "Getting Started", link: "/docs/getting-started" },
23+
{
24+
text: "Tutorials",
25+
link: "/docs/tutorials/deploy-cloudflare-worker-and-static-site",
26+
collapsed: false,
27+
items: [
28+
{
29+
text: "Deploying a Cloudflare Worker and Static Site",
30+
link: "/docs/tutorials/deploy-cloudflare-worker-and-static-site",
31+
},
32+
{
33+
text: "Bundling and Deploying an AWS Lambda Function",
34+
link: "/docs/tutorials/deploy-aws-lambda-function",
35+
},
36+
],
37+
},
38+
{
39+
text: "Providers",
40+
link: "/docs/providers",
41+
collapsed: false,
42+
items: [
43+
{
44+
text: "ai",
45+
collapsed: true,
46+
items: [
47+
{ text: "Approve", link: "/docs/providers/ai/approve.md" },
48+
{ text: "Astro File", link: "/docs/providers/ai/astro-file.md" },
49+
{ text: "CSS File", link: "/docs/providers/ai/css-file.md" },
50+
{ text: "Data", link: "/docs/providers/ai/data.md" },
51+
{ text: "Document", link: "/docs/providers/ai/document.md" },
52+
{ text: "HTML File", link: "/docs/providers/ai/html-file.md" },
53+
{ text: "JSON File", link: "/docs/providers/ai/json-file.md" },
54+
{ text: "Review", link: "/docs/providers/ai/review.md" },
55+
{
56+
text: "TypeScript File",
57+
link: "/docs/providers/ai/typescript-file.md",
58+
},
59+
{ text: "Vue File", link: "/docs/providers/ai/vue-file.md" },
60+
{ text: "YAML File", link: "/docs/providers/ai/yaml-file.md" },
61+
],
62+
},
63+
{
64+
text: "aws",
65+
collapsed: true,
66+
items: [
67+
{ text: "Bucket", link: "/docs/providers/aws/bucket.md" },
68+
{ text: "Function", link: "/docs/providers/aws/function.md" },
69+
{ text: "Policy", link: "/docs/providers/aws/policy.md" },
70+
{
71+
text: "Policy Attachment",
72+
link: "/docs/providers/aws/policy-attachment.md",
73+
},
74+
{ text: "Queue", link: "/docs/providers/aws/queue.md" },
75+
{ text: "Role", link: "/docs/providers/aws/role.md" },
76+
{ text: "SES", link: "/docs/providers/aws/ses.md" },
77+
{ text: "Table", link: "/docs/providers/aws/table.md" },
78+
],
79+
},
80+
{
81+
text: "cloudflare",
82+
collapsed: true,
83+
items: [
84+
{
85+
text: "DNS Records",
86+
link: "/docs/providers/cloudflare/dns.md",
87+
},
88+
{
89+
text: "KV Namespace",
90+
link: "/docs/providers/cloudflare/kv-namespace.md",
91+
},
92+
{
93+
text: "R2 Bucket",
94+
link: "/docs/providers/cloudflare/bucket.md",
95+
},
96+
{
97+
text: "Static Site",
98+
link: "/docs/providers/cloudflare/static-site.md",
99+
},
100+
{ text: "Worker", link: "/docs/providers/cloudflare/worker.md" },
101+
{
102+
text: "Wrangler Json",
103+
link: "/docs/providers/cloudflare/wrangler.json.md",
104+
},
105+
{ text: "Zone", link: "/docs/providers/cloudflare/zone.md" },
106+
],
107+
},
108+
{
109+
text: "dns",
110+
collapsed: true,
111+
items: [
112+
{
113+
text: "Import Dns Records",
114+
link: "/docs/providers/dns/import-dns.md",
115+
},
116+
],
117+
},
118+
{
119+
text: "esbuild",
120+
collapsed: true,
121+
items: [
122+
{ text: "Bundle", link: "/docs/providers/esbuild/bundle.md" },
123+
],
124+
},
125+
{
126+
text: "fs",
127+
collapsed: true,
128+
items: [
129+
{ text: "Copy File", link: "/docs/providers/fs/copy-file.md" },
130+
{ text: "File", link: "/docs/providers/fs/file.md" },
131+
{ text: "Folder", link: "/docs/providers/fs/folder.md" },
132+
{
133+
text: "Static Astro File",
134+
link: "/docs/providers/fs/static-astro-file.md",
135+
},
136+
{
137+
text: "Static CSS File",
138+
link: "/docs/providers/fs/static-css-file.md",
139+
},
140+
{
141+
text: "Static HTML File",
142+
link: "/docs/providers/fs/static-html-file.md",
143+
},
144+
{
145+
text: "Static JSON File",
146+
link: "/docs/providers/fs/static-json-file.md",
147+
},
148+
{
149+
text: "Static Text File",
150+
link: "/docs/providers/fs/static-text-file.md",
151+
},
152+
{
153+
text: "Static TypeScript File",
154+
link: "/docs/providers/fs/static-typescript-file.md",
155+
},
156+
{
157+
text: "Static Vue File",
158+
link: "/docs/providers/fs/static-vue-file.md",
159+
},
160+
{
161+
text: "Static YAML File",
162+
link: "/docs/providers/fs/static-yaml-file.md",
163+
},
164+
],
165+
},
166+
{
167+
text: "github",
168+
collapsed: true,
169+
items: [
170+
{
171+
text: "GitHub Secret",
172+
link: "/docs/providers/github/secret.md",
173+
},
174+
],
175+
},
176+
{
177+
text: "stripe",
178+
collapsed: true,
179+
items: [
180+
{ text: "Price", link: "/docs/providers/stripe/price.md" },
181+
{ text: "Product", link: "/docs/providers/stripe/product.md" },
182+
{
183+
text: "Webhook Endpoint",
184+
link: "/docs/providers/stripe/webhook.md",
185+
},
186+
],
187+
},
188+
],
189+
},
190+
],
191+
search: { provider: "local" },
192+
socialLinks: [],
193+
},
194+
});

alchemy-web/.vitepress/theme/index.ts

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import TwoslashFloatingVue from "@shikijs/vitepress-twoslash/client";
2+
import "@shikijs/vitepress-twoslash/style.css";
3+
import type { Theme as ThemeConfig } from "vitepress";
4+
import Theme from "vitepress/theme-without-fonts";
5+
import "./style.css";
6+
7+
export default {
8+
extends: Theme,
9+
enhanceApp(ctx) {
10+
ctx.app.use(TwoslashFloatingVue);
11+
},
12+
} satisfies ThemeConfig;
+138
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
/**
2+
* Customize default theme styling by overriding CSS variables:
3+
* https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/vars.css
4+
*/
5+
6+
/**
7+
* Colors
8+
*
9+
* Each colors have exact same color scale system with 3 levels of solid
10+
* colors with different brightness, and 1 soft color.
11+
*
12+
* - `XXX-1`: The most solid color used mainly for colored text. It must
13+
* satisfy the contrast ratio against when used on top of `XXX-soft`.
14+
*
15+
* - `XXX-2`: The color used mainly for hover state of the button.
16+
*
17+
* - `XXX-3`: The color for solid background, such as bg color of the button.
18+
* It must satisfy the contrast ratio with pure white (#ffffff) text on
19+
* top of it.
20+
*
21+
* - `XXX-soft`: The color used for subtle background such as custom container
22+
* or badges. It must satisfy the contrast ratio when putting `XXX-1` colors
23+
* on top of it.
24+
*
25+
* The soft color must be semi transparent alpha channel. This is crucial
26+
* because it allows adding multiple "soft" colors on top of each other
27+
* to create a accent, such as when having inline code block inside
28+
* custom containers.
29+
*
30+
* - `default`: The color used purely for subtle indication without any
31+
* special meanings attached to it such as bg color for menu hover state.
32+
*
33+
* - `brand`: Used for primary brand colors, such as link text, button with
34+
* brand theme, etc.
35+
*
36+
* - `tip`: Used to indicate useful information. The default theme uses the
37+
* brand color for this by default.
38+
*
39+
* - `warning`: Used to indicate warning to the users. Used in custom
40+
* container, badges, etc.
41+
*
42+
* - `danger`: Used to show error, or dangerous message to the users. Used
43+
* in custom container, badges, etc.
44+
* -------------------------------------------------------------------------- */
45+
46+
:root {
47+
--vp-c-default-1: var(--vp-c-gray-1);
48+
--vp-c-default-2: var(--vp-c-gray-2);
49+
--vp-c-default-3: var(--vp-c-gray-3);
50+
--vp-c-default-soft: var(--vp-c-gray-soft);
51+
52+
--vp-c-brand-1: var(--vp-c-indigo-1);
53+
--vp-c-brand-2: var(--vp-c-indigo-2);
54+
--vp-c-brand-3: var(--vp-c-indigo-3);
55+
--vp-c-brand-soft: var(--vp-c-indigo-soft);
56+
57+
--vp-c-tip-1: var(--vp-c-brand-1);
58+
--vp-c-tip-2: var(--vp-c-brand-2);
59+
--vp-c-tip-3: var(--vp-c-brand-3);
60+
--vp-c-tip-soft: var(--vp-c-brand-soft);
61+
62+
--vp-c-warning-1: var(--vp-c-yellow-1);
63+
--vp-c-warning-2: var(--vp-c-yellow-2);
64+
--vp-c-warning-3: var(--vp-c-yellow-3);
65+
--vp-c-warning-soft: var(--vp-c-yellow-soft);
66+
67+
--vp-c-danger-1: var(--vp-c-red-1);
68+
--vp-c-danger-2: var(--vp-c-red-2);
69+
--vp-c-danger-3: var(--vp-c-red-3);
70+
--vp-c-danger-soft: var(--vp-c-red-soft);
71+
}
72+
73+
/**
74+
* Component: Button
75+
* -------------------------------------------------------------------------- */
76+
77+
:root {
78+
--vp-button-brand-border: transparent;
79+
--vp-button-brand-text: var(--vp-c-white);
80+
--vp-button-brand-bg: var(--vp-c-brand-3);
81+
--vp-button-brand-hover-border: transparent;
82+
--vp-button-brand-hover-text: var(--vp-c-white);
83+
--vp-button-brand-hover-bg: var(--vp-c-brand-2);
84+
--vp-button-brand-active-border: transparent;
85+
--vp-button-brand-active-text: var(--vp-c-white);
86+
--vp-button-brand-active-bg: var(--vp-c-brand-1);
87+
}
88+
89+
/**
90+
* Component: Home
91+
* -------------------------------------------------------------------------- */
92+
93+
:root {
94+
--vp-home-hero-name-color: transparent;
95+
--vp-home-hero-name-background: -webkit-linear-gradient(
96+
120deg,
97+
#bd34fe 30%,
98+
#41d1ff
99+
);
100+
101+
--vp-home-hero-image-background-image: linear-gradient(
102+
-45deg,
103+
#bd34fe 50%,
104+
#47caff 50%
105+
);
106+
--vp-home-hero-image-filter: blur(44px);
107+
}
108+
109+
@media (min-width: 640px) {
110+
:root {
111+
--vp-home-hero-image-filter: blur(56px);
112+
}
113+
}
114+
115+
@media (min-width: 960px) {
116+
:root {
117+
--vp-home-hero-image-filter: blur(68px);
118+
}
119+
}
120+
121+
/**
122+
* Component: Custom Block
123+
* -------------------------------------------------------------------------- */
124+
125+
:root {
126+
--vp-custom-block-tip-border: transparent;
127+
--vp-custom-block-tip-text: var(--vp-c-text-1);
128+
--vp-custom-block-tip-bg: var(--vp-c-brand-soft);
129+
--vp-custom-block-tip-code-bg: var(--vp-c-brand-soft);
130+
}
131+
132+
/**
133+
* Component: Algolia
134+
* -------------------------------------------------------------------------- */
135+
136+
.DocSearch {
137+
--docsearch-primary-color: var(--vp-c-brand-1) !important;
138+
}

alchemy-web/astro.config.ts

-13
This file was deleted.

0 commit comments

Comments
 (0)