@eventcatalog/core 2.31.1 → 2.31.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analytics/analytics.cjs +1 -1
- package/dist/analytics/analytics.js +2 -2
- package/dist/analytics/log-build.cjs +1 -1
- package/dist/analytics/log-build.js +3 -3
- package/dist/{chunk-YUINCBLT.js → chunk-5RIG3ETK.js} +1 -1
- package/dist/{chunk-GHBJ372G.js → chunk-DETRHSB6.js} +1 -1
- package/dist/{chunk-QR5UTYCE.js → chunk-U2LUOMEZ.js} +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/eventcatalog.cjs +1 -1
- package/dist/eventcatalog.js +3 -3
- package/eventcatalog/src/enterprise/custom-documentation/collection.ts +1 -1
- package/eventcatalog/src/enterprise/custom-documentation/pages/index.astro +1 -2
- package/eventcatalog/src/pages/docs/custom/[...path]/index.astro +0 -4
- package/eventcatalog/src/pages/docs/custom/index.astro +237 -0
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
log_build_default
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-U2LUOMEZ.js";
|
|
4
|
+
import "../chunk-DETRHSB6.js";
|
|
5
|
+
import "../chunk-5RIG3ETK.js";
|
|
6
6
|
import "../chunk-E7TXTI7G.js";
|
|
7
7
|
export {
|
|
8
8
|
log_build_default as default
|
package/dist/constants.cjs
CHANGED
package/dist/constants.js
CHANGED
package/dist/eventcatalog.cjs
CHANGED
package/dist/eventcatalog.js
CHANGED
|
@@ -6,15 +6,15 @@ import {
|
|
|
6
6
|
} from "./chunk-UKJ7F5WR.js";
|
|
7
7
|
import {
|
|
8
8
|
log_build_default
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-U2LUOMEZ.js";
|
|
10
|
+
import "./chunk-DETRHSB6.js";
|
|
11
11
|
import {
|
|
12
12
|
catalogToAstro,
|
|
13
13
|
checkAndConvertMdToMdx
|
|
14
14
|
} from "./chunk-7SI5EVOX.js";
|
|
15
15
|
import {
|
|
16
16
|
VERSION
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-5RIG3ETK.js";
|
|
18
18
|
import {
|
|
19
19
|
isBackstagePluginEnabled,
|
|
20
20
|
isEventCatalogProEnabled
|
|
@@ -88,6 +88,7 @@ const badges = doc?.badges || [];
|
|
|
88
88
|
<div class="border-b border-gray-200 flex justify-between items-start md:pb-6">
|
|
89
89
|
<div>
|
|
90
90
|
<h2 id="doc-page-header" class="text-2xl md:text-4xl font-bold text-black">{doc.title}</h2>
|
|
91
|
+
<p class="text-lg pt-2 text-gray-500 font-light">{doc.summary}</p>
|
|
91
92
|
{
|
|
92
93
|
badges && (
|
|
93
94
|
<div class="flex flex-wrap pt-4">
|
|
@@ -272,7 +273,6 @@ const badges = doc?.badges || [];
|
|
|
272
273
|
|
|
273
274
|
// First try to find headings with IDs
|
|
274
275
|
const headings = prose.querySelectorAll('h1[id], h2[id], h3[id]');
|
|
275
|
-
console.log('Headings with IDs found:', headings.length);
|
|
276
276
|
|
|
277
277
|
if (headings.length > 0) {
|
|
278
278
|
headings.forEach((heading) => {
|
|
@@ -281,7 +281,6 @@ const badges = doc?.badges || [];
|
|
|
281
281
|
} else {
|
|
282
282
|
// Fallback: If no headings with IDs found, attach IDs to them
|
|
283
283
|
const allHeadings = prose.querySelectorAll('h1, h2, h3');
|
|
284
|
-
console.log('Total headings found:', allHeadings.length);
|
|
285
284
|
|
|
286
285
|
allHeadings.forEach((heading) => {
|
|
287
286
|
// Only add ID if it doesn't exist
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
---
|
|
2
|
+
import VerticalSideBarLayout from '@layouts/VerticalSideBarLayout.astro';
|
|
3
|
+
import { Code } from 'astro-expressive-code/components';
|
|
4
|
+
import { isEventCatalogProEnabled } from '@utils/feature';
|
|
5
|
+
|
|
6
|
+
// Example for folder structure
|
|
7
|
+
const folderStructureExample = `my-catalog/
|
|
8
|
+
└── docs/
|
|
9
|
+
├── getting-started/
|
|
10
|
+
│ ├── 01-introduction.mdx
|
|
11
|
+
│ └── 02-quick-start.mdx
|
|
12
|
+
├── architecture-decisions/
|
|
13
|
+
│ ├── 01-what-are-architecture-decisions.mdx
|
|
14
|
+
│ ├── 02-how-to-create-architecture-decisions.mdx
|
|
15
|
+
│ ├── published/
|
|
16
|
+
│ │ ├── 01-adr-001-event-driven.mdx
|
|
17
|
+
│ │ └── 02-adr-002-api-first.mdx
|
|
18
|
+
│ └── drafts/
|
|
19
|
+
│ ├── 01-adr-003-microservices.mdx
|
|
20
|
+
│ └── 02-adr-004-monolith.mdx
|
|
21
|
+
└`;
|
|
22
|
+
// Example MDX file content
|
|
23
|
+
const mdxFileExample = `---
|
|
24
|
+
title: Getting Started
|
|
25
|
+
summary: How to get started with our event-driven architecture
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
# Getting Started with our Event-Driven Architecture
|
|
29
|
+
|
|
30
|
+
This guide will help you understand how our services communicate using events.
|
|
31
|
+
|
|
32
|
+
## Prerequisites
|
|
33
|
+
|
|
34
|
+
- Understanding of basic messaging patterns
|
|
35
|
+
- Node.js installed on your machine
|
|
36
|
+
|
|
37
|
+
## Key Concepts
|
|
38
|
+
|
|
39
|
+
Events are the backbone of our architecture. They represent facts that have happened in our system.
|
|
40
|
+
`;
|
|
41
|
+
|
|
42
|
+
// Example config file
|
|
43
|
+
const configExample = `// eventcatalog.config.js
|
|
44
|
+
|
|
45
|
+
module.exports = {
|
|
46
|
+
// Your existing config...
|
|
47
|
+
|
|
48
|
+
customDocs: {
|
|
49
|
+
sidebar: [
|
|
50
|
+
{
|
|
51
|
+
label: 'Getting Started',
|
|
52
|
+
badge: {
|
|
53
|
+
text: 'New', color: 'green'
|
|
54
|
+
},
|
|
55
|
+
collapsed: false,
|
|
56
|
+
items: [
|
|
57
|
+
{ label: 'Introduction', slug: 'getting-started/01-introduction' },
|
|
58
|
+
{ label: 'Quick Start', slug: 'getting-started/02-quick-start' }
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
label: 'Architecture Decisions',
|
|
63
|
+
badge: {
|
|
64
|
+
text: 'New', color: 'green'
|
|
65
|
+
},
|
|
66
|
+
collapsed: true,
|
|
67
|
+
items: [
|
|
68
|
+
{
|
|
69
|
+
label: 'What are Architecture Decisions?',
|
|
70
|
+
slug: 'architecture-decisions/01-what-are-architecture-decisions'
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
label: 'How to Create Architecture Decisions',
|
|
74
|
+
slug: 'architecture-decisions/02-how-to-create-architecture-decisions'
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
label: 'Published ADRs',
|
|
78
|
+
autogenerated: {
|
|
79
|
+
directory: 'architecture-decisions/published',
|
|
80
|
+
collapsed: true
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
label: 'Draft ADRs',
|
|
85
|
+
autogenerated: {
|
|
86
|
+
directory: 'architecture-decisions/drafts',
|
|
87
|
+
collapsed: true
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
}`;
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
<VerticalSideBarLayout title="Custom Documentation">
|
|
98
|
+
<body class="min-h-screen font-inter">
|
|
99
|
+
<main class="container px-8 lg:px-8 mx-auto py-8 max-w-[80em]">
|
|
100
|
+
<div class="mb-12">
|
|
101
|
+
<div class="flex flex-col md:flex-row md:items-center md:justify-between gap-6">
|
|
102
|
+
<div>
|
|
103
|
+
<div class="flex flex-wrap items-center gap-3 mb-3">
|
|
104
|
+
<h1 class="text-4xl font-semibold text-gray-900 font-inter">Custom Documentation</h1>
|
|
105
|
+
<div
|
|
106
|
+
class="inline-flex items-center px-3 py-1.5 rounded-full text-xs font-medium bg-purple-100 text-purple-800 border border-purple-200 shadow-sm"
|
|
107
|
+
>
|
|
108
|
+
Pro feature
|
|
109
|
+
</div>
|
|
110
|
+
</div>
|
|
111
|
+
<p class="text-base mb-0 text-gray-600 max-w-3xl">
|
|
112
|
+
Add custom documentation to EventCatalog to create a unified source of truth for your team. Document your
|
|
113
|
+
architecture decisions, patterns, and guidelines.
|
|
114
|
+
</p>
|
|
115
|
+
</div>
|
|
116
|
+
<div class="flex space-x-4 shrink-0">
|
|
117
|
+
<a
|
|
118
|
+
href="https://www.eventcatalog.dev/docs/custom-documentation"
|
|
119
|
+
class="inline-flex items-center justify-center px-5 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50"
|
|
120
|
+
>
|
|
121
|
+
Read documentation →
|
|
122
|
+
</a>
|
|
123
|
+
{
|
|
124
|
+
!isEventCatalogProEnabled() && (
|
|
125
|
+
<a
|
|
126
|
+
href="https://www.eventcatalog.dev/pro/trial"
|
|
127
|
+
class="inline-flex items-center justify-center px-5 py-2 border border-transparent text-sm font-medium rounded-md text-white bg-gradient-to-r from-purple-500 to-purple-700 hover:from-purple-600 hover:to-purple-800 shadow-sm"
|
|
128
|
+
>
|
|
129
|
+
Start 14-day trial
|
|
130
|
+
</a>
|
|
131
|
+
)
|
|
132
|
+
}
|
|
133
|
+
</div>
|
|
134
|
+
</div>
|
|
135
|
+
</div>
|
|
136
|
+
|
|
137
|
+
<h2 class="text-2xl font-semibold mb-2 text-gray-900">Setup Guide</h2>
|
|
138
|
+
<p class="text-gray-600 mb-8 max-w-3xl">
|
|
139
|
+
Custom documentation let's you bring any documentation into EventCatalog. This is useful for documenting your architecture
|
|
140
|
+
decisions, patterns, and guidelines. Follow these steps to get started:
|
|
141
|
+
</p>
|
|
142
|
+
|
|
143
|
+
<div class="space-y-10 mb-12">
|
|
144
|
+
<div class="bg-white p-6 rounded-lg shadow-sm border border-gray-200">
|
|
145
|
+
<div class="flex items-start gap-4">
|
|
146
|
+
<div
|
|
147
|
+
class="inline-flex items-center justify-center w-8 h-8 rounded-full bg-blue-100 text-blue-600 text-lg font-medium shrink-0 mt-1"
|
|
148
|
+
>
|
|
149
|
+
1
|
|
150
|
+
</div>
|
|
151
|
+
<div class="w-full">
|
|
152
|
+
<h3 class="text-xl font-semibold text-gray-900 mb-3">Create the content structure</h3>
|
|
153
|
+
<p class="text-gray-600 mb-4">Create a folder structure in your directory to organize your documentation.</p>
|
|
154
|
+
<Code code={folderStructureExample} lang="bash" frame="terminal" />
|
|
155
|
+
</div>
|
|
156
|
+
</div>
|
|
157
|
+
</div>
|
|
158
|
+
|
|
159
|
+
<div class="bg-white p-6 rounded-lg shadow-sm border border-gray-200">
|
|
160
|
+
<div class="flex items-start gap-4">
|
|
161
|
+
<div
|
|
162
|
+
class="inline-flex items-center justify-center w-8 h-8 rounded-full bg-blue-100 text-blue-600 text-lg font-medium shrink-0 mt-1"
|
|
163
|
+
>
|
|
164
|
+
2
|
|
165
|
+
</div>
|
|
166
|
+
<div class="w-full">
|
|
167
|
+
<h3 class="text-xl font-semibold text-gray-900 mb-3">Add MDX files</h3>
|
|
168
|
+
<p class="text-gray-600 mb-4">Create MDX files with frontmatter and markdown content.</p>
|
|
169
|
+
<Code code={mdxFileExample} lang="mdx" frame="terminal" />
|
|
170
|
+
</div>
|
|
171
|
+
</div>
|
|
172
|
+
</div>
|
|
173
|
+
|
|
174
|
+
<div class="bg-white p-6 rounded-lg shadow-sm border border-gray-200">
|
|
175
|
+
<div class="flex items-start gap-4">
|
|
176
|
+
<div
|
|
177
|
+
class="inline-flex items-center justify-center w-8 h-8 rounded-full bg-blue-100 text-blue-600 text-lg font-medium shrink-0 mt-1"
|
|
178
|
+
>
|
|
179
|
+
3
|
|
180
|
+
</div>
|
|
181
|
+
<div class="w-full">
|
|
182
|
+
<h3 class="text-xl font-semibold text-gray-900 mb-3">Update your eventcatalog.config.js file</h3>
|
|
183
|
+
<p class="text-gray-600 mb-4">
|
|
184
|
+
Add the customDocs configuration to your eventcatalog.config.js file to define your sidebar structure.
|
|
185
|
+
</p>
|
|
186
|
+
<Code code={configExample} lang="js" frame="terminal" />
|
|
187
|
+
<p class="text-gray-600 mt-4">This configuration defines the sidebar structure for your custom documentation:</p>
|
|
188
|
+
<ul class="list-disc list-inside text-gray-600 mt-2 ml-2 space-y-1">
|
|
189
|
+
<li>
|
|
190
|
+
<strong>label</strong>: The display name for each sidebar section
|
|
191
|
+
</li>
|
|
192
|
+
<li>
|
|
193
|
+
<strong>badge</strong>: Optional badge to highlight new sections
|
|
194
|
+
</li>
|
|
195
|
+
<li>
|
|
196
|
+
<strong>collapsed</strong>: Whether the section is collapsed by default
|
|
197
|
+
</li>
|
|
198
|
+
<li>
|
|
199
|
+
<strong>autogenerated</strong>: Automatically generate sidebar items from a directory
|
|
200
|
+
</li>
|
|
201
|
+
<li>
|
|
202
|
+
<strong>slug</strong>: Direct link to a specific page
|
|
203
|
+
</li>
|
|
204
|
+
</ul>
|
|
205
|
+
</div>
|
|
206
|
+
</div>
|
|
207
|
+
</div>
|
|
208
|
+
|
|
209
|
+
<div class="bg-white p-6 rounded-lg shadow-sm border border-gray-200">
|
|
210
|
+
<div class="flex items-start gap-4">
|
|
211
|
+
<div
|
|
212
|
+
class="inline-flex items-center justify-center w-8 h-8 rounded-full bg-blue-100 text-blue-600 text-lg font-medium shrink-0 mt-1"
|
|
213
|
+
>
|
|
214
|
+
4
|
|
215
|
+
</div>
|
|
216
|
+
<div class="w-full">
|
|
217
|
+
<h3 class="text-xl font-semibold text-gray-900 mb-3">Restart EventCatalog</h3>
|
|
218
|
+
<p class="text-gray-600 mb-4">
|
|
219
|
+
After configuring your documentation, restart EventCatalog to see your custom documentation.
|
|
220
|
+
</p>
|
|
221
|
+
<div class="mb-4">
|
|
222
|
+
<Code code="npm run dev" lang="bash" frame="terminal" />
|
|
223
|
+
</div>
|
|
224
|
+
<p class="text-gray-600 mb-4">
|
|
225
|
+
Once restarted, you'll see your custom documentation displayed with the sidebar structure you defined:
|
|
226
|
+
</p>
|
|
227
|
+
<div class="border border-gray-200 rounded-lg overflow-hidden">
|
|
228
|
+
<img src="/images/custom-docs-placeholder.png" alt="Example of custom documentation interface" class="w-full" />
|
|
229
|
+
</div>
|
|
230
|
+
</div>
|
|
231
|
+
</div>
|
|
232
|
+
</div>
|
|
233
|
+
</div>
|
|
234
|
+
</main>
|
|
235
|
+
</body>
|
|
236
|
+
</VerticalSideBarLayout>
|
|
237
|
+
)
|