@farming-labs/svelte-theme 0.0.2-beta.22 → 0.0.2-beta.23

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": "@farming-labs/svelte-theme",
3
- "version": "0.0.2-beta.22",
3
+ "version": "0.0.2-beta.23",
4
4
  "description": "Svelte UI components for @farming-labs/docs — layout, sidebar, TOC, search, and theme toggle",
5
5
  "keywords": [
6
6
  "docs",
@@ -72,8 +72,8 @@
72
72
  "dependencies": {
73
73
  "gray-matter": "^4.0.3",
74
74
  "sugar-high": "^0.9.5",
75
- "@farming-labs/docs": "0.0.2-beta.22",
76
- "@farming-labs/svelte": "0.0.2-beta.22"
75
+ "@farming-labs/docs": "0.0.2-beta.23",
76
+ "@farming-labs/svelte": "0.0.2-beta.23"
77
77
  },
78
78
  "peerDependencies": {
79
79
  "svelte": ">=5.0.0"
@@ -30,6 +30,13 @@
30
30
  );
31
31
 
32
32
  let showLastModified = $derived(!!data.lastModified);
33
+
34
+ let llmsTxtEnabled = $derived.by(() => {
35
+ const cfg = config?.llmsTxt;
36
+ if (cfg === true) return true;
37
+ if (typeof cfg === "object" && cfg !== null) return cfg.enabled !== false;
38
+ return false;
39
+ });
33
40
  </script>
34
41
 
35
42
  <svelte:head>
@@ -48,6 +55,7 @@
48
55
  nextPage={data.nextPage}
49
56
  editOnGithub={showEditOnGithub ? data.editOnGithub : null}
50
57
  lastModified={showLastModified ? data.lastModified : null}
58
+ {llmsTxtEnabled}
51
59
  >
52
60
  {#snippet children()}
53
61
  {#if data.description}
@@ -13,6 +13,7 @@
13
13
  nextPage = null,
14
14
  editOnGithub = null,
15
15
  lastModified = null,
16
+ llmsTxtEnabled = false,
16
17
  children,
17
18
  } = $props();
18
19
 
@@ -92,7 +93,7 @@
92
93
  </div>
93
94
 
94
95
  <footer class="fd-page-footer">
95
- {#if editOnGithub || lastModified}
96
+ {#if editOnGithub || lastModified || llmsTxtEnabled}
96
97
  <div class="fd-edit-on-github">
97
98
  {#if editOnGithub}
98
99
  <a href={editOnGithub} target="_blank" rel="noopener noreferrer">
@@ -103,6 +104,12 @@
103
104
  Edit on GitHub
104
105
  </a>
105
106
  {/if}
107
+ {#if llmsTxtEnabled}
108
+ <span class="fd-llms-txt-links">
109
+ <a href="/api/docs?format=llms" target="_blank" rel="noopener noreferrer" class="fd-llms-txt-link">llms.txt</a>
110
+ <a href="/api/docs?format=llms-full" target="_blank" rel="noopener noreferrer" class="fd-llms-txt-link">llms-full.txt</a>
111
+ </span>
112
+ {/if}
106
113
  {#if lastModified}
107
114
  <span class="fd-last-modified">Last updated: {lastModified}</span>
108
115
  {/if}
package/styles/docs.css CHANGED
@@ -1237,6 +1237,29 @@ html.dark pre.shiki {
1237
1237
  font-size: 12px;
1238
1238
  }
1239
1239
 
1240
+ .fd-llms-txt-links {
1241
+ display: inline-flex;
1242
+ align-items: center;
1243
+ gap: 0.5rem;
1244
+ }
1245
+
1246
+ .fd-llms-txt-link {
1247
+ color: var(--color-fd-muted-foreground);
1248
+ font-size: 0.75rem;
1249
+ font-family: var(--fd-font-mono, ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace);
1250
+ text-decoration: none;
1251
+ padding: 0.125rem 0.375rem;
1252
+ border-radius: 0.25rem;
1253
+ border: 1px solid var(--color-fd-border, hsl(0 0% 80% / 50%));
1254
+ transition: color 150ms, border-color 150ms;
1255
+ }
1256
+
1257
+ .fd-llms-txt-link:hover {
1258
+ color: var(--color-fd-foreground);
1259
+ border-color: var(--color-fd-foreground);
1260
+ text-decoration: none;
1261
+ }
1262
+
1240
1263
  /* ─── Previous / Next Navigation ────────────────────────────────────── */
1241
1264
 
1242
1265
  .fd-page-nav {