diff --git a/scripts/update.sh b/scripts/update.sh index 1bb544c6..16f4a861 100755 --- a/scripts/update.sh +++ b/scripts/update.sh @@ -142,7 +142,7 @@ EOF cat << 'EOF' > "$SIDEBAR_ITEMS_PATH" // DO NOT EDIT THIS FILE. ANY CHANGES MADE TO THIS FILE WILL BE OVERWRITTEN. -import { SidebarItem } from "vocs"; +import type { SidebarItem } from "./types"; export const exampleItems: SidebarItem[] = [ EOF diff --git a/vocs/bun.lockb b/vocs/bun.lockb index fd3d8ad5..62810009 100755 Binary files a/vocs/bun.lockb and b/vocs/bun.lockb differ diff --git a/vocs/docs/pages/index.mdx b/vocs/docs/pages/index.mdx index e02ff5e5..a723690e 100644 --- a/vocs/docs/pages/index.mdx +++ b/vocs/docs/pages/index.mdx @@ -7,7 +7,7 @@ layout: landing showLogo: false --- -import { HomePage, Sponsors } from "vocs/components"; +import { HomePage } from "vocs";
@@ -380,6 +380,29 @@ Join the Community # Supporters - +
+ + Paradigm + + + Ithaca + +
diff --git a/vocs/example-items.ts b/vocs/example-items.ts index f334900c..9630bbd8 100644 --- a/vocs/example-items.ts +++ b/vocs/example-items.ts @@ -1,6 +1,6 @@ // DO NOT EDIT THIS FILE. ANY CHANGES MADE TO THIS FILE WILL BE OVERWRITTEN. -import { SidebarItem } from "vocs"; +import type { SidebarItem } from "./types"; export const exampleItems: SidebarItem[] = [ { text: 'Advanced', collapsed: true, link: '/examples/advanced/README', items: [ diff --git a/vocs/package.json b/vocs/package.json index e7164efb..f8870072 100644 --- a/vocs/package.json +++ b/vocs/package.json @@ -12,7 +12,9 @@ "caniuse-lite": "^1.0.30001755", "react": "latest", "react-dom": "latest", - "vocs": "latest" + "vite": "^8.0.16", + "vocs": "2.0.10", + "waku": "^1.0.0-beta.0" }, "devDependencies": { "@types/react": "latest", diff --git a/vocs/sidebar.ts b/vocs/sidebar.ts index 05e0f135..c0923435 100644 --- a/vocs/sidebar.ts +++ b/vocs/sidebar.ts @@ -1,4 +1,4 @@ -import { Sidebar } from "vocs"; +import type { Sidebar } from "./types"; import { exampleItems } from "./example-items"; export const sidebar: Sidebar = [ diff --git a/vocs/types.ts b/vocs/types.ts new file mode 100644 index 00000000..8b7ff8ef --- /dev/null +++ b/vocs/types.ts @@ -0,0 +1,16 @@ +export type SidebarItem = { + badge?: + | string + | { + text: string; + variant?: "note" | "info" | "warning" | "danger" | "tip" | "success"; + }; + collapsed?: boolean; + disabled?: boolean; + external?: boolean; + items?: SidebarItem[]; + link?: string; + text?: string; +}; + +export type Sidebar = SidebarItem[] | Record; diff --git a/vocs/vocs.config.ts b/vocs/vocs.config.ts new file mode 100644 index 00000000..935c84df --- /dev/null +++ b/vocs/vocs.config.ts @@ -0,0 +1,45 @@ +import { defineConfig } from 'vocs/config' +import { sidebar } from './sidebar' +export default defineConfig({ + title: 'alloy', + logoUrl: '/alloy-logo.png', + srcDir: 'docs', + sidebar, + iconUrl: { light: '/favicon.png', dark: '/favicon.png' }, + ogImageUrl: 'https://raw.githubusercontent.com/alloy-rs/book/master/vocs/docs/publics/banner.jpg', + socials: [ + { icon: 'github', link: "https://github.com/alloy-rs/alloy" }, + { icon: 'telegram', link: "https://t.me/ethers_rs" }, + ], + topNav: [ + { + text: 'Docs', + link: '/introduction/getting-started', + }, + { + text: 'Examples', + link: 'https://github.com/alloy-rs/examples', + }, + { + text: 'docs.rs', + link: 'https://docs.rs/alloy/latest/alloy/', + }, + { + text: '2.0.5', + items: [ + { + text: 'Changelog', + link: 'https://github.com/alloy-rs/alloy/blob/main/CHANGELOG.md', + }, + { + text: 'Contributing', + link: 'https://github.com/alloy-rs/alloy/blob/main/CONTRIBUTING.md', + }, + ], + }, + ], + editLink: { + link: 'https://github.com/alloy-rs/docs/edit/main/vocs/docs/pages/:path', + text: 'Suggest changes on GitHub', + } +}) diff --git a/vocs/vocs.config.tsx b/vocs/vocs.config.tsx deleted file mode 100644 index 490acd8e..00000000 --- a/vocs/vocs.config.tsx +++ /dev/null @@ -1,75 +0,0 @@ -import { defineConfig } from 'vocs' -import { sidebar } from './sidebar' -export default defineConfig({ - title: 'alloy', - logoUrl: '/alloy-logo.png', - sidebar, - sponsors: [ - { - name: 'Collaborator', - height: 120, - items: [ - [ - { - name: 'Paradigm', - link: 'https://paradigm.xyz', - image: - 'https://raw.githubusercontent.com/wevm/.github/main/content/sponsors/paradigm-light.svg', - }, - { - name: 'Ithaca', - link: 'https://ithaca.xyz', - image: - 'https://raw.githubusercontent.com/wevm/.github/main/content/sponsors/ithaca-light.svg', - }, - ], - ], - } - ], - iconUrl: { light: '/favicon.png', dark: '/favicon.png' }, - head() { - return ( - <> - - - - - - ) - }, - socials: [ - { icon: 'github', link: "https://github.com/alloy-rs/alloy" }, - { icon: 'telegram', link: "https://t.me/ethers_rs" }, - ], - topNav: [ - { - text: 'Docs', - link: '/introduction/getting-started', - }, - { - text: 'Examples', - link: 'https://github.com/alloy-rs/examples', - }, - { - text: 'docs.rs', - link: 'https://docs.rs/alloy/latest/alloy/', - }, - { - text: '2.0.5', - items: [ - { - text: 'Changelog', - link: 'https://github.com/alloy-rs/alloy/blob/main/CHANGELOG.md', - }, - { - text: 'Contributing', - link: 'https://github.com/alloy-rs/alloy/blob/main/CONTRIBUTING.md', - }, - ], - }, - ], - editLink: { - pattern: 'https://github.com/alloy-rs/docs/edit/main/vocs/docs/pages/:path', - text: 'Suggest changes on GitHub', - } -})