|
1 | | -import { themes as prismThemes } from "prism-react-renderer"; |
2 | | -import type { Config } from "@docusaurus/types"; |
3 | | -import type * as Preset from "@docusaurus/preset-classic"; |
| 1 | +import { themes as prismThemes } from 'prism-react-renderer' |
| 2 | +import type * as Preset from '@docusaurus/preset-classic' |
| 3 | +import type { Config } from '@docusaurus/types' |
4 | 4 |
|
5 | | -// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...) |
6 | 5 |
|
7 | 6 | const config: Config = { |
8 | | - title: "StakeWise Docs", |
9 | | - tagline: "Dinosaurs are cool", |
10 | | - favicon: "img/favicon.ico", |
| 7 | + title: 'Welcome to StakeWise Docs', |
| 8 | + tagline: 'Documentation and Guides', |
| 9 | + url: 'https://docs.stakewise.io', |
| 10 | + favicon: 'img/favicon.ico', |
| 11 | + baseUrl: '/', |
| 12 | + projectName: 'docs', // Usually your repo name. |
| 13 | + organizationName: 'stakewise', // Usually your GitHub org/user name. |
11 | 14 |
|
12 | | - // Set the production url of your site here |
13 | | - url: "https://docs.stakewise.io", |
14 | | - // Set the /<baseUrl>/ pathname under which your site is served |
15 | | - // For GitHub pages deployment, it is often '/<projectName>/' |
16 | | - baseUrl: "/", |
| 15 | + onBrokenLinks: 'warn', |
| 16 | + onBrokenAnchors: 'throw', |
| 17 | + onDuplicateRoutes: 'throw', |
| 18 | + onBrokenMarkdownLinks: 'throw', |
17 | 19 |
|
18 | | - // GitHub pages deployment config. |
19 | | - // If you aren't using GitHub pages, you don't need these. |
20 | | - organizationName: "stakewise", // Usually your GitHub org/user name. |
21 | | - projectName: "docs", // Usually your repo name. |
22 | | - |
23 | | - onBrokenLinks: "warn", |
24 | | - onBrokenMarkdownLinks: "warn", |
25 | | - |
26 | | - // Even if you don't use internationalization, you can use this field to set |
27 | | - // useful metadata like html lang. For example, if your site is Chinese, you |
28 | | - // may want to replace "en" with "zh-Hans". |
29 | 20 | i18n: { |
30 | | - defaultLocale: "en", |
31 | | - locales: ["en"], |
| 21 | + defaultLocale: 'en', |
| 22 | + locales: ['en'], |
32 | 23 | }, |
33 | 24 |
|
34 | 25 | presets: [ |
35 | 26 | [ |
36 | | - "classic", |
| 27 | + '@docusaurus/preset-classic', |
37 | 28 | { |
38 | 29 | docs: { |
39 | | - sidebarPath: "./sidebars.ts", |
40 | | - routeBasePath: "/", |
41 | | - // Please change this to your repo. |
42 | | - // Remove this to remove the "edit this page" links. |
43 | | - editUrl: |
44 | | - "https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/", |
| 30 | + sidebarPath: './sidebars.ts', |
| 31 | + showLastUpdateTime: true, |
| 32 | + routeBasePath: '/', |
| 33 | + breadcrumbs: true, |
45 | 34 | }, |
46 | | - // blog: { |
47 | | - // showReadingTime: true, |
48 | | - // feedOptions: { |
49 | | - // type: ["rss", "atom"], |
50 | | - // xslt: true, |
51 | | - // }, |
52 | | - // // Please change this to your repo. |
53 | | - // // Remove this to remove the "edit this page" links. |
54 | | - // editUrl: |
55 | | - // "https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/", |
56 | | - // // Useful options to enforce blogging best practices |
57 | | - // onInlineTags: "warn", |
58 | | - // onInlineAuthors: "warn", |
59 | | - // onUntruncatedBlogPosts: "warn", |
60 | | - // }, |
61 | 35 | theme: { |
62 | | - customCss: "./src/css/custom.css", |
| 36 | + customCss: require.resolve('./src/css/custom.css'), |
63 | 37 | }, |
64 | | - } satisfies Preset.Options, |
| 38 | + } |
65 | 39 | ], |
66 | 40 | ], |
67 | 41 |
|
| 42 | + plugins: [ |
| 43 | + './src/plugins/tailwind-config.js', |
| 44 | + ], |
| 45 | + |
68 | 46 | themeConfig: { |
69 | | - // Replace with your project's social card |
70 | | - image: "img/docusaurus-social-card.jpg", |
71 | | - tableOfContents: { minHeadingLevel: 2, maxHeadingLevel: 5 }, |
| 47 | + respectPrefersColorScheme: true, |
| 48 | + image: 'img/og-image.png', |
| 49 | + |
| 50 | + docs: { |
| 51 | + sidebar: { |
| 52 | + autoCollapseCategories: true, |
| 53 | + }, |
| 54 | + }, |
| 55 | + |
72 | 56 | navbar: { |
73 | | - title: "StakeWise Docs", |
| 57 | + title: 'StakeWise Docs', |
74 | 58 | logo: { |
75 | | - alt: "My Site Logo", |
76 | | - src: "img/logo.svg", |
| 59 | + alt: 'StakeWise Logo', |
| 60 | + src: 'img/logo512.png', |
| 61 | + height: 32, |
| 62 | + width: 32, |
| 63 | + style: { |
| 64 | + marginRight: '12px', |
| 65 | + }, |
77 | 66 | }, |
78 | 67 | items: [ |
79 | 68 | { |
| 69 | + label: 'Docs', |
| 70 | + to: 'docs/intro', |
80 | 71 | type: "docSidebar", |
81 | | - sidebarId: "docsSidebar", |
82 | | - position: "left", |
83 | | - label: "Docs", |
| 72 | + activeBaseRegex: `/docs/`, |
| 73 | + sidebarId: 'docsSidebar', |
84 | 74 | }, |
85 | 75 | { |
86 | | - label: "SDK", |
87 | | - position: "left", |
88 | | - sidebarId: "sdkSidebar", |
| 76 | + label: 'SDK', |
| 77 | + to: '/sdk/intro', |
89 | 78 | activeBaseRegex: `/sdk/`, |
90 | | - to: "/sdk/intro", |
| 79 | + sidebarId: 'sdkSidebar', |
91 | 80 | }, |
92 | 81 | { |
93 | | - label: "Contracs", |
94 | | - position: "left", |
95 | | - sidebarId: "contractsSidebar", |
| 82 | + label: 'Contracs', |
| 83 | + to: '/contracts/intro', |
96 | 84 | activeBaseRegex: `/contracts/`, |
97 | | - to: "/contracts/intro", |
| 85 | + sidebarId: 'contractsSidebar', |
98 | 86 | }, |
99 | 87 | { |
100 | | - href: "https://github.com/stakewise/docs", |
101 | | - label: "GitHub", |
102 | | - position: "right", |
| 88 | + label: 'X', |
| 89 | + href: 'https://x.com/stakewise_io', |
| 90 | + position: 'right', |
103 | 91 | }, |
104 | | - ], |
105 | | - }, |
106 | | - footer: { |
107 | | - style: "dark", |
108 | | - links: [ |
109 | 92 | { |
110 | | - title: "Docs", |
111 | | - items: [ |
112 | | - { |
113 | | - label: "Docs", |
114 | | - to: "/docs/intro", |
115 | | - }, |
116 | | - ], |
| 93 | + label: 'Discord', |
| 94 | + href: 'https://discord.com/invite/2BSdr2g', |
| 95 | + position: 'right', |
117 | 96 | }, |
118 | 97 | { |
119 | | - title: "Community", |
120 | | - items: [ |
121 | | - { |
122 | | - label: "Stack Overflow", |
123 | | - href: "https://stackoverflow.com/questions/tagged/docusaurus", |
124 | | - }, |
125 | | - { |
126 | | - label: "Discord", |
127 | | - href: "https://discordapp.com/invite/docusaurus", |
128 | | - }, |
129 | | - { |
130 | | - label: "X", |
131 | | - href: "https://x.com/docusaurus", |
132 | | - }, |
133 | | - ], |
| 98 | + label: 'Telegram', |
| 99 | + href: 'https://t.me/stakewise_io', |
| 100 | + position: 'right', |
134 | 101 | }, |
135 | 102 | { |
136 | | - title: "More", |
137 | | - items: [ |
138 | | - { |
139 | | - label: "GitHub", |
140 | | - href: "https://github.com/facebook/docusaurus", |
141 | | - }, |
142 | | - ], |
143 | | - }, |
| 103 | + type: 'html', |
| 104 | + position: 'right', |
| 105 | + value: ` |
| 106 | + <button |
| 107 | + onclick="window.open('https://app.stakewise.io', '_blank')" |
| 108 | + style="padding: 10px 20px; background-color: #846ab2; color: white; border: none; border-radius: 5px; cursor: pointer;" |
| 109 | + > |
| 110 | + Go to StakeWise |
| 111 | + </button> |
| 112 | + `, |
| 113 | + } |
144 | 114 | ], |
145 | | - copyright: `Copyright © ${new Date().getFullYear()} StakeWise`, |
146 | 115 | }, |
| 116 | + |
| 117 | + tableOfContents: { |
| 118 | + minHeadingLevel: 2, |
| 119 | + maxHeadingLevel: 5, |
| 120 | + }, |
| 121 | + footer: { |
| 122 | + copyright: `Copyright © ${new Date().getFullYear()} StakeWise Labs`, |
| 123 | + }, |
| 124 | + |
147 | 125 | prism: { |
148 | 126 | theme: prismThemes.github, |
| 127 | + defaultLanguage: 'typescript', |
149 | 128 | darkTheme: prismThemes.dracula, |
150 | 129 | }, |
151 | 130 | } satisfies Preset.ThemeConfig, |
|
0 commit comments