uniweb 0.8.7 → 0.8.9

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.
@@ -1,3 +1,6 @@
1
+ # Site Configuration
2
+ # Full reference: uniweb docs site | Schema: schemas/site.schema.json
3
+
1
4
  name: {{projectName}}
2
5
 
3
6
  {{#if foundationRef}}
@@ -6,5 +9,51 @@ foundation: {{foundationRef}}
6
9
  {{/if}}
7
10
  index: home
8
11
 
12
+ # ─── Page Ordering ─────────────────────────────────────────────────────────────
13
+ # Control which pages appear in navigation and in what order.
14
+ # pages: [home, about, ...] # home first, about second, rest auto-discovered
15
+ # pages: [home, ..., contact] # home first, contact last, rest in middle
16
+ # pages: [home, about] # Strict: only these pages in nav (others still built)
17
+ # Or just set the homepage and auto-discover the rest:
18
+ # index: home
19
+
20
+ # ─── Content Paths ─────────────────────────────────────────────────────────────
21
+ # Mount external content directories into your site's page tree.
22
+ # Paths resolve relative to this file.
23
+ #
24
+ # paths:
25
+ # pages/docs: ../../../docs # Mount docs repo at /docs route
26
+ # pages/blog: ../../blog-content # Mount blog content at /blog route
27
+ # layout: ./custom-layout # Custom layout directory
28
+ # collections: ./data # Collections directory
29
+
30
+ # ─── Data Sources ─────────────────────────────────────────────────────────────
31
+ # Define collections (local markdown folders) or fetch remote/local JSON data.
32
+ # Pages and sections reference sources by name via `data: source-name`.
33
+ #
34
+ # collections:
35
+ # articles:
36
+ # path: collections/articles # Folder of .md entity files
37
+ # sort: date desc # Sort by frontmatter field
38
+ #
39
+ # fetch:
40
+ # - url: https://api.example.com/team # Remote JSON
41
+ # schema: team # Access as content.data.team
42
+ # - path: /data/config.json # Local file from public/
43
+
44
+ # ─── Extensions ────────────────────────────────────────────────────────────────
45
+ # Load additional foundations (section types) via URL.
46
+ # extensions:
47
+ # - https://cdn.example.com/effects/foundation.js
48
+
49
+ # ─── Layout ────────────────────────────────────────────────────────────────────
50
+ # Override the foundation's default layout per-site.
51
+ # layout: DocsLayout
52
+ # Or per-page in page.yml: layout: { name: MarketingLayout, hide: [left] }
53
+
54
+ # ─── Base Path ─────────────────────────────────────────────────────────────────
55
+ # For subdirectory deployments (e.g., https://example.com/docs/).
56
+ # base: /docs/
57
+
9
58
  build:
10
59
  prerender: true
@@ -64,12 +64,12 @@ colors:
64
64
  # heading: white
65
65
 
66
66
  # ─── Inline Text Styles ───────────────────────────────────────────────────────
67
- # Named styles for inline text in markdown: [text]{emphasis}
67
+ # Named styles for inline text in markdown: [text]{accent}
68
68
  # Each name maps to CSS properties.
69
- # Defaults: emphasis (colored + bold), muted (subtle).
69
+ # Defaults: accent (colored + bold), muted (subtle).
70
70
 
71
71
  # inline:
72
- # emphasis:
72
+ # accent:
73
73
  # color: 'var(--link)'
74
74
  # font-weight: '600'
75
75
  # muted:
@@ -10,7 +10,7 @@ A website built with [Uniweb](https://github.com/uniweb/cli) — a component web
10
10
  {{projectName}}/
11
11
  ├── foundation/ # React component library
12
12
  │ ├── src/
13
- │ │ ├── components/ # Your components
13
+ │ │ ├── sections/ # Section types (selectable by content authors)
14
14
  │ │ └── styles.css # Tailwind CSS v4 theme
15
15
  │ └── vite.config.js # defineFoundationConfig()
16
16
 
@@ -22,7 +22,7 @@ A website built with [Uniweb](https://github.com/uniweb/cli) — a component web
22
22
  │ ├── site.yml # Site configuration
23
23
  │ └── vite.config.js # defineSiteConfig()
24
24
 
25
- └── AGENTS.md # AI assistant instructions
25
+ └── AGENTS.md # Developer guide (human + AI)
26
26
  ```
27
27
 
28
28
  ## Content Authoring
@@ -46,27 +46,25 @@ Your content here.
46
46
 
47
47
  ## Component Development
48
48
 
49
- Components live in `foundation/src/components/`:
49
+ Section types live in `foundation/src/sections/`. Each is a folder with an `index.jsx` and a `meta.js`:
50
50
 
51
51
  ```jsx
52
- // foundation/src/components/Hero/index.jsx
53
- import { H1, P, cn } from '@uniweb/kit'
52
+ // foundation/src/sections/Hero/index.jsx
53
+ import { H1, P } from '@uniweb/kit'
54
54
 
55
- export function Hero({ content, params }) {
56
- const { title } = content.main?.header || {}
57
- const { theme = 'light' } = params
55
+ export default function Hero({ content }) {
56
+ const { title, paragraphs = [] } = content || {}
58
57
 
59
58
  return (
60
- <section className={cn('py-20', theme === 'dark' && 'bg-gray-900')}>
61
- <H1 text={title} />
62
- </section>
59
+ <div className="max-w-4xl mx-auto px-6">
60
+ <H1 text={title} className="text-heading text-4xl font-bold" />
61
+ <P text={paragraphs} className="text-body mt-4" />
62
+ </div>
63
63
  )
64
64
  }
65
-
66
- export default Hero
67
65
  ```
68
66
 
69
- Exposed components (selectable via `type:` in frontmatter) need a `meta.js` file.
67
+ Components receive parsed content from markdown. Classes like `text-heading` and `text-body` are semantic tokens — the site controls their actual colors through theming, so the same component adapts to any context automatically.
70
68
 
71
69
  {{> components-docs}}
72
70