@krate/simple-docs-theme 0.5.0-rc.16 → 0.5.0-rc.17
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 +62 -0
- package/package.json +3 -3
package/README.md
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# @krate/simple-docs-theme
|
|
2
|
+
|
|
3
|
+
A zero-JS docs theme for [Krate](https://github.com/kratejs/krate)'s `docs`
|
|
4
|
+
plugin. Its chrome ships no client runtime: the color-theme switch and the
|
|
5
|
+
mobile drawer compile to CSS signals, and the sidebar and mobile table of
|
|
6
|
+
contents use native `<details>` disclosures and links. It has no client-side
|
|
7
|
+
search UI. For the full shell with search, use `@krate/base-docs-theme`.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install @krate/simple-docs-theme
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
It needs `@krate/core` (for `docs()`) and `@krate/runtime` in the app.
|
|
16
|
+
|
|
17
|
+
## Use
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
// krate.config.ts
|
|
21
|
+
import { defineConfig, docs } from '@krate/core';
|
|
22
|
+
import { simpleDocsTheme } from '@krate/simple-docs-theme';
|
|
23
|
+
|
|
24
|
+
export default defineConfig({
|
|
25
|
+
plugins: [
|
|
26
|
+
docs({
|
|
27
|
+
contentDir: 'src/content/docs',
|
|
28
|
+
theme: simpleDocsTheme({ searchHref: '/search/' }),
|
|
29
|
+
search: { enabled: false },
|
|
30
|
+
}),
|
|
31
|
+
],
|
|
32
|
+
});
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Options
|
|
36
|
+
|
|
37
|
+
`simpleDocsTheme(options)`:
|
|
38
|
+
|
|
39
|
+
| Option | Description |
|
|
40
|
+
| ------------- | ----------- |
|
|
41
|
+
| `searchHref` | URL of a search page or external search UI. A search link shows in the header only when this is set. |
|
|
42
|
+
| `feedback` | `{ repo, discussions?, label? }`. "Was this helpful?" links that open a prefilled GitHub issue (or discussion) on `owner/repo`. |
|
|
43
|
+
| `editLabel` | Text of the edit link (default `Edit this page`). The link itself appears when the docs plugin has an `editLink`. |
|
|
44
|
+
|
|
45
|
+
## Exports
|
|
46
|
+
|
|
47
|
+
| Import | What it is |
|
|
48
|
+
| -------------------------------------- | ---------- |
|
|
49
|
+
| `@krate/simple-docs-theme` | `simpleDocsTheme()` (also the default export) and the `SimpleDocsThemeOptions` type. |
|
|
50
|
+
| `@krate/simple-docs-theme/layout` | The docs page layout component. |
|
|
51
|
+
| `@krate/simple-docs-theme/chrome` | `SidebarNav`, `TOCNav`, `TOCAside`, `Breadcrumbs`, `PrevNext`, `SocialLinks`, `ThemeSwitch`. |
|
|
52
|
+
| `@krate/simple-docs-theme/theme.css` | The theme stylesheet. |
|
|
53
|
+
|
|
54
|
+
## Docs
|
|
55
|
+
|
|
56
|
+
- [Customizing docs](https://krate.js.org/docs/guides/customizing-docs/)
|
|
57
|
+
- [CSS signals](https://krate.js.org/docs/core-concepts/css-signals/)
|
|
58
|
+
- [Creating plugins](https://krate.js.org/docs/guides/creating-plugins/)
|
|
59
|
+
|
|
60
|
+
## License
|
|
61
|
+
|
|
62
|
+
Apache-2.0
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@krate/simple-docs-theme",
|
|
3
|
-
"version": "0.5.0-rc.
|
|
3
|
+
"version": "0.5.0-rc.17",
|
|
4
4
|
"description": "A zero-JS Krate docs theme built on CSS signals and native HTML disclosures.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"NOTICE"
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@krate/plugin": "0.5.0-rc.
|
|
37
|
-
"@krate/runtime": "0.5.0-rc.
|
|
36
|
+
"@krate/plugin": "0.5.0-rc.17",
|
|
37
|
+
"@krate/runtime": "0.5.0-rc.17"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"typescript": "^5.5.0"
|