create-svelte-docsmith 0.2.1 → 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/index.js
CHANGED
|
@@ -71,6 +71,7 @@ function applyOptions(dest, { pkgName, title, preset }) {
|
|
|
71
71
|
edit('package.json', (t) => t.replaceAll('{{PROJECT_NAME}}', pkgName));
|
|
72
72
|
edit('README.md', (t) => t.replaceAll('{{PROJECT_NAME}}', title));
|
|
73
73
|
edit('src/lib/site-config.ts', (t) => t.replaceAll('{{SITE_TITLE}}', title));
|
|
74
|
+
edit('src/routes/+page.svelte', (t) => t.replaceAll('{{SITE_TITLE}}', title));
|
|
74
75
|
if (preset && preset !== 'default') {
|
|
75
76
|
edit('src/app.css', (t) =>
|
|
76
77
|
t.replace(
|
package/package.json
CHANGED
package/template/package.json
CHANGED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { docs } from 'svelte-docsmith/content';
|
|
3
|
+
import { DocsShell, Hero, FeatureGrid, Feature, CTA, Action } from 'svelte-docsmith';
|
|
4
|
+
import { siteConfig } from '$lib/site-config';
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<!--
|
|
8
|
+
The landing page in front of your docs. Everything here is ordinary markup, so
|
|
9
|
+
rewrite it freely — or delete this file and add a `+page.ts` that redirects
|
|
10
|
+
straight to /docs/introduction if you'd rather not have one.
|
|
11
|
+
-->
|
|
12
|
+
<DocsShell config={siteConfig} content={docs} layout="page" pattern>
|
|
13
|
+
<Hero
|
|
14
|
+
title="{{SITE_TITLE}}"
|
|
15
|
+
description="A short line about what your project does and who it's for."
|
|
16
|
+
>
|
|
17
|
+
{#snippet actions()}
|
|
18
|
+
<Action href="/docs/quick-start">Get started</Action>
|
|
19
|
+
<Action href="/docs/introduction" variant="secondary">Read the docs</Action>
|
|
20
|
+
{/snippet}
|
|
21
|
+
</Hero>
|
|
22
|
+
|
|
23
|
+
<FeatureGrid
|
|
24
|
+
background="muted"
|
|
25
|
+
title="Everything a docs site needs"
|
|
26
|
+
description="Swap these for the things that matter in your project."
|
|
27
|
+
>
|
|
28
|
+
<Feature title="Markdown routes">
|
|
29
|
+
Pages are markdown files under src/routes/docs/. Add one and it appears.
|
|
30
|
+
</Feature>
|
|
31
|
+
<Feature title="Navigation builds itself">
|
|
32
|
+
The sidebar, breadcrumbs, and prev/next pager all come from page frontmatter.
|
|
33
|
+
</Feature>
|
|
34
|
+
<Feature title="Search included">
|
|
35
|
+
A full-text command palette over your pages, with no service to run.
|
|
36
|
+
</Feature>
|
|
37
|
+
<Feature title="Light and dark">
|
|
38
|
+
Every component and code block follows the theme, and eleven presets ship built in.
|
|
39
|
+
</Feature>
|
|
40
|
+
<Feature title="Ready for AI tools">
|
|
41
|
+
An llms.txt index, per-page Markdown, and a copy button, wired up already.
|
|
42
|
+
</Feature>
|
|
43
|
+
<Feature title="SEO out of the box">
|
|
44
|
+
Titles, meta descriptions, Open Graph tags, and a sitemap, from your frontmatter.
|
|
45
|
+
</Feature>
|
|
46
|
+
</FeatureGrid>
|
|
47
|
+
|
|
48
|
+
<CTA
|
|
49
|
+
title="Start writing"
|
|
50
|
+
description="Your first page is a markdown file. That's the whole setup."
|
|
51
|
+
>
|
|
52
|
+
{#snippet actions()}
|
|
53
|
+
<Action href="/docs/quick-start">Quick start</Action>
|
|
54
|
+
{/snippet}
|
|
55
|
+
</CTA>
|
|
56
|
+
</DocsShell>
|