specra-cli 0.3.0
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/LICENSE.MD +33 -0
- package/README.md +246 -0
- package/dist/api-client-VHQARPDT.js +15 -0
- package/dist/api-client-VHQARPDT.js.map +1 -0
- package/dist/chunk-5765WX4D.js +192 -0
- package/dist/chunk-5765WX4D.js.map +1 -0
- package/dist/chunk-72RDEJR2.js +94 -0
- package/dist/chunk-72RDEJR2.js.map +1 -0
- package/dist/chunk-SQ2MMFUZ.js +102 -0
- package/dist/chunk-SQ2MMFUZ.js.map +1 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +242 -0
- package/dist/cli.js.map +1 -0
- package/dist/deploy-V4JO2D6B.js +179 -0
- package/dist/deploy-V4JO2D6B.js.map +1 -0
- package/dist/doctor-ICALAJ4N.js +309 -0
- package/dist/doctor-ICALAJ4N.js.map +1 -0
- package/dist/login-UG3WU7DY.js +92 -0
- package/dist/login-UG3WU7DY.js.map +1 -0
- package/dist/logout-WJKHJZT6.js +24 -0
- package/dist/logout-WJKHJZT6.js.map +1 -0
- package/dist/logs-BLUJPWNO.js +77 -0
- package/dist/logs-BLUJPWNO.js.map +1 -0
- package/dist/projects-LJ57GK3D.js +49 -0
- package/dist/projects-LJ57GK3D.js.map +1 -0
- package/package.json +50 -0
- package/templates/book-docs/.env.sample +1 -0
- package/templates/book-docs/docs/v1.0.0/concepts.mdx +89 -0
- package/templates/book-docs/docs/v1.0.0/content/_category_.json +7 -0
- package/templates/book-docs/docs/v1.0.0/content/formatting.mdx +128 -0
- package/templates/book-docs/docs/v1.0.0/content/reusable-content.mdx +116 -0
- package/templates/book-docs/docs/v1.0.0/content/structure.mdx +92 -0
- package/templates/book-docs/docs/v1.0.0/customization/_category_.json +7 -0
- package/templates/book-docs/docs/v1.0.0/customization/branding.mdx +115 -0
- package/templates/book-docs/docs/v1.0.0/customization/themes.mdx +81 -0
- package/templates/book-docs/docs/v1.0.0/introduction.mdx +38 -0
- package/templates/book-docs/docs/v1.0.0/quickstart.mdx +112 -0
- package/templates/book-docs/docs/v2.0.0/concepts.mdx +89 -0
- package/templates/book-docs/docs/v2.0.0/content/_category_.json +7 -0
- package/templates/book-docs/docs/v2.0.0/content/formatting.mdx +128 -0
- package/templates/book-docs/docs/v2.0.0/content/reusable-content.mdx +116 -0
- package/templates/book-docs/docs/v2.0.0/content/structure.mdx +92 -0
- package/templates/book-docs/docs/v2.0.0/customization/_category_.json +7 -0
- package/templates/book-docs/docs/v2.0.0/customization/branding.mdx +115 -0
- package/templates/book-docs/docs/v2.0.0/customization/themes.mdx +81 -0
- package/templates/book-docs/docs/v2.0.0/introduction.mdx +39 -0
- package/templates/book-docs/docs/v2.0.0/quickstart.mdx +112 -0
- package/templates/book-docs/gitignore +7 -0
- package/templates/book-docs/package.json +28 -0
- package/templates/book-docs/postcss.config.mjs +8 -0
- package/templates/book-docs/public/api-specs/openapi-example.json +259 -0
- package/templates/book-docs/public/api-specs/postman-example.json +205 -0
- package/templates/book-docs/public/api-specs/test-api.json +256 -0
- package/templates/book-docs/public/api-specs/users-api.json +264 -0
- package/templates/book-docs/specra.config.json +77 -0
- package/templates/book-docs/src/app.css +86 -0
- package/templates/book-docs/src/app.html +17 -0
- package/templates/book-docs/src/params/product.ts +7 -0
- package/templates/book-docs/src/routes/+layout.server.ts +14 -0
- package/templates/book-docs/src/routes/+layout.svelte +21 -0
- package/templates/book-docs/src/routes/+page.server.ts +9 -0
- package/templates/book-docs/src/routes/docs/[product=product]/[version]/+layout.server.ts +40 -0
- package/templates/book-docs/src/routes/docs/[product=product]/[version]/+page.server.ts +24 -0
- package/templates/book-docs/src/routes/docs/[product=product]/[version]/[...slug]/+page.server.ts +131 -0
- package/templates/book-docs/src/routes/docs/[product=product]/[version]/[...slug]/+page.svelte +180 -0
- package/templates/book-docs/src/routes/docs/[version]/+layout.server.ts +42 -0
- package/templates/book-docs/src/routes/docs/[version]/+page.server.ts +27 -0
- package/templates/book-docs/src/routes/docs/[version]/[...slug]/+page.server.ts +106 -0
- package/templates/book-docs/src/routes/docs/[version]/[...slug]/+page.svelte +172 -0
- package/templates/book-docs/static/favicon.svg +4 -0
- package/templates/book-docs/svelte.config.js +13 -0
- package/templates/book-docs/tsconfig.json +12 -0
- package/templates/book-docs/vite.config.ts +6 -0
- package/templates/jbrains-docs/.env.sample +1 -0
- package/templates/jbrains-docs/docs/v1.0.0/advanced/_category_.json +8 -0
- package/templates/jbrains-docs/docs/v1.0.0/advanced/async.mdx +95 -0
- package/templates/jbrains-docs/docs/v1.0.0/advanced/generics.mdx +126 -0
- package/templates/jbrains-docs/docs/v1.0.0/basics/_category_.json +8 -0
- package/templates/jbrains-docs/docs/v1.0.0/basics/control-flow.mdx +106 -0
- package/templates/jbrains-docs/docs/v1.0.0/basics/syntax.mdx +129 -0
- package/templates/jbrains-docs/docs/v1.0.0/basics/types.mdx +135 -0
- package/templates/jbrains-docs/docs/v1.0.0/getting-started.mdx +111 -0
- package/templates/jbrains-docs/docs/v1.0.0/home.mdx +37 -0
- package/templates/jbrains-docs/docs/v1.0.0/tools/_category_.json +8 -0
- package/templates/jbrains-docs/docs/v1.0.0/tools/build-tools.mdx +165 -0
- package/templates/jbrains-docs/docs/v1.0.0/tools/testing.mdx +112 -0
- package/templates/jbrains-docs/docs/v2.0.0/advanced/_category_.json +8 -0
- package/templates/jbrains-docs/docs/v2.0.0/advanced/async.mdx +95 -0
- package/templates/jbrains-docs/docs/v2.0.0/advanced/generics.mdx +126 -0
- package/templates/jbrains-docs/docs/v2.0.0/basics/_category_.json +8 -0
- package/templates/jbrains-docs/docs/v2.0.0/basics/control-flow.mdx +106 -0
- package/templates/jbrains-docs/docs/v2.0.0/basics/syntax.mdx +129 -0
- package/templates/jbrains-docs/docs/v2.0.0/basics/types.mdx +135 -0
- package/templates/jbrains-docs/docs/v2.0.0/getting-started.mdx +111 -0
- package/templates/jbrains-docs/docs/v2.0.0/home.mdx +37 -0
- package/templates/jbrains-docs/docs/v2.0.0/tools/_category_.json +8 -0
- package/templates/jbrains-docs/docs/v2.0.0/tools/build-tools.mdx +165 -0
- package/templates/jbrains-docs/docs/v2.0.0/tools/testing.mdx +112 -0
- package/templates/jbrains-docs/gitignore +7 -0
- package/templates/jbrains-docs/package.json +28 -0
- package/templates/jbrains-docs/postcss.config.mjs +8 -0
- package/templates/jbrains-docs/public/api-specs/openapi-example.json +259 -0
- package/templates/jbrains-docs/public/api-specs/postman-example.json +205 -0
- package/templates/jbrains-docs/public/api-specs/test-api.json +256 -0
- package/templates/jbrains-docs/public/api-specs/users-api.json +264 -0
- package/templates/jbrains-docs/specra.config.json +80 -0
- package/templates/jbrains-docs/src/app.css +86 -0
- package/templates/jbrains-docs/src/app.html +17 -0
- package/templates/jbrains-docs/src/params/product.ts +7 -0
- package/templates/jbrains-docs/src/routes/+layout.server.ts +14 -0
- package/templates/jbrains-docs/src/routes/+layout.svelte +21 -0
- package/templates/jbrains-docs/src/routes/+page.server.ts +9 -0
- package/templates/jbrains-docs/src/routes/docs/[product=product]/[version]/+layout.server.ts +40 -0
- package/templates/jbrains-docs/src/routes/docs/[product=product]/[version]/+page.server.ts +24 -0
- package/templates/jbrains-docs/src/routes/docs/[product=product]/[version]/[...slug]/+page.server.ts +131 -0
- package/templates/jbrains-docs/src/routes/docs/[product=product]/[version]/[...slug]/+page.svelte +180 -0
- package/templates/jbrains-docs/src/routes/docs/[version]/+layout.server.ts +42 -0
- package/templates/jbrains-docs/src/routes/docs/[version]/+page.server.ts +27 -0
- package/templates/jbrains-docs/src/routes/docs/[version]/[...slug]/+page.server.ts +106 -0
- package/templates/jbrains-docs/src/routes/docs/[version]/[...slug]/+page.svelte +172 -0
- package/templates/jbrains-docs/static/favicon.svg +4 -0
- package/templates/jbrains-docs/svelte.config.js +13 -0
- package/templates/jbrains-docs/tsconfig.json +12 -0
- package/templates/jbrains-docs/vite.config.ts +6 -0
- package/templates/minimal/.env.sample +1 -0
- package/templates/minimal/docs/v1.0.0/about.mdx +57 -0
- package/templates/minimal/docs/v1.0.0/components/_category_.json +8 -0
- package/templates/minimal/docs/v1.0.0/components/callout.mdx +83 -0
- package/templates/minimal/docs/v1.0.0/components/code-block.mdx +103 -0
- package/templates/minimal/docs/v1.0.0/components/index.mdx +8 -0
- package/templates/minimal/docs/v1.0.0/components/tabs.mdx +92 -0
- package/templates/minimal/docs/v1.0.0/configuration.mdx +322 -0
- package/templates/minimal/docs/v1.0.0/features.mdx +197 -0
- package/templates/minimal/docs/v1.0.0/getting-started.mdx +183 -0
- package/templates/minimal/docs/v2.0.0/about.mdx +57 -0
- package/templates/minimal/docs/v2.0.0/components/_category_.json +8 -0
- package/templates/minimal/docs/v2.0.0/components/callout.mdx +83 -0
- package/templates/minimal/docs/v2.0.0/components/code-block.mdx +103 -0
- package/templates/minimal/docs/v2.0.0/components/index.mdx +8 -0
- package/templates/minimal/docs/v2.0.0/components/tabs.mdx +92 -0
- package/templates/minimal/docs/v2.0.0/configuration.mdx +322 -0
- package/templates/minimal/docs/v2.0.0/features.mdx +197 -0
- package/templates/minimal/docs/v2.0.0/getting-started.mdx +183 -0
- package/templates/minimal/gitignore +7 -0
- package/templates/minimal/package.json +29 -0
- package/templates/minimal/postcss.config.mjs +8 -0
- package/templates/minimal/specra.config.json +91 -0
- package/templates/minimal/src/app.css +86 -0
- package/templates/minimal/src/app.html +17 -0
- package/templates/minimal/src/hooks.server.ts +8 -0
- package/templates/minimal/src/params/product.ts +7 -0
- package/templates/minimal/src/routes/+error.svelte +10 -0
- package/templates/minimal/src/routes/+layout.server.ts +14 -0
- package/templates/minimal/src/routes/+layout.svelte +21 -0
- package/templates/minimal/src/routes/+page.server.ts +9 -0
- package/templates/minimal/src/routes/+page.svelte +149 -0
- package/templates/minimal/src/routes/docs/[product=product]/[version]/+layout.server.ts +40 -0
- package/templates/minimal/src/routes/docs/[product=product]/[version]/+page.server.ts +24 -0
- package/templates/minimal/src/routes/docs/[product=product]/[version]/[...slug]/+page.server.ts +131 -0
- package/templates/minimal/src/routes/docs/[product=product]/[version]/[...slug]/+page.svelte +180 -0
- package/templates/minimal/src/routes/docs/[version]/+layout.server.ts +42 -0
- package/templates/minimal/src/routes/docs/[version]/+page.server.ts +27 -0
- package/templates/minimal/src/routes/docs/[version]/[...slug]/+page.server.ts +106 -0
- package/templates/minimal/src/routes/docs/[version]/[...slug]/+page.svelte +172 -0
- package/templates/minimal/static/api-specs/openapi-example.json +259 -0
- package/templates/minimal/static/api-specs/postman-example.json +205 -0
- package/templates/minimal/static/api-specs/test-api.json +256 -0
- package/templates/minimal/static/api-specs/users-api.json +264 -0
- package/templates/minimal/static/favicon.svg +4 -0
- package/templates/minimal/svelte.config.js +13 -0
- package/templates/minimal/tsconfig.json +12 -0
- package/templates/minimal/vite.config.ts +6 -0
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import {
|
|
3
|
+
TableOfContents,
|
|
4
|
+
Header,
|
|
5
|
+
TabGroups,
|
|
6
|
+
DocLayout,
|
|
7
|
+
CategoryIndex,
|
|
8
|
+
HotReloadIndicator,
|
|
9
|
+
DevModeBadge,
|
|
10
|
+
MdxHotReload,
|
|
11
|
+
MdxContent,
|
|
12
|
+
NotFoundContent,
|
|
13
|
+
SearchHighlight,
|
|
14
|
+
MobileDocLayout,
|
|
15
|
+
mdxComponents,
|
|
16
|
+
} from 'specra/components';
|
|
17
|
+
import type { PageData } from './$types';
|
|
18
|
+
|
|
19
|
+
let { data }: { data: PageData } = $props();
|
|
20
|
+
|
|
21
|
+
let allDocsCompat: any[] = $derived(data.allDocs);
|
|
22
|
+
let previousDoc = $derived(data.previous ?? undefined);
|
|
23
|
+
let nextDoc = $derived(data.next ?? undefined);
|
|
24
|
+
let categoryTitle = $derived(data.categoryTitle ?? undefined);
|
|
25
|
+
let categoryDescription = $derived(data.categoryDescription ?? undefined);
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<svelte:head>
|
|
29
|
+
<title>{data.title}</title>
|
|
30
|
+
<meta name="description" content={data.description} />
|
|
31
|
+
<meta property="og:title" content={data.title} />
|
|
32
|
+
<meta property="og:description" content={data.description} />
|
|
33
|
+
<meta property="og:url" content={data.ogUrl} />
|
|
34
|
+
<meta property="og:site_name" content="Documentation Platform" />
|
|
35
|
+
<meta property="og:type" content="article" />
|
|
36
|
+
<meta property="og:locale" content="en_US" />
|
|
37
|
+
<meta name="twitter:card" content="summary_large_image" />
|
|
38
|
+
<meta name="twitter:title" content={data.title} />
|
|
39
|
+
<meta name="twitter:description" content={data.description} />
|
|
40
|
+
<link rel="canonical" href={data.ogUrl} />
|
|
41
|
+
</svelte:head>
|
|
42
|
+
|
|
43
|
+
{#if !data.doc && data.isCategory}
|
|
44
|
+
<!-- Category page without doc content -->
|
|
45
|
+
<MobileDocLayout
|
|
46
|
+
docs={allDocsCompat}
|
|
47
|
+
version={data.version}
|
|
48
|
+
config={data.config}
|
|
49
|
+
activeTabGroup={data.categoryTabGroup}
|
|
50
|
+
>
|
|
51
|
+
{#snippet header()}
|
|
52
|
+
<Header currentVersion={data.version} versions={data.versions} versionsMeta={data.versionsMeta} versionBanner={data.versionBanner} config={data.config} products={data.products}>
|
|
53
|
+
{#snippet subheader()}
|
|
54
|
+
{#if data.config.navigation?.tabGroups && data.config.navigation.tabGroups.length > 0}
|
|
55
|
+
<TabGroups
|
|
56
|
+
tabGroups={data.config.navigation.tabGroups}
|
|
57
|
+
activeTabId={data.categoryTabGroup}
|
|
58
|
+
docs={allDocsCompat}
|
|
59
|
+
version={data.version}
|
|
60
|
+
flush={data.config.navigation?.sidebarStyle === 'flush'}
|
|
61
|
+
/>
|
|
62
|
+
{/if}
|
|
63
|
+
{/snippet}
|
|
64
|
+
</Header>
|
|
65
|
+
{/snippet}
|
|
66
|
+
<CategoryIndex
|
|
67
|
+
categoryPath={data.slug}
|
|
68
|
+
version={data.version}
|
|
69
|
+
allDocs={allDocsCompat}
|
|
70
|
+
title={categoryTitle}
|
|
71
|
+
description={categoryDescription}
|
|
72
|
+
config={data.config}
|
|
73
|
+
/>
|
|
74
|
+
</MobileDocLayout>
|
|
75
|
+
<MdxHotReload />
|
|
76
|
+
<HotReloadIndicator />
|
|
77
|
+
<DevModeBadge />
|
|
78
|
+
{:else if data.isNotFound}
|
|
79
|
+
<!-- Not found -->
|
|
80
|
+
<MobileDocLayout
|
|
81
|
+
docs={allDocsCompat}
|
|
82
|
+
version={data.version}
|
|
83
|
+
config={data.config}
|
|
84
|
+
>
|
|
85
|
+
{#snippet header()}
|
|
86
|
+
<Header currentVersion={data.version} versions={data.versions} versionsMeta={data.versionsMeta} versionBanner={data.versionBanner} config={data.config} products={data.products}>
|
|
87
|
+
{#snippet subheader()}
|
|
88
|
+
{#if data.config.navigation?.tabGroups && data.config.navigation.tabGroups.length > 0}
|
|
89
|
+
<TabGroups
|
|
90
|
+
tabGroups={data.config.navigation.tabGroups}
|
|
91
|
+
activeTabId={data.categoryTabGroup}
|
|
92
|
+
docs={allDocsCompat}
|
|
93
|
+
version={data.version}
|
|
94
|
+
flush={data.config.navigation?.sidebarStyle === 'flush'}
|
|
95
|
+
/>
|
|
96
|
+
{/if}
|
|
97
|
+
{/snippet}
|
|
98
|
+
</Header>
|
|
99
|
+
{/snippet}
|
|
100
|
+
<NotFoundContent version={data.version} />
|
|
101
|
+
</MobileDocLayout>
|
|
102
|
+
<MdxHotReload />
|
|
103
|
+
<HotReloadIndicator />
|
|
104
|
+
<DevModeBadge />
|
|
105
|
+
{:else if data.doc}
|
|
106
|
+
<!-- Normal doc or category with doc content -->
|
|
107
|
+
<MobileDocLayout
|
|
108
|
+
docs={allDocsCompat}
|
|
109
|
+
version={data.version}
|
|
110
|
+
config={data.config}
|
|
111
|
+
activeTabGroup={data.categoryTabGroup}
|
|
112
|
+
>
|
|
113
|
+
{#snippet header()}
|
|
114
|
+
<Header currentVersion={data.version} versions={data.versions} versionsMeta={data.versionsMeta} versionBanner={data.versionBanner} config={data.config} products={data.products}>
|
|
115
|
+
{#snippet subheader()}
|
|
116
|
+
{#if data.config.navigation?.tabGroups && data.config.navigation.tabGroups.length > 0}
|
|
117
|
+
<TabGroups
|
|
118
|
+
tabGroups={data.config.navigation.tabGroups}
|
|
119
|
+
activeTabId={data.categoryTabGroup}
|
|
120
|
+
docs={allDocsCompat}
|
|
121
|
+
version={data.version}
|
|
122
|
+
flush={data.config.navigation?.sidebarStyle === 'flush'}
|
|
123
|
+
/>
|
|
124
|
+
{/if}
|
|
125
|
+
{/snippet}
|
|
126
|
+
</Header>
|
|
127
|
+
{/snippet}
|
|
128
|
+
{#snippet toc()}
|
|
129
|
+
{#if !data.isCategory}
|
|
130
|
+
<TableOfContents items={data.toc} config={data.config} />
|
|
131
|
+
{/if}
|
|
132
|
+
{/snippet}
|
|
133
|
+
|
|
134
|
+
{#if data.isCategory}
|
|
135
|
+
{#snippet categoryContent()}
|
|
136
|
+
{#if data.doc?.contentNodes}
|
|
137
|
+
<MdxContent nodes={data.doc.contentNodes} components={mdxComponents} />
|
|
138
|
+
{:else if data.doc?.content}
|
|
139
|
+
{@html data.doc.content}
|
|
140
|
+
{/if}
|
|
141
|
+
{/snippet}
|
|
142
|
+
<CategoryIndex
|
|
143
|
+
categoryPath={data.slug}
|
|
144
|
+
version={data.version}
|
|
145
|
+
allDocs={allDocsCompat}
|
|
146
|
+
title={data.doc.meta.title}
|
|
147
|
+
description={data.doc.meta.description}
|
|
148
|
+
content={categoryContent}
|
|
149
|
+
config={data.config}
|
|
150
|
+
/>
|
|
151
|
+
{:else}
|
|
152
|
+
<SearchHighlight />
|
|
153
|
+
<DocLayout
|
|
154
|
+
meta={data.doc.meta}
|
|
155
|
+
previousDoc={previousDoc}
|
|
156
|
+
nextDoc={nextDoc}
|
|
157
|
+
version={data.version}
|
|
158
|
+
slug={data.slug}
|
|
159
|
+
config={data.config}
|
|
160
|
+
>
|
|
161
|
+
{#if data.doc.contentNodes}
|
|
162
|
+
<MdxContent nodes={data.doc.contentNodes} components={mdxComponents} />
|
|
163
|
+
{:else}
|
|
164
|
+
{@html data.doc.content}
|
|
165
|
+
{/if}
|
|
166
|
+
</DocLayout>
|
|
167
|
+
{/if}
|
|
168
|
+
</MobileDocLayout>
|
|
169
|
+
<MdxHotReload />
|
|
170
|
+
<HotReloadIndicator />
|
|
171
|
+
<DevModeBadge />
|
|
172
|
+
{/if}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import adapter from '@sveltejs/adapter-static';
|
|
2
|
+
import { specraConfig } from 'specra/svelte-config';
|
|
3
|
+
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
|
|
4
|
+
|
|
5
|
+
const config = specraConfig({
|
|
6
|
+
vitePreprocess: { vitePreprocess },
|
|
7
|
+
kit: {
|
|
8
|
+
adapter: adapter(),
|
|
9
|
+
prerender: { handleHttpError: 'warn', handleMissingId: 'warn', handleUnseenRoutes: 'warn' }
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
export default config;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "./.svelte-kit/tsconfig.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"allowJs": true,
|
|
5
|
+
"checkJs": true,
|
|
6
|
+
"esModuleInterop": true,
|
|
7
|
+
"forceConsistentCasingInFileNames": true,
|
|
8
|
+
"resolveJsonModule": true,
|
|
9
|
+
"skipLibCheck": true,
|
|
10
|
+
"strict": true
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
SPECTRA_TOKEN=sk_xxx...
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: About Specra
|
|
3
|
+
sidebar_position: 1
|
|
4
|
+
icon: info
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Specra is a self-hosted, Mintlify-quality documentation platform built with **SvelteKit**, **MDX**, and **Tailwind CSS**. It provides a polished, readable docs experience with powerful features for both readers and writers.
|
|
8
|
+
|
|
9
|
+
## Why Specra?
|
|
10
|
+
|
|
11
|
+
<CardGrid cols={2}>
|
|
12
|
+
<Card icon="zap" title="Fast & Static" description="Pre-rendered pages with edge caching for lightning-fast load times" />
|
|
13
|
+
<Card icon="search" title="Instant Search" description="Meilisearch-powered full-text search with typo tolerance" />
|
|
14
|
+
<Card icon="git-branch" title="Versioned Docs" description="Multiple documentation versions under /docs/v1.0.0/, /docs/v2.0.0/" />
|
|
15
|
+
<Card icon="palette" title="Theme Support" description="Dark mode, customizable colors, and design tokens" />
|
|
16
|
+
</CardGrid>
|
|
17
|
+
|
|
18
|
+
## Built With
|
|
19
|
+
|
|
20
|
+
- **SvelteKit** - Svelte framework with file-based routing
|
|
21
|
+
- **MDX** - Markdown with Svelte components
|
|
22
|
+
- **Tailwind CSS** - Utility-first styling
|
|
23
|
+
- **Meilisearch** - Fast, typo-tolerant search
|
|
24
|
+
- **TypeScript** - Full type safety
|
|
25
|
+
|
|
26
|
+
## Core Principles
|
|
27
|
+
|
|
28
|
+
<Steps>
|
|
29
|
+
<Step title="Content First">
|
|
30
|
+
Your documentation lives in the `docs/` folder as MDX files. The system handles routing, navigation, and rendering automatically.
|
|
31
|
+
</Step>
|
|
32
|
+
|
|
33
|
+
<Step title="Developer Experience">
|
|
34
|
+
Edit MDX files, and see changes instantly with hot reload. No complex configuration required.
|
|
35
|
+
</Step>
|
|
36
|
+
|
|
37
|
+
<Step title="Production Ready">
|
|
38
|
+
Built-in SEO, accessibility, performance optimization, and CI/CD integration.
|
|
39
|
+
</Step>
|
|
40
|
+
</Steps>
|
|
41
|
+
|
|
42
|
+
## What's Included
|
|
43
|
+
|
|
44
|
+
| Feature | Description |
|
|
45
|
+
|---------|-------------|
|
|
46
|
+
| **MDX Components** | Callouts, tabs, code blocks, cards, accordions, and more |
|
|
47
|
+
| **Sidebar Navigation** | Auto-generated from folder structure with collapsible groups |
|
|
48
|
+
| **Table of Contents** | Auto-generated from headings with scroll tracking |
|
|
49
|
+
| **Version Switcher** | Switch between documentation versions |
|
|
50
|
+
| **Search** | Full-text search with keyboard shortcuts (⌘K) |
|
|
51
|
+
| **Dark Mode** | System-aware theme with manual toggle |
|
|
52
|
+
| **Reading Time** | Automatic reading time estimation |
|
|
53
|
+
| **Responsive** | Mobile-first design that works on all devices |
|
|
54
|
+
|
|
55
|
+
## Getting Started
|
|
56
|
+
|
|
57
|
+
Ready to write documentation? Head to the [Getting Started](/docs/v1.0.0/getting-started) guide.
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Callout
|
|
3
|
+
description: Highlight important information with styled callout boxes
|
|
4
|
+
sidebar_position: 4
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Callouts draw attention to important information within your content. They're styled based on the type of message they convey.
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```mdx
|
|
12
|
+
<Callout type="info">
|
|
13
|
+
This is helpful information for the reader.
|
|
14
|
+
</Callout>
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Types
|
|
18
|
+
|
|
19
|
+
### Info
|
|
20
|
+
<Callout type="info">
|
|
21
|
+
This provides additional context or helpful tips.
|
|
22
|
+
</Callout>
|
|
23
|
+
|
|
24
|
+
```mdx
|
|
25
|
+
<Callout type="info">
|
|
26
|
+
Helpful additional context goes here.
|
|
27
|
+
</Callout>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Note
|
|
31
|
+
<Callout type="note">
|
|
32
|
+
Notes highlight important information the reader should be aware of.
|
|
33
|
+
</Callout>
|
|
34
|
+
|
|
35
|
+
### Tip
|
|
36
|
+
<Callout type="tip">
|
|
37
|
+
Tips provide suggestions for better usage or best practices.
|
|
38
|
+
</Callout>
|
|
39
|
+
|
|
40
|
+
### Warning
|
|
41
|
+
<Callout type="warning">
|
|
42
|
+
Warnings alert users to potential issues or breaking changes.
|
|
43
|
+
</Callout>
|
|
44
|
+
|
|
45
|
+
### Success
|
|
46
|
+
<Callout type="success">
|
|
47
|
+
Success callouts confirm positive outcomes or completed actions.
|
|
48
|
+
</Callout>
|
|
49
|
+
|
|
50
|
+
### Error
|
|
51
|
+
<Callout type="error">
|
|
52
|
+
Error callouts highlight critical issues or things to avoid.
|
|
53
|
+
</Callout>
|
|
54
|
+
|
|
55
|
+
### Danger
|
|
56
|
+
<Callout type="danger">
|
|
57
|
+
Danger callouts warn about potentially destructive actions.
|
|
58
|
+
</Callout>
|
|
59
|
+
|
|
60
|
+
## Props
|
|
61
|
+
|
|
62
|
+
| Prop | Type | Default | Description |
|
|
63
|
+
|------|------|---------|-------------|
|
|
64
|
+
| `children` | `ReactNode` | required | Callout content |
|
|
65
|
+
| `type` | `"info" \| "note" \| "tip" \| "warning" \| "success" \| "error" \| "danger"` | `"info"` | Callout style |
|
|
66
|
+
|
|
67
|
+
## GitHub-Style Alerts
|
|
68
|
+
|
|
69
|
+
You can also use markdown blockquotes with alert markers:
|
|
70
|
+
|
|
71
|
+
```mdx
|
|
72
|
+
> [!INFO]
|
|
73
|
+
> This is an info alert using markdown syntax.
|
|
74
|
+
|
|
75
|
+
> [!WARNING]
|
|
76
|
+
> This is a warning using markdown syntax.
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
> [!INFO]
|
|
80
|
+
> This is an info alert using markdown syntax.
|
|
81
|
+
|
|
82
|
+
> [!WARNING]
|
|
83
|
+
> This is a warning alert using markdown syntax.
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Code Block
|
|
3
|
+
description: Display syntax-highlighted code with line numbers and copy functionality
|
|
4
|
+
sidebar_position: 6
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Code blocks display syntax-highlighted code with line numbers, a copy button, and optional filename headers.
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
Code blocks are automatically created when using fenced code blocks with a language specifier:
|
|
12
|
+
|
|
13
|
+
````mdx
|
|
14
|
+
```javascript
|
|
15
|
+
const greeting = "Hello, World!";
|
|
16
|
+
console.log(greeting);
|
|
17
|
+
```
|
|
18
|
+
````
|
|
19
|
+
|
|
20
|
+
## Live Examples
|
|
21
|
+
|
|
22
|
+
### JavaScript
|
|
23
|
+
|
|
24
|
+
```javascript
|
|
25
|
+
function fibonacci(n) {
|
|
26
|
+
if (n <= 1) return n;
|
|
27
|
+
return fibonacci(n - 1) + fibonacci(n - 2);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
console.log(fibonacci(10)); // 55
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### TypeScript
|
|
34
|
+
|
|
35
|
+
```typescript
|
|
36
|
+
interface User {
|
|
37
|
+
id: string;
|
|
38
|
+
name: string;
|
|
39
|
+
email: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function greetUser(user: User): string {
|
|
43
|
+
return `Hello, ${user.name}!`;
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Python
|
|
48
|
+
|
|
49
|
+
```python
|
|
50
|
+
def quicksort(arr):
|
|
51
|
+
if len(arr) <= 1:
|
|
52
|
+
return arr
|
|
53
|
+
pivot = arr[len(arr) // 2]
|
|
54
|
+
left = [x for x in arr if x < pivot]
|
|
55
|
+
middle = [x for x in arr if x == pivot]
|
|
56
|
+
right = [x for x in arr if x > pivot]
|
|
57
|
+
return quicksort(left) + middle + quicksort(right)
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Bash
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
# Install dependencies
|
|
64
|
+
npm install
|
|
65
|
+
|
|
66
|
+
# Start development server
|
|
67
|
+
npm run dev
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### JSON
|
|
71
|
+
|
|
72
|
+
```json
|
|
73
|
+
{
|
|
74
|
+
"name": "my-project",
|
|
75
|
+
"version": "1.0.0",
|
|
76
|
+
"dependencies": {
|
|
77
|
+
"react": "^19.0.0",
|
|
78
|
+
"next": "^16.0.0"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Features
|
|
84
|
+
|
|
85
|
+
<Callout type="info">
|
|
86
|
+
Code blocks include automatic syntax highlighting for many languages including JavaScript, TypeScript, Python, Bash, JSON, CSS, and more.
|
|
87
|
+
</Callout>
|
|
88
|
+
|
|
89
|
+
- **Syntax Highlighting** - Automatic language detection and highlighting
|
|
90
|
+
- **Line Numbers** - Easy reference for specific lines
|
|
91
|
+
- **Copy Button** - One-click code copying
|
|
92
|
+
- **Filename Header** - Optional filename display
|
|
93
|
+
|
|
94
|
+
## Supported Languages
|
|
95
|
+
|
|
96
|
+
Common languages include:
|
|
97
|
+
- `javascript`, `typescript`, `jsx`, `tsx`
|
|
98
|
+
- `python`, `ruby`, `go`, `rust`
|
|
99
|
+
- `bash`, `shell`, `powershell`
|
|
100
|
+
- `html`, `css`, `scss`
|
|
101
|
+
- `json`, `yaml`, `toml`
|
|
102
|
+
- `sql`, `graphql`
|
|
103
|
+
- `markdown`, `mdx`
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Components
|
|
3
|
+
description: A comprehensive guide to all available components
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
### A list of over 10 useful components
|
|
7
|
+
|
|
8
|
+
Welcome to the components documentation. Here you'll find information about all the reusable components available in this documentation system.
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Tabs
|
|
3
|
+
description: Organize content into tabbed sections
|
|
4
|
+
sidebar_position: 15
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Tabs organize content into switchable panels, perfect for showing alternatives like different package managers or language examples.
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```mdx
|
|
12
|
+
<Tabs defaultValue="npm">
|
|
13
|
+
<Tab label="npm">
|
|
14
|
+
npm content here
|
|
15
|
+
</Tab>
|
|
16
|
+
|
|
17
|
+
<Tab label="yarn">
|
|
18
|
+
yarn content here
|
|
19
|
+
</Tab>
|
|
20
|
+
|
|
21
|
+
<Tab label="pnpm">
|
|
22
|
+
pnpm content here
|
|
23
|
+
</Tab>
|
|
24
|
+
</Tabs>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Live Examples
|
|
28
|
+
|
|
29
|
+
### Package Manager Selection
|
|
30
|
+
|
|
31
|
+
<Tabs defaultValue="npm">
|
|
32
|
+
<Tab label="npm">
|
|
33
|
+
```bash
|
|
34
|
+
npm install my-package
|
|
35
|
+
```
|
|
36
|
+
</Tab>
|
|
37
|
+
|
|
38
|
+
<Tab label="yarn">
|
|
39
|
+
```bash
|
|
40
|
+
yarn add my-package
|
|
41
|
+
```
|
|
42
|
+
</Tab>
|
|
43
|
+
|
|
44
|
+
<Tab label="pnpm">
|
|
45
|
+
```bash
|
|
46
|
+
pnpm add my-package
|
|
47
|
+
```
|
|
48
|
+
</Tab>
|
|
49
|
+
</Tabs>
|
|
50
|
+
|
|
51
|
+
### Code Examples
|
|
52
|
+
|
|
53
|
+
<Tabs defaultValue="JavaScript">
|
|
54
|
+
<Tab label="JavaScript">
|
|
55
|
+
```javascript
|
|
56
|
+
function greet(name) {
|
|
57
|
+
return `Hello, ${name}!`;
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
</Tab>
|
|
61
|
+
|
|
62
|
+
<Tab label="TypeScript">
|
|
63
|
+
```typescript
|
|
64
|
+
function greet(name: string): string {
|
|
65
|
+
return `Hello, ${name}!`;
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
</Tab>
|
|
69
|
+
|
|
70
|
+
<Tab label="Python">
|
|
71
|
+
```python
|
|
72
|
+
def greet(name):
|
|
73
|
+
return f"Hello, {name}!"
|
|
74
|
+
```
|
|
75
|
+
</Tab>
|
|
76
|
+
</Tabs>
|
|
77
|
+
|
|
78
|
+
## Props
|
|
79
|
+
|
|
80
|
+
### Tabs
|
|
81
|
+
|
|
82
|
+
| Prop | Type | Default | Description |
|
|
83
|
+
|------|------|---------|-------------|
|
|
84
|
+
| `children` | `ReactNode` | required | Tab components |
|
|
85
|
+
| `defaultValue` | `string` | - | Label of initially selected tab (defaults to first tab) |
|
|
86
|
+
|
|
87
|
+
### Tab
|
|
88
|
+
|
|
89
|
+
| Prop | Type | Default | Description |
|
|
90
|
+
|------|------|---------|-------------|
|
|
91
|
+
| `label` | `string` | required | Tab button label |
|
|
92
|
+
| `children` | `ReactNode` | required | Content shown when tab is active |
|