uniweb 0.2.38 → 0.2.39

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uniweb",
3
- "version": "0.2.38",
3
+ "version": "0.2.39",
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/build": "0.1.19",
41
- "@uniweb/runtime": "0.2.11",
40
+ "@uniweb/build": "0.1.20",
42
41
  "@uniweb/kit": "0.1.5",
42
+ "@uniweb/runtime": "0.2.11",
43
43
  "@uniweb/core": "0.1.8"
44
44
  }
45
45
  }
@@ -9,9 +9,11 @@
9
9
 
10
10
  ### Section Ordering
11
11
 
12
- By default, sections are discovered from `.md` files and sorted by numeric prefix (`1-`, `2-`, `2.5-`).
12
+ By default, sections are discovered from `.md` files and sorted by numeric prefix (`1-`, `2-`, `3-`).
13
13
 
14
- For more control, use the `sections` property in `page.yml`:
14
+ **Decimal prefixes** allow inserting sections without renumbering: `2.5-` sorts between `2-` and `3-`.
15
+
16
+ For explicit control, use the `sections` property in `page.yml`:
15
17
 
16
18
  ```yaml
17
19
  title: My Page
@@ -21,9 +23,26 @@ sections:
21
23
  - pricing
22
24
  ```
23
25
 
24
- This approach makes reordering easy (just move lines) and allows temporarily removing sections by commenting them out.
26
+ This makes reordering easy (move lines) and allows commenting out sections temporarily.
25
27
 
26
28
  **Options:**
27
- - `sections: *` or omit — auto-discover and sort `.md` files (default)
28
- - `sections: [hero, features]` — explicit ordering, no numeric prefixes needed
29
- - `sections: []` or no `.md` files — pure route with no content sections
29
+ - `sections: *` or omit — auto-discover and sort `.md` files by prefix (default)
30
+ - `sections: [hero, features]` — explicit ordering, no prefixes needed
31
+ - `sections: []` — pure route with no content sections
32
+
33
+ ### Section Hierarchy (Subsections)
34
+
35
+ For parent-child relationships, use the explicit array with nesting:
36
+
37
+ ```yaml
38
+ sections:
39
+ - hero
40
+ - features:
41
+ - logocloud
42
+ - stats
43
+ - pricing
44
+ ```
45
+
46
+ This is clearer than prefix notation and easier to restructure.
47
+
48
+ **Advanced:** Comma prefixes (`1,1-`, `1,2-`) also denote hierarchy, but explicit arrays are recommended for readability.
@@ -122,11 +122,22 @@ sections:
122
122
  ```
123
123
 
124
124
  **Section ordering:**
125
- - Default: `.md` files discovered and sorted by numeric prefix (`1-`, `2-`, `2.5-`)
125
+ - Default: `.md` files discovered and sorted by numeric prefix (`1-`, `2-`, `3-`)
126
+ - Decimals to insert: `2.5-` sorts between `2-` and `3-` (no renumbering needed)
126
127
  - Explicit: Use `sections: [hero, features]` — no prefixes needed, easy reordering
127
- - Empty: `sections: []` or no `.md` files — pure route with no content
128
+ - Empty: `sections: []` — pure route with no content
128
129
  - Wildcard: `sections: *` — explicitly use default behavior
129
130
 
131
+ **Section hierarchy:** For subsections, use explicit nesting in `page.yml`:
132
+ ```yaml
133
+ sections:
134
+ - hero
135
+ - features:
136
+ - logocloud
137
+ - stats
138
+ ```
139
+ This is clearer than prefix notation (`1,1-`, `1,2-`) and easier to restructure.
140
+
130
141
  ## Component Development
131
142
 
132
143
  ### Props Interface