uniweb 0.2.49 → 0.2.51
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
CHANGED
|
@@ -132,7 +132,7 @@ After creating your project:
|
|
|
132
132
|
|
|
133
133
|
3. **Learn the configuration** — Run `uniweb docs site` or `uniweb docs page` for quick reference on configuration options.
|
|
134
134
|
|
|
135
|
-
4. **Create a component** — Add a folder in `foundation/src/components/`, create `index.jsx` and `meta.js`, then rebuild. See the [
|
|
135
|
+
4. **Create a component** — Add a folder in `foundation/src/components/`, create `index.jsx` and `meta.js`, then rebuild. See the [Component Metadata Guide](https://github.com/uniweb/cli/blob/main/docs/component-metadata.md) for the full schema.
|
|
136
136
|
|
|
137
137
|
The `meta.js` file defines what content and parameters a component accepts. The runtime uses this metadata to apply defaults and guarantee content structure—no defensive null checks needed in your component code.
|
|
138
138
|
|
|
@@ -165,9 +165,14 @@ export function Hero({ content, params }) {
|
|
|
165
165
|
}
|
|
166
166
|
```
|
|
167
167
|
|
|
168
|
-
The parser extracts semantic elements from markdown—`title` from the first heading, `paragraphs` from body text, `links` from `[text](url)`, and so on. The `items` array contains child groups created when headings appear after content (useful for features, pricing tiers, team members, etc.).
|
|
168
|
+
The parser extracts semantic elements from markdown—`title` from the first heading, `paragraphs` from body text, `links` from `[text](url)`, and so on. The `items` array contains child groups created when headings appear after content (useful for features, pricing tiers, team members, etc.).
|
|
169
169
|
|
|
170
|
-
|
|
170
|
+
**Learn more:**
|
|
171
|
+
|
|
172
|
+
- [Content Structure](./docs/content-structure.md) — How content is parsed and structured
|
|
173
|
+
- [Component Metadata](./docs/component-metadata.md) — Full meta.js schema reference
|
|
174
|
+
- [Data Fetching](./docs/data-fetching.md) — Load external data from files or APIs
|
|
175
|
+
- [Dynamic Routes](./docs/dynamic-routes.md) — Generate pages from data (blogs, catalogs)
|
|
171
176
|
|
|
172
177
|
## Foundations Are Portable
|
|
173
178
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "uniweb",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.51",
|
|
4
4
|
"description": "Create structured Vite + React sites with content/code separation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
"js-yaml": "^4.1.0",
|
|
38
38
|
"prompts": "^2.4.2",
|
|
39
39
|
"tar": "^7.0.0",
|
|
40
|
-
"@uniweb/
|
|
41
|
-
"@uniweb/
|
|
42
|
-
"@uniweb/
|
|
43
|
-
"@uniweb/
|
|
40
|
+
"@uniweb/build": "0.1.29",
|
|
41
|
+
"@uniweb/runtime": "0.2.17",
|
|
42
|
+
"@uniweb/core": "0.1.13",
|
|
43
|
+
"@uniweb/kit": "0.1.8"
|
|
44
44
|
}
|
|
45
45
|
}
|
package/src/commands/docs.js
CHANGED
|
@@ -97,7 +97,7 @@ ${colors.bright}Example:${colors.reset}
|
|
|
97
97
|
build:
|
|
98
98
|
prerender: true${colors.reset}
|
|
99
99
|
|
|
100
|
-
${colors.dim}Schema: https://raw.githubusercontent.com/uniweb/cli/main/
|
|
100
|
+
${colors.dim}Schema: https://raw.githubusercontent.com/uniweb/cli/main/schemas/site.schema.json${colors.reset}
|
|
101
101
|
`
|
|
102
102
|
|
|
103
103
|
const PAGE_REFERENCE = `
|
|
@@ -151,7 +151,7 @@ ${colors.bright}Example:${colors.reset}
|
|
|
151
151
|
seo:
|
|
152
152
|
image: /about-og.png${colors.reset}
|
|
153
153
|
|
|
154
|
-
${colors.dim}Schema: https://raw.githubusercontent.com/uniweb/cli/main/
|
|
154
|
+
${colors.dim}Schema: https://raw.githubusercontent.com/uniweb/cli/main/schemas/page.schema.json${colors.reset}
|
|
155
155
|
`
|
|
156
156
|
|
|
157
157
|
const META_REFERENCE = `
|
|
@@ -223,7 +223,7 @@ ${colors.bright}Runtime Benefits:${colors.reset}
|
|
|
223
223
|
- Param defaults are applied automatically
|
|
224
224
|
- Components receive clean { content, params } props
|
|
225
225
|
|
|
226
|
-
${colors.dim}Full guide: https://github.com/uniweb/cli/blob/main/docs/
|
|
226
|
+
${colors.dim}Full guide: https://github.com/uniweb/cli/blob/main/docs/component-metadata.md${colors.reset}
|
|
227
227
|
`
|
|
228
228
|
|
|
229
229
|
// =============================================================================
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"yaml.schemas": {
|
|
3
|
-
"https://raw.githubusercontent.com/uniweb/cli/main/
|
|
4
|
-
"https://raw.githubusercontent.com/uniweb/cli/main/
|
|
3
|
+
"https://raw.githubusercontent.com/uniweb/cli/main/schemas/site.schema.json": "**/site.yml",
|
|
4
|
+
"https://raw.githubusercontent.com/uniweb/cli/main/schemas/page.schema.json": "**/page.yml"
|
|
5
5
|
}
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"yaml.schemas": {
|
|
3
|
-
"https://raw.githubusercontent.com/uniweb/cli/main/
|
|
4
|
-
"https://raw.githubusercontent.com/uniweb/cli/main/
|
|
3
|
+
"https://raw.githubusercontent.com/uniweb/cli/main/schemas/site.schema.json": "site/site.yml",
|
|
4
|
+
"https://raw.githubusercontent.com/uniweb/cli/main/schemas/page.schema.json": "**/page.yml"
|
|
5
5
|
}
|
|
6
6
|
}
|