clarity-theme 0.1.1 → 0.1.3
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 +48 -222
- package/README.zh-CN.md +50 -245
- package/nuxt.config.ts +18 -15
- package/package.json +17 -19
- package/{app → src}/app.config.ts +1 -1
- package/{app → src}/components/widget/BlogTech.vue +2 -0
- package/{app → src}/composables/useArticle.ts +2 -2
- package/{config → src/config}/app.ts +1 -1
- package/{config → src/config}/define.mjs +1 -1
- package/{config → src/config}/define.ts +1 -1
- package/{config → src/config}/feeds.empty.ts +1 -1
- package/{config → src/config}/index.ts +1 -1
- package/{config → src/config}/public.ts +1 -1
- package/{img → src/img}/index.ts +2 -2
- package/{modules → src/modules}/clarity-config/index.ts +12 -9
- package/src/modules/clarity-source-layout/index.ts +78 -0
- package/{server → src/server}/routes/subscriptions.opml.get.ts +1 -1
- package/{app → src}/types/article.ts +3 -3
- package/src/types/feed.ts +1 -0
- package/app/types/feed.ts +0 -1
- /package/{app → src}/app.vue +0 -0
- /package/{app → src}/assets/css/_variable.scss +0 -0
- /package/{app → src}/assets/css/animation.scss +0 -0
- /package/{app → src}/assets/css/article.scss +0 -0
- /package/{app → src}/assets/css/color.scss +0 -0
- /package/{app → src}/assets/css/font.scss +0 -0
- /package/{app → src}/assets/css/main.scss +0 -0
- /package/{app → src}/assets/css/reusable.scss +0 -0
- /package/{app → src}/assets/icons/solar-rewind-back-bold-duotone.svg +0 -0
- /package/{app → src}/assets/icons/solar-rewind-forward-bold-duotone.svg +0 -0
- /package/{app → src}/components/blog/BlogAside.vue +0 -0
- /package/{app → src}/components/blog/BlogFooter.vue +0 -0
- /package/{app → src}/components/blog/BlogHeader.global.vue +0 -0
- /package/{app → src}/components/blog/BlogPanel.vue +0 -0
- /package/{app → src}/components/blog/BlogSidebar.vue +0 -0
- /package/{app → src}/components/blog/BlogWidget.vue +0 -0
- /package/{app → src}/components/blog/Mask.vue +0 -0
- /package/{app → src}/components/blog/SkipToContent.vue +0 -0
- /package/{app → src}/components/blog/ThemeToggle.vue +0 -0
- /package/{app → src}/components/content/Alert.vue +0 -0
- /package/{app → src}/components/content/Badge.vue +0 -0
- /package/{app → src}/components/content/Blur.vue +0 -0
- /package/{app → src}/components/content/CardList.vue +0 -0
- /package/{app → src}/components/content/Chat.vue +0 -0
- /package/{app → src}/components/content/Copy.vue +0 -0
- /package/{app → src}/components/content/EmojiClock.vue +0 -0
- /package/{app → src}/components/content/FeedCard.vue +0 -0
- /package/{app → src}/components/content/FeedGroup.vue +0 -0
- /package/{app → src}/components/content/Folding.vue +0 -0
- /package/{app → src}/components/content/Key.vue +0 -0
- /package/{app → src}/components/content/LinkBanner.vue +0 -0
- /package/{app → src}/components/content/LinkCard.vue +0 -0
- /package/{app → src}/components/content/MdTitle.vue +0 -0
- /package/{app → src}/components/content/Mermaid.vue +0 -0
- /package/{app → src}/components/content/MusicScore.vue +0 -0
- /package/{app → src}/components/content/Pic.vue +0 -0
- /package/{app → src}/components/content/Poetry.vue +0 -0
- /package/{app → src}/components/content/ProseA.vue +0 -0
- /package/{app → src}/components/content/ProseCode.vue +0 -0
- /package/{app → src}/components/content/ProsePre.vue +0 -0
- /package/{app → src}/components/content/ProseTable.vue +0 -0
- /package/{app → src}/components/content/Quote.vue +0 -0
- /package/{app → src}/components/content/Tab.vue +0 -0
- /package/{app → src}/components/content/Timeline.vue +0 -0
- /package/{app → src}/components/content/Tip.vue +0 -0
- /package/{app → src}/components/content/VideoEmbed.vue +0 -0
- /package/{app → src}/components/partial/Button.vue +0 -0
- /package/{app → src}/components/partial/DlGroup.vue +0 -0
- /package/{app → src}/components/partial/Dropdown.vue +0 -0
- /package/{app → src}/components/partial/Error.vue +0 -0
- /package/{app → src}/components/partial/Expand.vue +0 -0
- /package/{app → src}/components/partial/IconNavList.vue +0 -0
- /package/{app → src}/components/partial/Pagination.vue +0 -0
- /package/{app → src}/components/partial/RadioGroup.vue +0 -0
- /package/{app → src}/components/partial/Secret.vue +0 -0
- /package/{app → src}/components/partial/Slider.vue +0 -0
- /package/{app → src}/components/partial/Toggle.vue +0 -0
- /package/{app → src}/components/popover/Lightbox.vue +0 -0
- /package/{app → src}/components/popover/Search.vue +0 -0
- /package/{app → src}/components/popover/SearchItem.vue +0 -0
- /package/{app → src}/components/post/Archive.vue +0 -0
- /package/{app → src}/components/post/Article.vue +0 -0
- /package/{app → src}/components/post/Comment.vue +0 -0
- /package/{app → src}/components/post/Excerpt.vue +0 -0
- /package/{app → src}/components/post/OrderToggle.vue +0 -0
- /package/{app → src}/components/post/PostFooter.vue +0 -0
- /package/{app → src}/components/post/PostHeader.vue +0 -0
- /package/{app → src}/components/post/PostSurround.vue +0 -0
- /package/{app → src}/components/post/Slide.vue +0 -0
- /package/{app → src}/components/util/Date.vue +0 -0
- /package/{app → src}/components/util/HydrateSafe.vue +0 -0
- /package/{app → src}/components/util/Img.vue +0 -0
- /package/{app → src}/components/util/Link.vue +0 -0
- /package/{app → src}/components/widget/BlogLog.vue +0 -0
- /package/{app → src}/components/widget/BlogStats.vue +0 -0
- /package/{app → src}/components/widget/Empty.vue +0 -0
- /package/{app → src}/components/widget/Toc.vue +0 -0
- /package/{app → src}/composables/useAvoid.ts +0 -0
- /package/{app → src}/composables/useCopy.ts +0 -0
- /package/{app → src}/composables/usePagination.ts +0 -0
- /package/{app → src}/composables/useShiki.ts +0 -0
- /package/{app → src}/composables/useToc.ts +0 -0
- /package/{app → src}/composables/useWidgets.ts +0 -0
- /package/{config → src/config}/content.d.mts +0 -0
- /package/{config → src/config}/content.mjs +0 -0
- /package/{config → src/config}/content.ts +0 -0
- /package/{config → src/config}/feed.ts +0 -0
- /package/{config → src/config}/index.d.mts +0 -0
- /package/{config → src/config}/index.mjs +0 -0
- /package/{config → src/config}/schema.d.mts +0 -0
- /package/{config → src/config}/schema.mjs +0 -0
- /package/{config → src/config}/schema.ts +0 -0
- /package/{config → src/config}/server.ts +0 -0
- /package/{app → src}/error.vue +0 -0
- /package/{img → src/img}/index.d.mts +0 -0
- /package/{img → src/img}/index.mjs +0 -0
- /package/{app → src}/layouts/default.vue +0 -0
- /package/{modules → src/modules}/clarity-config/anti-mirror-client.ts +0 -0
- /package/{app → src}/pages/[...slug].vue +0 -0
- /package/{app → src}/pages/archive.vue +0 -0
- /package/{app → src}/pages/index.vue +0 -0
- /package/{app → src}/pages/link.vue +0 -0
- /package/{app → src}/pages/preview.vue +0 -0
- /package/{app → src}/plugins/easter-egg.ts +0 -0
- /package/{app → src}/plugins/init.ts +0 -0
- /package/{app → src}/plugins/tippy.ts +0 -0
- /package/{public → src/public}/assets/atom.css +0 -0
- /package/{public → src/public}/assets/atom.xsl +0 -0
- /package/{public → src/public}/fonts/AlimamaFangYuanTi.woff2 +0 -0
- /package/{remark-plugins → src/remark-plugins}/rehype-meta-slots.d.mts +0 -0
- /package/{remark-plugins → src/remark-plugins}/rehype-meta-slots.mjs +0 -0
- /package/{remark-plugins → src/remark-plugins}/rehype-meta-slots.ts +0 -0
- /package/{remark-plugins → src/remark-plugins}/remark-code-component.d.mts +0 -0
- /package/{remark-plugins → src/remark-plugins}/remark-code-component.mjs +0 -0
- /package/{remark-plugins → src/remark-plugins}/remark-code-component.ts +0 -0
- /package/{server → src/server}/api/stats.get.ts +0 -0
- /package/{server → src/server}/routes/atom.xml.get.ts +0 -0
- /package/{server → src/server}/utils/clarity.ts +0 -0
- /package/{shared → src/shared}/types/content.ts +0 -0
- /package/{shared → src/shared}/utils/clarity.ts +0 -0
- /package/{shared → src/shared}/utils/icon.ts +0 -0
- /package/{shared → src/shared}/utils/link.ts +0 -0
- /package/{shared → src/shared}/utils/str.ts +0 -0
- /package/{shared → src/shared}/utils/time.ts +0 -0
- /package/{app → src}/shiki.config.ts +0 -0
- /package/{app → src}/stores/layout.ts +0 -0
- /package/{app → src}/stores/search.ts +0 -0
- /package/{app → src}/types/index.ts +0 -0
- /package/{app → src}/types/modal.ts +0 -0
- /package/{app → src}/types/nav.ts +0 -0
- /package/{app → src}/utils/anim.ts +0 -0
- /package/{app → src}/utils/img.ts +0 -0
package/README.md
CHANGED
|
@@ -1,51 +1,45 @@
|
|
|
1
1
|
# Clarity Theme
|
|
2
2
|
|
|
3
|
+
[](https://github.com/iicemeta/clarity-theme/actions/workflows/ci.yml)
|
|
4
|
+
[](https://www.npmjs.com/package/clarity-theme)
|
|
5
|
+
[](./LICENSE)
|
|
6
|
+
|
|
3
7
|
**English** | [简体中文](./README.zh-CN.md)
|
|
4
8
|
|
|
5
9
|
Clarity Theme is a reusable **Nuxt 4 Layer blog theme** extracted from [L33Z22L11/blog-v3](https://github.com/L33Z22L11/blog-v3). It provides the generic blog UI, page structure, Markdown/MDC rendering, SEO integration, and feed/server outputs; your project provides all site data and content.
|
|
6
10
|
|
|
7
|
-
##
|
|
11
|
+
## Why Clarity?
|
|
8
12
|
|
|
9
|
-
-
|
|
10
|
-
- Validated site configuration with defaults and strict unknown-field rejection
|
|
11
|
-
- Nuxt Content collection factory for article metadata and sitemap data
|
|
12
|
-
- Markdown, MDC components, Shiki code highlighting, KaTeX, Mermaid, ABC music scores, and rich images
|
|
13
|
-
- Article list, archive, pagination, TOC, search, theme toggle, widgets, preview, and 404 routing
|
|
14
|
-
- Atom, OPML, statistics, robots, sitemap, and LLMs outputs
|
|
15
|
-
- Twikoo, head scripts, and anti-mirror integrations driven by consumer configuration
|
|
16
|
-
- UI defaults, app config overrides, custom Shiki themes, and same-path component overrides
|
|
17
|
-
- Automated workspace, tarball-consumer, SSR, browser, hydration, purity, contract, peer, and upstream-sync checks
|
|
13
|
+
Clarity replaces the traditional sync-fork workflow. Instead of merging thousands of upstream lines into your blog repository, you consume the Theme as a Layer and keep only your own files:
|
|
18
14
|
|
|
19
|
-
|
|
15
|
+
- **One `extends` entry** installs the whole blog application skeleton.
|
|
16
|
+
- **Theme and consumer are separated**: articles, friend links, redirects, deployment settings, secrets, and dependency patches never enter the Theme package.
|
|
17
|
+
- **Validated configuration**: `clarity.config.ts` is schema-checked with defaults and strict unknown-field rejection.
|
|
18
|
+
- **Content factory**: the Nuxt Content collection and article schema are derived from your configuration.
|
|
19
|
+
- **Rich rendering**: Markdown, MDC components, Shiki code highlighting, KaTeX, Mermaid, ABC music scores, and rich images.
|
|
20
|
+
- **Complete outputs**: article list, archive, pagination, TOC, search, theme toggle, widgets, Atom, OPML, statistics, robots, sitemap, and LLMs.
|
|
21
|
+
- **Integrations stay yours**: Twikoo, head scripts, and anti-mirror are driven by consumer configuration.
|
|
22
|
+
- **Override without forking**: UI app-config overrides, same-path component overrides, custom Shiki themes, and consumer CSS.
|
|
20
23
|
|
|
21
|
-
|
|
22
|
-
| --- | --- |
|
|
23
|
-
| Node.js | `^22.19 \|\| ^24.11 \|\| >=26` |
|
|
24
|
-
| pnpm | 12.4.1 or a compatible package manager for your project |
|
|
25
|
-
| Nuxt peer | `^4.5.2` |
|
|
26
|
-
| Vue peer | `^3.5.42` |
|
|
27
|
-
|
|
28
|
-
Clarity is available from the npm registry as `clarity-theme`. It is part of your application runtime (the Nuxt build and static generation load the Layer directly), so install it as a regular dependency rather than a development dependency; a production install must still be able to resolve it.
|
|
24
|
+
## Choose your path
|
|
29
25
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
26
|
+
| Starting point | Documentation |
|
|
27
|
+
| --- | --- |
|
|
28
|
+
| New blog | [Create a project](./docs/getting-started/new-project.md) |
|
|
29
|
+
| Existing blog-v3 site | [Migrate from blog-v3](./docs/getting-started/migration-from-blog-v3.md) · Agent skill: `migrate-blog-v3-to-clarity` |
|
|
30
|
+
| Manual installation into an existing Nuxt app | [Manual installation](./docs/getting-started/manual-installation.md) |
|
|
35
31
|
|
|
36
|
-
|
|
32
|
+
For an Agent-assisted migration, ask your agent to use the `migrate-blog-v3-to-clarity` skill. The full skill lives in [`skills/migrate-blog-v3-to-clarity`](./skills/migrate-blog-v3-to-clarity/SKILL.md).
|
|
37
33
|
|
|
38
|
-
|
|
34
|
+
## Quick start
|
|
39
35
|
|
|
40
36
|
```bash
|
|
41
|
-
pnpm
|
|
37
|
+
pnpm create clarity-theme@beta my-blog
|
|
38
|
+
cd my-blog
|
|
39
|
+
pnpm dev
|
|
42
40
|
```
|
|
43
41
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
## Quick Start
|
|
47
|
-
|
|
48
|
-
### 1. Extend the Layer
|
|
42
|
+
The creator package is published separately as `create-clarity-theme`; the `@beta` dist-tag is used while its initial prerelease is the published channel. See [`create-clarity-theme/README.md`](./create-clarity-theme/README.md) for all options. The manual path is four files:
|
|
49
43
|
|
|
50
44
|
```ts
|
|
51
45
|
// nuxt.config.ts
|
|
@@ -54,8 +48,6 @@ export default defineNuxtConfig({
|
|
|
54
48
|
})
|
|
55
49
|
```
|
|
56
50
|
|
|
57
|
-
### 2. Define site configuration
|
|
58
|
-
|
|
59
51
|
```ts
|
|
60
52
|
// clarity.config.ts
|
|
61
53
|
import { defineClarityConfig } from 'clarity-theme/config'
|
|
@@ -65,18 +57,11 @@ export default defineClarityConfig({
|
|
|
65
57
|
title: 'My Blog',
|
|
66
58
|
description: 'Notes about technology and life',
|
|
67
59
|
url: 'https://example.com/',
|
|
68
|
-
author: {
|
|
69
|
-
name: 'My Name',
|
|
70
|
-
avatar: '/avatar.webp',
|
|
71
|
-
},
|
|
60
|
+
author: { name: 'My Name', avatar: '/avatar.webp' },
|
|
72
61
|
},
|
|
73
62
|
})
|
|
74
63
|
```
|
|
75
64
|
|
|
76
|
-
`site.title`, `site.description`, `site.url`, and `site.author.name` are required. Article, feed, stats, integration, feature, and changelog groups are optional and receive documented defaults.
|
|
77
|
-
|
|
78
|
-
### 3. Create the Content schema
|
|
79
|
-
|
|
80
65
|
```ts
|
|
81
66
|
// content.config.ts
|
|
82
67
|
import { createClarityContentConfig } from 'clarity-theme/content'
|
|
@@ -85,205 +70,46 @@ import clarityConfig from './clarity.config'
|
|
|
85
70
|
export default createClarityContentConfig(clarityConfig)
|
|
86
71
|
```
|
|
87
72
|
|
|
88
|
-
Place articles under `content/posts/` and other Content pages under `content/`.
|
|
89
|
-
|
|
90
|
-
### 4. Optionally provide friend data
|
|
91
|
-
|
|
92
|
-
```ts
|
|
93
|
-
// feeds.ts
|
|
94
|
-
import type { FeedGroup } from 'clarity-theme/config'
|
|
95
|
-
|
|
96
|
-
const feeds: FeedGroup[] = []
|
|
97
|
-
|
|
98
|
-
export default feeds
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
Without this file, the friend page and OPML output use empty data and the build logs a warning.
|
|
102
|
-
|
|
103
|
-
### 5. Generate or develop
|
|
104
|
-
|
|
105
73
|
```bash
|
|
74
|
+
pnpm add clarity-theme
|
|
106
75
|
pnpm dev
|
|
107
|
-
pnpm generate
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
For a complete walkthrough from an existing blog-v3 project, see [Migration](./docs/MIGRATION.md). Theme data and user content are deliberately separate: the package never carries your articles, friend links, redirects, deployment settings, or package patches.
|
|
111
|
-
|
|
112
|
-
## Basic Configuration
|
|
113
|
-
|
|
114
|
-
| File | Responsibility |
|
|
115
|
-
| --- | --- |
|
|
116
|
-
| `clarity.config.ts` | Site identity, article semantics, feeds, stats, integrations, feature flags, changelog |
|
|
117
|
-
| `app/app.config.ts` | Optional reactive UI overrides only |
|
|
118
|
-
| `content.config.ts` | Nuxt Content collection/schema |
|
|
119
|
-
| `feeds.ts` | Optional friend data |
|
|
120
|
-
| consumer `runtimeConfig` | Environment-specific values and the only valid place for secrets |
|
|
121
|
-
|
|
122
|
-
Field-by-field defaults, visibility, and examples are documented in [Configuration](./docs/CONFIGURATION.md).
|
|
123
|
-
|
|
124
|
-
Example optional groups:
|
|
125
|
-
|
|
126
|
-
```ts
|
|
127
|
-
export default defineClarityConfig({
|
|
128
|
-
site: {
|
|
129
|
-
title: 'My Blog',
|
|
130
|
-
description: 'A Nuxt blog',
|
|
131
|
-
url: 'https://example.com/',
|
|
132
|
-
author: { name: 'My Name' },
|
|
133
|
-
},
|
|
134
|
-
article: {
|
|
135
|
-
defaultCategory: 'Uncategorized',
|
|
136
|
-
categories: {
|
|
137
|
-
Tech: { icon: 'tabler:code', color: '#7777ff' },
|
|
138
|
-
},
|
|
139
|
-
types: { tech: {}, story: {} },
|
|
140
|
-
},
|
|
141
|
-
feed: { limit: 50, enableStyle: true },
|
|
142
|
-
features: {
|
|
143
|
-
atom: true,
|
|
144
|
-
opml: true,
|
|
145
|
-
stats: true,
|
|
146
|
-
antiMirror: false,
|
|
147
|
-
},
|
|
148
|
-
})
|
|
149
76
|
```
|
|
150
77
|
|
|
151
|
-
|
|
78
|
+
Place articles under `content/posts/` and other Content pages under `content/`. See [Manual installation](./docs/getting-started/manual-installation.md) for the optional `feeds.ts` friend data and deployment notes.
|
|
152
79
|
|
|
153
|
-
##
|
|
80
|
+
## Requirements
|
|
154
81
|
|
|
155
|
-
|
|
|
82
|
+
| Runtime | Version |
|
|
156
83
|
| --- | --- |
|
|
157
|
-
|
|
|
158
|
-
|
|
|
159
|
-
|
|
|
160
|
-
|
|
|
161
|
-
| `clarity-theme/img` | Avatar/favicon/image URL helpers |
|
|
162
|
-
|
|
163
|
-
The Layer also exposes the `useClarityConfig()`, `useClaritySite()`, `useClarityArticle()`, and `useClaritySiteFeedEntry()` runtime auto-imports, plus the `#clarity/feeds` injection. They are Layer contracts rather than standalone package subpaths.
|
|
164
|
-
|
|
165
|
-
The exact export/type boundary is documented in [docs/API.md](./docs/API.md).
|
|
166
|
-
|
|
167
|
-
## Customization
|
|
168
|
-
|
|
169
|
-
### UI configuration
|
|
170
|
-
|
|
171
|
-
```ts
|
|
172
|
-
// app/app.config.ts
|
|
173
|
-
export default defineAppConfig({
|
|
174
|
-
clarity: {
|
|
175
|
-
header: { emojiTail: ['📝'] },
|
|
176
|
-
pagination: { perPage: 10 },
|
|
177
|
-
nav: [
|
|
178
|
-
{
|
|
179
|
-
title: '',
|
|
180
|
-
items: [
|
|
181
|
-
{ icon: 'tabler:files', text: 'Articles', url: '/' },
|
|
182
|
-
{ icon: 'tabler:link', text: 'Friends', url: '/link' },
|
|
183
|
-
{ icon: 'tabler:archive', text: 'Archive', url: '/archive' },
|
|
184
|
-
],
|
|
185
|
-
},
|
|
186
|
-
],
|
|
187
|
-
},
|
|
188
|
-
})
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
Objects merge deeply; arrays replace the Theme value entirely.
|
|
192
|
-
|
|
193
|
-
### Components
|
|
194
|
-
|
|
195
|
-
Create a Layer-relative component at the same path to replace it, for example:
|
|
196
|
-
|
|
197
|
-
```text
|
|
198
|
-
app/components/content/Badge.vue
|
|
199
|
-
```
|
|
200
|
-
|
|
201
|
-
Consumer components take precedence over Layer components. Nuxt currently emits a duplicate-name warning for this intentional override pattern.
|
|
202
|
-
|
|
203
|
-
### Shiki themes
|
|
204
|
-
|
|
205
|
-
Provide `app/shiki.config.ts` in the consumer project. The Theme fallback is used only when this file does not exist.
|
|
206
|
-
|
|
207
|
-
UI groups, same-path component overrides, CSS overrides, server/route customization, and Shiki ownership are described together in [Customization](./docs/CUSTOMIZATION.md).
|
|
208
|
-
|
|
209
|
-
## Compatibility and Verification
|
|
210
|
-
|
|
211
|
-
The verification suite is designed to cover:
|
|
212
|
-
|
|
213
|
-
- Playground static generation
|
|
214
|
-
- Independent `pnpm pack` consumer installation
|
|
215
|
-
- Five package exports in Node and TypeScript
|
|
216
|
-
- Three configuration branches
|
|
217
|
-
- Markdown/MDC/code/math/Mermaid/music/image rendering
|
|
218
|
-
- Production SSR, real browser rendering, and dev hydration
|
|
219
|
-
- Search, pagination, archive, TOC, SEO, robots, sitemap, LLMs, Atom, OPML, stats, permalink, 404, Twikoo branches, anti-mirror injection, UI override, and component override
|
|
220
|
-
- Theme purity, peer dependencies, sync tooling, and upstream drift
|
|
221
|
-
|
|
222
|
-
The generated release matrix lives in [Compatibility](./docs/COMPATIBILITY.md). Current exact counts, known limitations, technical debt, and release blockers live in [Project status](./docs/PROJECT-STATUS.md) and [Roadmap](./docs/ROADMAP.md). A release must rerun the ordered suite on the exact commit; earlier results are not a substitute.
|
|
84
|
+
| Node.js | `^22.19 \|\| ^24.11 \|\| >=26` |
|
|
85
|
+
| pnpm | 12.4.1 or a compatible package manager for your project |
|
|
86
|
+
| Nuxt peer | `^4.5.2` |
|
|
87
|
+
| Vue peer | `^3.5.42` |
|
|
223
88
|
|
|
224
|
-
|
|
89
|
+
Clarity is part of your application runtime (the Nuxt build and static generation load the Layer directly), so install it as a regular dependency rather than a development dependency.
|
|
225
90
|
|
|
226
91
|
## Documentation
|
|
227
92
|
|
|
228
|
-
All documents are also available in 简体中文 as sibling `*.zh-CN.md` files.
|
|
93
|
+
All documents are also available in 简体中文 as sibling `*.zh-CN.md` files. Start from the [documentation index](./docs/README.md):
|
|
229
94
|
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
| [API](./docs/API.md) | Public package/Layer API versus internal implementation |
|
|
237
|
-
| [Configuration](./docs/CONFIGURATION.md) | Field-level Clarity configuration contract and examples |
|
|
238
|
-
| [Customization](./docs/CUSTOMIZATION.md) | UI, component, Shiki, CSS, server, and route overrides |
|
|
239
|
-
| [Compatibility](./docs/COMPATIBILITY.md) | Generated release compatibility matrix |
|
|
240
|
-
| [Upstream sync](./docs/UPSTREAM.md) | Baseline, manifest, commands, conflicts, and workflow |
|
|
241
|
-
| [Patches](./docs/PATCHES.md) | Consumer patch ownership and current conclusions |
|
|
242
|
-
| [Release audit](./docs/RELEASE-AUDIT.md) | Pre-closing engineering audit and remaining release gates |
|
|
243
|
-
| [Release checklist](./docs/RELEASE-CHECKLIST.md) | Exact final checks, remaining blockers, and verification evidence |
|
|
244
|
-
| [Publishing](./docs/PUBLISHING.md) | Versioning, tags, GitHub Releases, OIDC publishing, provenance, and rollback policy |
|
|
245
|
-
| [Changelog](./CHANGELOG.md) | Consumer-facing release history |
|
|
246
|
-
| [Extraction history](./docs/history/2026-09-layer-extraction.md) | Historical phases and one-time differential validation |
|
|
95
|
+
- **Getting started** — [new project](./docs/getting-started/new-project.md), [manual installation](./docs/getting-started/manual-installation.md), [migrating from blog-v3](./docs/getting-started/migration-from-blog-v3.md)
|
|
96
|
+
- **Guides** — [configuration](./docs/guides/configuration.md), [content](./docs/guides/content.md), [customization](./docs/guides/customization.md), [integrations](./docs/guides/integrations.md)
|
|
97
|
+
- **Reference** — [public API](./docs/reference/api.md), [routes and outputs](./docs/reference/routes-and-outputs.md), [compatibility matrix](./docs/reference/compatibility.md)
|
|
98
|
+
- **Concepts** — [architecture](./docs/concepts/architecture.md)
|
|
99
|
+
- **Maintainers** — [development](./docs/maintainers/development.md), [testing](./docs/maintainers/testing.md), [upstream sync](./docs/maintainers/upstream-sync.md), [patches](./docs/maintainers/patches.md), [publishing](./docs/maintainers/publishing.md), [release checklist](./docs/maintainers/release-checklist.md), [project status](./docs/maintainers/project-status.md), [roadmap](./docs/maintainers/roadmap.md), [documentation rules](./docs/maintainers/documentation.md)
|
|
100
|
+
- **Release history** — [CHANGELOG](./CHANGELOG.md); historical records live under [docs/history](./docs/history/)
|
|
247
101
|
|
|
248
102
|
## Development
|
|
249
103
|
|
|
250
104
|
```bash
|
|
251
|
-
pnpm install
|
|
252
|
-
pnpm dev
|
|
253
|
-
pnpm generate
|
|
254
|
-
pnpm lint
|
|
105
|
+
pnpm install # Theme + playground workspace
|
|
106
|
+
pnpm dev # Playground dev server
|
|
107
|
+
pnpm generate # Playground static generation
|
|
108
|
+
pnpm lint # ESLint + Stylelint
|
|
255
109
|
pnpm typecheck
|
|
256
|
-
pnpm verify # Purity/static leak checks
|
|
257
|
-
pnpm peers check
|
|
258
|
-
pnpm test:sync
|
|
259
|
-
pnpm test:migration
|
|
260
|
-
pnpm test:contract
|
|
261
|
-
pnpm test:consumer
|
|
262
|
-
pnpm test:compatibility
|
|
263
110
|
```
|
|
264
111
|
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
See [Project status → CI](./docs/PROJECT-STATUS.md#10-ci) for the exact CI stages and permissions.
|
|
268
|
-
|
|
269
|
-
## Upstream Synchronization
|
|
270
|
-
|
|
271
|
-
Clarity is extracted from an upstream Nuxt blog and records the exact reviewed baseline in `sync-manifest.json`. The synchronization tooling separates directly includable paths, consumer-owned exclusions, transformed Theme contracts, and manual review paths; unknown upstream changes block apply. Use:
|
|
272
|
-
|
|
273
|
-
```bash
|
|
274
|
-
pnpm sync:check # compare manifest baseline with remote
|
|
275
|
-
pnpm sync:diff # classify upstream changes
|
|
276
|
-
pnpm sync:apply # transactionally apply reviewed include-only changes
|
|
277
|
-
pnpm sync:verify # rerun Theme purity and baseline checks
|
|
278
|
-
```
|
|
279
|
-
|
|
280
|
-
The weekly workflow only detects and reports drift. It never applies, commits, or pushes changes. See [Upstream sync](./docs/UPSTREAM.md).
|
|
281
|
-
|
|
282
|
-
## Release Status
|
|
283
|
-
|
|
284
|
-
Clarity Theme is a **v0.1.1 gated npm release**. The Layer/package boundary, validated configuration, Content factory, rendering pipeline, server outputs, playground, real-consumer acceptance, compatibility matrix, three-layer CI, upstream-sync baseline, release gate, and OIDC publish workflow are implemented. See the [release checklist](./docs/RELEASE-CHECKLIST.md) for the exact remaining manual publication steps.
|
|
285
|
-
|
|
286
|
-
The v0.1.0 correctness gates from [Roadmap](./docs/ROADMAP.md) are resolved: server/client configuration is split, feature-off routes return 404 at runtime, anti-mirror navigation is verified in a real browser, the no-op random-permalink field is removed, and multi-pattern stats are covered by a regression test. Remaining deferred items are recorded in the roadmap and release notes.
|
|
112
|
+
See [development](./docs/maintainers/development.md) and [testing](./docs/maintainers/testing.md) for the full verification matrix, upstream synchronization, and release workflow.
|
|
287
113
|
|
|
288
114
|
## License
|
|
289
115
|
|