@farming-labs/nuxt-theme 0.2.49 → 0.2.52
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/README.md +85 -0
- package/package.json +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# @farming-labs/nuxt-theme
|
|
2
|
+
|
|
3
|
+
The Vue and Nuxt UI layer and theme preset package for
|
|
4
|
+
[`@farming-labs/docs`](https://www.npmjs.com/package/@farming-labs/docs).
|
|
5
|
+
|
|
6
|
+
It renders the docs shell, page content, table of contents, breadcrumbs, search, AI chat, API
|
|
7
|
+
reference switcher, and theme controls. Content loading and Nitro handlers live in
|
|
8
|
+
`@farming-labs/nuxt`.
|
|
9
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm install @farming-labs/docs @farming-labs/nuxt @farming-labs/nuxt-theme @farming-labs/theme
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
The CLI can scaffold the complete Nuxt integration:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npx @farming-labs/docs@latest init
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Configure the theme
|
|
23
|
+
|
|
24
|
+
```ts
|
|
25
|
+
// docs.config.ts
|
|
26
|
+
import { defineDocs } from "@farming-labs/docs";
|
|
27
|
+
import { fumadocs } from "@farming-labs/nuxt-theme";
|
|
28
|
+
|
|
29
|
+
export default defineDocs({
|
|
30
|
+
entry: "docs",
|
|
31
|
+
contentDir: "docs",
|
|
32
|
+
theme: fumadocs(),
|
|
33
|
+
nav: { title: "Docs", url: "/docs" },
|
|
34
|
+
});
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Add the matching shared CSS in `nuxt.config.ts`:
|
|
38
|
+
|
|
39
|
+
```ts
|
|
40
|
+
export default defineNuxtConfig({
|
|
41
|
+
css: ["@farming-labs/theme/default/css"],
|
|
42
|
+
});
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Render the docs UI
|
|
46
|
+
|
|
47
|
+
```vue
|
|
48
|
+
<script setup lang="ts">
|
|
49
|
+
import { DocsContent, DocsLayout } from "@farming-labs/nuxt-theme";
|
|
50
|
+
import config from "~/docs.config";
|
|
51
|
+
|
|
52
|
+
const { data } = await useFetch("/api/docs", {
|
|
53
|
+
query: { pathname: useRoute().path },
|
|
54
|
+
});
|
|
55
|
+
</script>
|
|
56
|
+
|
|
57
|
+
<template>
|
|
58
|
+
<DocsLayout :tree="data.tree" :config="config">
|
|
59
|
+
<DocsContent :data="data" :config="config" />
|
|
60
|
+
</DocsLayout>
|
|
61
|
+
</template>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Main exports
|
|
65
|
+
|
|
66
|
+
- `DocsLayout`, `DocsContent`, and `DocsPage`
|
|
67
|
+
- `TableOfContents`, `Breadcrumb`, and `ThemeToggle`
|
|
68
|
+
- `SearchDialog`, `FloatingAIChat`, and `ApiReferenceSwitcher`
|
|
69
|
+
- Theme preset factories
|
|
70
|
+
|
|
71
|
+
Preset subpaths are `fumadocs`, `pixel-border`, `darksharp`, `colorful`, `greentree`, `hardline`,
|
|
72
|
+
`concrete`, `command-grid`, and `ledger`. The `fumadocs` preset uses
|
|
73
|
+
`@farming-labs/theme/default/css`; the other presets use the matching
|
|
74
|
+
`@farming-labs/theme/<preset>/css` entrypoint.
|
|
75
|
+
|
|
76
|
+
## Learn more
|
|
77
|
+
|
|
78
|
+
- [Documentation](https://docs.farming-labs.dev/docs)
|
|
79
|
+
- [Themes](https://docs.farming-labs.dev/docs/themes)
|
|
80
|
+
- [Nuxt example](https://github.com/farming-labs/docs/tree/main/examples/nuxt)
|
|
81
|
+
- [GitHub repository](https://github.com/farming-labs/docs)
|
|
82
|
+
|
|
83
|
+
## License
|
|
84
|
+
|
|
85
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@farming-labs/nuxt-theme",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.52",
|
|
4
4
|
"description": "Nuxt/Vue UI components for @farming-labs/docs — layout, sidebar, TOC, search, and theme toggle",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"docs",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
},
|
|
89
89
|
"dependencies": {
|
|
90
90
|
"sugar-high": "^0.9.5",
|
|
91
|
-
"@farming-labs/docs": "0.2.
|
|
91
|
+
"@farming-labs/docs": "0.2.52"
|
|
92
92
|
},
|
|
93
93
|
"peerDependencies": {
|
|
94
94
|
"nuxt": ">=3.0.0",
|