Skip to content

Commit 898ceb9

Browse files
committed
chore: add vitepress-plugin-mermaid for documentation diagrams
- Install vitepress-plugin-mermaid and mermaid dependencies - Configure Mermaid in VitePress config - Add architecture diagrams to documentation - Fix d3-array import issue with Vite alias Authored by: Aaron Lippold<lippold@gmail.com>
1 parent 2f600b1 commit 898ceb9

File tree

4 files changed

+2568
-339
lines changed

4 files changed

+2568
-339
lines changed

docs/.vitepress/config.ts

Lines changed: 73 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { defineConfig } from 'vitepress'
2+
import { withMermaid } from 'vitepress-plugin-mermaid'
23

3-
export default defineConfig({
4+
export default withMermaid(defineConfig({
45
title: 'Nuxt SmartScript',
56
description: 'Smart typography transformations for Nuxt',
67

@@ -17,6 +18,13 @@ export default defineConfig({
1718
vite: {
1819
resolve: {
1920
preserveSymlinks: true,
21+
alias: {
22+
// Fix for d3-array blur2 export issue
23+
'd3-array': 'd3-array/dist/d3-array.min.js',
24+
},
25+
},
26+
optimizeDeps: {
27+
include: ['mermaid'],
2028
},
2129
},
2230

@@ -28,9 +36,26 @@ export default defineConfig({
2836
text: 'Guide',
2937
items: [
3038
{ text: 'Getting Started', link: '/guide/getting-started' },
39+
{ text: 'Deployment Modes', link: '/guide/deployment-modes' },
3140
{ text: 'Vue Integration', link: '/vue-integration' },
3241
{ text: 'Examples', link: '/examples' },
33-
{ text: 'Architecture', link: '/architecture' },
42+
],
43+
},
44+
{
45+
text: 'Architecture',
46+
items: [
47+
{ text: 'Overview', link: '/architecture' },
48+
{ text: 'System Architecture', link: '/system-architecture' },
49+
{ text: 'Processing Pipeline', link: '/processing-architecture' },
50+
],
51+
},
52+
{
53+
text: 'Testing',
54+
items: [
55+
{ text: 'Overview', link: '/testing' },
56+
{ text: 'Unit Tests', link: '/testing/unit-tests' },
57+
{ text: 'Integration Tests', link: '/testing/integration-tests' },
58+
{ text: 'E2E Tests', link: '/testing/e2e-tests' },
3459
],
3560
},
3661
{
@@ -58,10 +83,32 @@ export default defineConfig({
5883
collapsed: false,
5984
items: [
6085
{ text: 'Getting Started', link: '/guide/getting-started' },
86+
{ text: 'Deployment Modes', link: '/guide/deployment-modes' },
6187
{ text: 'Vue Integration', link: '/vue-integration' },
6288
{ text: 'Patterns & Examples', link: '/examples' },
6389
],
6490
},
91+
{
92+
text: 'Architecture',
93+
collapsed: false,
94+
items: [
95+
{ text: 'Overview', link: '/architecture' },
96+
{ text: 'System Architecture', link: '/system-architecture' },
97+
{ text: 'Processing Pipeline', link: '/processing-architecture' },
98+
],
99+
},
100+
{
101+
text: 'Testing',
102+
collapsed: false,
103+
items: [
104+
{ text: 'Testing Overview', link: '/testing' },
105+
{ text: 'Testing Guide', link: '/testing/index' },
106+
{ text: 'Unit Tests', link: '/testing/unit-tests' },
107+
{ text: 'Integration Tests', link: '/testing/integration-tests' },
108+
{ text: 'E2E Tests', link: '/testing/e2e-tests' },
109+
{ text: 'Writing Tests', link: '/testing/writing-tests' },
110+
],
111+
},
65112
{
66113
text: 'API Reference',
67114
collapsed: false,
@@ -75,16 +122,24 @@ export default defineConfig({
75122
text: 'Advanced',
76123
collapsed: true,
77124
items: [
78-
{ text: 'Architecture', link: '/architecture' },
79125
{ text: 'Custom Patterns', link: '/advanced/custom-patterns' },
80126
{ text: 'Performance', link: '/advanced/performance' },
127+
{ text: 'Pattern Design', link: '/pattern-design' },
81128
],
82129
},
83130
{
84-
text: 'Resources',
131+
text: 'Contributing',
85132
collapsed: true,
86133
items: [
87134
{ text: 'Contributing Guide', link: '/contributing' },
135+
{ text: 'Development Workflow', link: '/contributing/development-workflow' },
136+
{ text: 'Release Process', link: '/contributing/release-process' },
137+
],
138+
},
139+
{
140+
text: 'Resources',
141+
collapsed: true,
142+
items: [
88143
{ text: 'Changelog', link: 'https://github.com/mitre/nuxt-smartscript/blob/main/CHANGELOG.md' },
89144
{ text: 'License', link: 'https://github.com/mitre/nuxt-smartscript/blob/main/LICENSE' },
90145
],
@@ -104,4 +159,17 @@ export default defineConfig({
104159
provider: 'local',
105160
},
106161
},
107-
})
162+
163+
// Mermaid configuration
164+
mermaid: {
165+
theme: 'default',
166+
themeVariables: {
167+
primaryColor: '#3eaf7c',
168+
primaryTextColor: '#fff',
169+
primaryBorderColor: '#2c8658',
170+
lineColor: '#5c5c5c',
171+
secondaryColor: '#4fc08d',
172+
tertiaryColor: '#fff',
173+
},
174+
},
175+
}))

0 commit comments

Comments
 (0)