create-svelte-docsmith 0.3.0 → 0.3.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-svelte-docsmith",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Scaffold a documentation site powered by Svelte DocSmith.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -10,7 +10,7 @@
10
10
  "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json"
11
11
  },
12
12
  "dependencies": {
13
- "svelte-docsmith": "^0.9.0"
13
+ "svelte-docsmith": "^0.10.0"
14
14
  },
15
15
  "devDependencies": {
16
16
  "@sveltejs/adapter-auto": "^7.0.1",
@@ -1,5 +1,5 @@
1
1
  <script lang="ts">
2
- import { docs } from 'svelte-docsmith/content';
2
+ import { docs, versions } from 'svelte-docsmith/content';
3
3
  import { ErrorPage } from 'svelte-docsmith';
4
4
  import { siteConfig } from '$lib/site-config';
5
5
  </script>
@@ -7,6 +7,7 @@
7
7
  <ErrorPage
8
8
  config={siteConfig}
9
9
  content={docs}
10
+ {versions}
10
11
  search={() => import('svelte-docsmith/search').then((m) => m.docs)}
11
12
  home="/docs/introduction"
12
13
  homeLabel="Back to the docs"
@@ -1,5 +1,6 @@
1
1
  import { docs } from 'svelte-docsmith/llms';
2
- import { generateLlmsFullTxt } from 'svelte-docsmith';
2
+ import { versions } from 'svelte-docsmith/content';
3
+ import { generateLlmsFullTxt, currentOnly } from 'svelte-docsmith';
3
4
  import { siteConfig } from '$lib/site-config';
4
5
 
5
6
  export const prerender = true;
@@ -7,7 +8,7 @@ export const prerender = true;
7
8
  export function GET() {
8
9
  const body = generateLlmsFullTxt(
9
10
  { title: siteConfig.title, description: siteConfig.description, origin: siteConfig.url },
10
- docs
11
+ currentOnly(docs, versions)
11
12
  );
12
13
  return new Response(body, { headers: { 'content-type': 'text/plain; charset=utf-8' } });
13
14
  }
@@ -1,5 +1,6 @@
1
1
  import { docs } from 'svelte-docsmith/llms';
2
- import { generateLlmsTxt } from 'svelte-docsmith';
2
+ import { versions } from 'svelte-docsmith/content';
3
+ import { generateLlmsTxt, currentOnly } from 'svelte-docsmith';
3
4
  import { siteConfig } from '$lib/site-config';
4
5
 
5
6
  export const prerender = true;
@@ -7,7 +8,7 @@ export const prerender = true;
7
8
  export function GET() {
8
9
  const body = generateLlmsTxt(
9
10
  { title: siteConfig.title, description: siteConfig.description, origin: siteConfig.url },
10
- docs
11
+ currentOnly(docs, versions)
11
12
  );
12
13
  return new Response(body, { headers: { 'content-type': 'text/plain; charset=utf-8' } });
13
14
  }
@@ -1,5 +1,5 @@
1
- import { docs } from 'svelte-docsmith/content';
2
- import { generateSitemap } from 'svelte-docsmith';
1
+ import { docs, versions } from 'svelte-docsmith/content';
2
+ import { generateSitemap, currentOnly } from 'svelte-docsmith';
3
3
  import { siteConfig } from '$lib/site-config';
4
4
 
5
5
  export const prerender = true;
@@ -7,7 +7,7 @@ export const prerender = true;
7
7
  export function GET() {
8
8
  const body = generateSitemap(siteConfig.url ?? '', [
9
9
  { path: '/' },
10
- ...docs.map((d) => ({ path: d.path, lastmod: d.lastUpdated }))
10
+ ...currentOnly(docs, versions).map((d) => ({ path: d.path, lastmod: d.lastUpdated }))
11
11
  ]);
12
12
  return new Response(body, { headers: { 'content-type': 'application/xml' } });
13
13
  }