@farming-labs/astro-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/astro-theme",
|
|
3
|
-
"version": "0.0.2-beta.
|
|
3
|
+
"version": "0.0.2-beta.23",
|
|
4
4
|
"description": "Astro UI components for @farming-labs/docs — layout, sidebar, TOC, search, and theme toggle",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"astro",
|
|
@@ -69,8 +69,8 @@
|
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
71
|
"sugar-high": "^0.9.5",
|
|
72
|
-
"@farming-labs/docs": "0.0.2-beta.
|
|
73
|
-
"@farming-labs/astro": "0.0.2-beta.
|
|
72
|
+
"@farming-labs/docs": "0.0.2-beta.23",
|
|
73
|
+
"@farming-labs/astro": "0.0.2-beta.23"
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
76
|
"astro": ">=4.0.0"
|
|
@@ -20,6 +20,13 @@ const breadcrumbEnabled = (() => {
|
|
|
20
20
|
|
|
21
21
|
const showEditOnGithub = !!config?.github && !!data.editOnGithub;
|
|
22
22
|
const showLastModified = !!data.lastModified;
|
|
23
|
+
|
|
24
|
+
const llmsTxtEnabled = (() => {
|
|
25
|
+
const cfg = config?.llmsTxt;
|
|
26
|
+
if (cfg === true) return true;
|
|
27
|
+
if (typeof cfg === "object" && cfg !== null) return cfg.enabled !== false;
|
|
28
|
+
return false;
|
|
29
|
+
})();
|
|
23
30
|
---
|
|
24
31
|
|
|
25
32
|
<head>
|
|
@@ -36,6 +43,7 @@ const showLastModified = !!data.lastModified;
|
|
|
36
43
|
nextPage={data.nextPage}
|
|
37
44
|
editOnGithub={showEditOnGithub ? data.editOnGithub : null}
|
|
38
45
|
lastModified={showLastModified ? data.lastModified : null}
|
|
46
|
+
llmsTxtEnabled={llmsTxtEnabled}
|
|
39
47
|
>
|
|
40
48
|
{data.description && <p class="fd-page-description">{data.description}</p>}
|
|
41
49
|
<Fragment set:html={data.html} />
|
|
@@ -8,6 +8,7 @@ const {
|
|
|
8
8
|
nextPage = null,
|
|
9
9
|
editOnGithub = null,
|
|
10
10
|
lastModified = null,
|
|
11
|
+
llmsTxtEnabled = false,
|
|
11
12
|
} = Astro.props;
|
|
12
13
|
|
|
13
14
|
const pathname = Astro.url.pathname;
|
|
@@ -38,7 +39,7 @@ const parentUrl = segments.length >= 2
|
|
|
38
39
|
</div>
|
|
39
40
|
|
|
40
41
|
<footer class="fd-page-footer">
|
|
41
|
-
{(editOnGithub || lastModified) && (
|
|
42
|
+
{(editOnGithub || lastModified || llmsTxtEnabled) && (
|
|
42
43
|
<div class="fd-edit-on-github">
|
|
43
44
|
{editOnGithub && (
|
|
44
45
|
<a href={editOnGithub} target="_blank" rel="noopener noreferrer">
|
|
@@ -49,6 +50,12 @@ const parentUrl = segments.length >= 2
|
|
|
49
50
|
Edit on GitHub
|
|
50
51
|
</a>
|
|
51
52
|
)}
|
|
53
|
+
{llmsTxtEnabled && (
|
|
54
|
+
<span class="fd-llms-txt-links">
|
|
55
|
+
<a href="/api/docs?format=llms" target="_blank" rel="noopener noreferrer" class="fd-llms-txt-link">llms.txt</a>
|
|
56
|
+
<a href="/api/docs?format=llms-full" target="_blank" rel="noopener noreferrer" class="fd-llms-txt-link">llms-full.txt</a>
|
|
57
|
+
</span>
|
|
58
|
+
)}
|
|
52
59
|
{lastModified && (
|
|
53
60
|
<span class="fd-last-modified">Last updated: {lastModified}</span>
|
|
54
61
|
)}
|
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 {
|