Skip to content

Commit 65342fd

Browse files
committed
Merge branch 'documentation'
2 parents 7f20e6e + 28835f9 commit 65342fd

23 files changed

Lines changed: 10455 additions & 4550 deletions

.gitignore

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ lerna-debug.log*
2929
*.sln
3030
*.sw?
3131

32+
# VitePress
33+
.vitepress/.temp
34+
.vitepress/.cache
35+
.vitepress/dist
36+
37+
packages/super-editor/src/tests/data/*
38+
3239
# Playwright
3340
test-results
34-
*.tgz
41+
*.tgz

docs/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.vitepress/dist
2+
.vitepress/cache

docs/.prettierrc.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"semi": true,
3+
"tabWidth": 2,
4+
"singleQuote": true,
5+
"printWidth": 100,
6+
"trailingComma": "all",
7+
"bracketSameLine": true
8+
}

docs/.vitepress/config.mjs

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
import { defineConfig } from 'vitepress';
2+
3+
// https://vitepress.dev/reference/site-config
4+
export default defineConfig({
5+
lang: 'en-US',
6+
title: 'SuperDoc',
7+
description: 'The modern collaborative document editor for the web',
8+
9+
dest: '../docs/',
10+
srcDir: './src',
11+
12+
lastUpdated: false,
13+
cleanUrls: true,
14+
15+
/* prettier-ignore */
16+
head: [
17+
['link', { rel: "apple-touch-icon", sizes: "180x180", href: "/apple-touch-icon.png" }],
18+
['link', { rel: "icon", type: "image/png", sizes: "32x32", href: "/favicon-32x32.png" }],
19+
['link', { rel: "icon", type: "image/png", sizes: "16x16", href: "/favicon-16x16.png" }],
20+
['link', { rel: "manifest", href: "/site.webmanifest" }],
21+
['meta', { name: 'theme-color', content: '#1255FE' }],
22+
['meta', { name: 'og:type', content: 'website' }],
23+
['meta', { name: 'og:locale', content: 'en' }],
24+
['meta', { name: 'og:site_name', content: 'SuperDoc' }],
25+
],
26+
27+
themeConfig: {
28+
logo: { light: '/logo.png', dark: '/logo-dark.png' },
29+
siteTitle: false,
30+
sidebar: sidebar(),
31+
nav: navMenu(),
32+
search: {
33+
provider: 'local',
34+
},
35+
footer: {
36+
message: ${new Date().getFullYear()} Harbour Enterprises, Inc. 💙💛`,
37+
},
38+
socialLinks: [
39+
{ icon: 'discord', link: 'https://discord.gg/b9UuaZRyaB' },
40+
{ icon: 'github', link: 'https://github.com/Harbour-Enterprises/SuperDoc' },
41+
],
42+
},
43+
});
44+
45+
function navMenu() {
46+
return [
47+
{ text: 'Docs', link: '/' },
48+
// { text: 'Demos', link: '/demos/' },
49+
// { text: 'API', link: '/api/' },
50+
];
51+
}
52+
53+
function sidebar() {
54+
return {
55+
'/': [
56+
{
57+
text: 'Quick Start',
58+
link: '/',
59+
items: [
60+
{ text: 'Introduction', link: '/#introduction' },
61+
{ text: 'Installation', link: '/#installation' },
62+
{ text: 'Basic Usage', link: '/#basic-usage' },
63+
{ text: 'Configuration', link: '/#configuration' },
64+
],
65+
},
66+
{
67+
text: 'Integration',
68+
link: '/integration',
69+
items: [
70+
{ text: 'React', link: '/integration/#react' },
71+
{ text: 'Vue', link: '/integration/#vue' },
72+
{ text: 'Vanilla JS', link: '/integration/#vanilla-js' },
73+
],
74+
},
75+
{
76+
text: 'Components',
77+
link: '/components',
78+
items: [
79+
{ text: 'SuperDoc', link: '/components/#superdoc' },
80+
{ text: 'SuperEditor', link: '/components/#supereditor' },
81+
],
82+
},
83+
{
84+
text: 'Modules',
85+
link: '/modules',
86+
items: [
87+
{ text: 'Toolbar', link: '/modules/#superdoc-toolbar' },
88+
{ text: 'Comments', link: '/modules/#comments' },
89+
{ text: 'Search', link: '/modules/#search' },
90+
{ text: 'Fields', link: '/modules/#fields' },
91+
{ text: 'Annotate', link: '/modules/#annotate' },
92+
]
93+
},
94+
{
95+
text: 'Resources',
96+
link: '/resources',
97+
items: [
98+
{ text: 'Examples', link: '/resources/#examples' },
99+
{ text: 'FAQ', link: '/resources/#faq' },
100+
{
101+
text: 'Guides',
102+
link: '/resources/#guides',
103+
collapsed: true,
104+
items: [
105+
{
106+
text: 'Migrate from Prosemirror',
107+
link: '/resources/#migrate-from-prosemirror',
108+
},
109+
],
110+
},
111+
{
112+
text: 'License',
113+
link: '/resources/#license',
114+
},
115+
],
116+
},
117+
],
118+
};
119+
}

docs/.vitepress/theme/custom.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
:root {
2+
--vp-c-brand-1: #2563EB;
3+
}

docs/.vitepress/theme/index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import DefaultTheme from 'vitepress/theme';
2+
import './custom.css';
3+
4+
export default {
5+
...DefaultTheme,
6+
};

docs/CNAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
docs.superdoc.dev

0 commit comments

Comments
 (0)