uniweb 1.24.9 → 1.24.11
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": "1.24.
|
|
3
|
+
"version": "1.24.11",
|
|
4
4
|
"description": "Create structured Vite + React sites with content/code separation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -41,15 +41,15 @@
|
|
|
41
41
|
"js-yaml": "^4.3.2",
|
|
42
42
|
"prompts": "^2.4.2",
|
|
43
43
|
"tar": "^7.5.21",
|
|
44
|
-
"@uniweb/content-writer": "~1.3.1",
|
|
45
|
-
"@uniweb/schemas": "~1.6.7",
|
|
46
44
|
"@uniweb/core": "~1.5.1",
|
|
45
|
+
"@uniweb/schemas": "~1.6.7",
|
|
46
|
+
"@uniweb/content-writer": "~1.3.1",
|
|
47
47
|
"@uniweb/semantic-parser": "~1.13.0"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"@uniweb/build": "~1.13.5",
|
|
51
|
-
"@uniweb/
|
|
52
|
-
"@uniweb/
|
|
51
|
+
"@uniweb/semantic-parser": "~1.13.0",
|
|
52
|
+
"@uniweb/content-reader": "~1.5.7"
|
|
53
53
|
},
|
|
54
54
|
"peerDependenciesMeta": {
|
|
55
55
|
"@uniweb/build": {
|
package/partials/agents.md
CHANGED
|
@@ -547,6 +547,8 @@ Optional attributes: `{size=20}`, `{color=red}`. Custom SVGs: `{href=/products} <!-- Clickable media: href + target ride along -->
|
|
548
548
|
```
|
|
549
549
|
|
|
550
|
+
A link to a section names its page and its id: `page:about#team` goes to `/about#section-team`, and `page:/#features` to a section of the homepage. The id comes from the file's name without its number (`2-features.md` is `features`), or from `id:` in its frontmatter.
|
|
551
|
+
|
|
550
552
|
Sizing and loading ride on the image: `{width=800 height=600 loading=lazy fit=cover position=center}`, and its credit as `{author="Jane Doe"}`. A video adds `{poster=./thumb.jpg autoplay muted loop controls}`; a `{role=pdf}` document adds `{preview=./cover.jpg author=… description=…}` and arrives in `content.documents` — `{ url, name, mime, size?, alt, caption, … }` — declare it in `content:` as `documents`. Name a video's poster: a static build makes one from the video only when none is named and ffmpeg is installed, and `uniweb publish` sends only the poster you name.
|
|
551
553
|
|
|
552
554
|
**Where media lives.** `./x` names a file beside the page, `/x` a file in `public/`, and both reach a static build and a site published with Uniweb. Keep a page's media beside it, and keep in `public/` what needs a fixed address: the favicon, fonts, a file other sites link to. A static build copies `public/` whole and adds its own copy of each file a page names there, so a video only a page shows is in `dist/` twice from `public/` and once from beside the page. `uniweb push` uploads a file beside a page wherever the page is, in a folder `paths:` mounts too; a file outside the site and the folders it mounts is not uploaded, so put that in `public/`. A site has no `assets/` folder for media: a build stops on a `/x` only `assets/` holds.
|
|
@@ -783,7 +785,7 @@ What can actually *read* it depends on where you deploy, because reading it need
|
|
|
783
785
|
|
|
784
786
|
The artifacts **your build emits** to describe the public site never name them — `llms.txt`, the per-page `.md` projections, and the search index all describe pages a visitor reads, and a knowledge page's prose was written for the assistant instead. Two settings **outrank** `knowledge:`, so a contradiction resolves toward the narrower reach: `agents.exclude` in `site.yml`, and any `_`-prefixed route segment. *(A host that derives these artifacts itself, rather than serving the ones your build produced, applies its own rules — ask your host what it does with `knowledge:` before relying on it there.)*
|
|
785
787
|
|
|
786
|
-
Don't confuse it with the visibility flags: `hidden: true` is a **draft** (not published at all), `hideIn` only controls **nav placement** (still reachable by URL), and `knowledge: true` is a **different audience** (never rendered for anyone). ⛔ `hidden: true` on `pages/404/` means a **draft 404** — it is not published and the site falls back to the generic `404.html`; an authored 404 needs no flag, since it is never listed in navigation anyway. A **section** takes `hidden: true` in its frontmatter with the same meaning: previewed in `uniweb dev`, left out of a published build with its child sections, and never passed to the component as a param. (`_name.md` is the other way to keep a section out: no build reads it, dev included.)
|
|
788
|
+
Don't confuse it with the visibility flags: `hidden: true` is a **draft** (not published at all), `hideIn` only controls **nav placement** (still reachable by URL: `hideIn: ['*']` leaves it out of every menu, `hideIn: [header]` out of one), and `knowledge: true` is a **different audience** (never rendered for anyone). ⛔ `hidden: true` on `pages/404/` means a **draft 404** — it is not published and the site falls back to the generic `404.html`; an authored 404 needs no flag, since it is never listed in navigation anyway. A **section** takes `hidden: true` in its frontmatter with the same meaning: previewed in `uniweb dev`, left out of a published build with its child sections, and never passed to the component as a param. (`_name.md` is the other way to keep a section out: no build reads it, dev included.)
|
|
787
789
|
|
|
788
790
|
**A site can be nothing but knowledge — that is a real and useful shape.** A site is a set of routes; it does not have to have HTML pages. Mark the root `knowledge: true` and every page inherits it, so the site renders nothing at all and exists to *be* an agent: a `/_agent/chat` URL that a web app, a mobile app, or someone else's backend sends requests to.
|
|
789
791
|
|
|
@@ -1619,7 +1621,7 @@ Semantic tokens come from `theme-tokens.css` (populated from `theme.yml`). Use `
|
|
|
1619
1621
|
|
|
1620
1622
|
These compose with tokens — they adapt per context because they reference token variables — while adding nuance the token set doesn't provide. Use palette shades directly (`var(--primary-300)`, `bg-neutral-200`) for fine-grained control. **The priority: design quality > portability > configurability.** A beautiful foundation for one site is worth more than a generic one that looks flat.
|
|
1621
1623
|
|
|
1622
|
-
|
|
1624
|
+
Four things a ported design will try to bring with it, each of which breaks something:
|
|
1623
1625
|
|
|
1624
1626
|
> **Don't set `scroll-behavior: smooth` globally.** The runtime owns scrolling: it already smooth-scrolls anchor targets itself (`scrollIntoView({ behavior: 'smooth' })`), so the CSS adds nothing there — but it resets and restores scroll on route changes with the two-argument `scrollTo(x, y)`, which *inherits* the property. Route changes then animate their scroll-to-top, and back-button restoration (which scrolls, checks the position on the next frame, and retries) keeps interrupting its own animation. Scope it to a specific scrollable element if you need it; never to `html` or `body`.
|
|
1625
1627
|
|
|
@@ -1627,6 +1629,8 @@ Three lines a ported design will try to bring with it, each of which breaks some
|
|
|
1627
1629
|
|
|
1628
1630
|
> **Font smoothing is a per-scheme decision, not a reset.** `-webkit-font-smoothing: antialiased` (macOS only) forces grayscale rasterization, which thins strokes. On dark surfaces that usefully counteracts the bloom of light text on near-black; on light surfaces it costs contrast and makes body text spindly. Scope it — `.scheme-dark { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }` — rather than putting it on `html`.
|
|
1629
1631
|
|
|
1632
|
+
> **Write an entrance animation in CSS, not in JavaScript.** A CSS animation on a prerendered page starts at first paint and carries on when the browser renders over that page, so a hero fades in once. One a component starts when it mounts (a motion library, a `useEffect`) can only start when the page boots. Until then the visitor sees its first frame, which for a fade is nothing, or the finished section, which then animates in. `uniweb dev` does not prerender, so only a built site shows this.
|
|
1633
|
+
|
|
1630
1634
|
### Composition: items, child sections, insets
|
|
1631
1635
|
|
|
1632
1636
|
Pages are sequences of sections — the obvious layer. The framework also supports real nesting, without leaving markdown.
|
package/partials/start.md
CHANGED
|
@@ -209,5 +209,7 @@ since your last push or pull, and what to run.
|
|
|
209
209
|
|
|
210
210
|
## More
|
|
211
211
|
|
|
212
|
+
- Hosting it somewhere else, with no Uniweb account: `npx uniweb export`, or
|
|
213
|
+
`npx uniweb deploy --help`
|
|
212
214
|
- Documentation index: https://uniweb.io/llms.txt
|
|
213
215
|
- Every command's options: `npx uniweb <command> --help`
|
package/src/commands/template.js
CHANGED
|
@@ -81,6 +81,9 @@ function listTemplates(args) {
|
|
|
81
81
|
console.log(
|
|
82
82
|
` ${colors.dim}uniweb create <project> --template <name>${colors.reset}`
|
|
83
83
|
)
|
|
84
|
+
console.log(
|
|
85
|
+
` ${colors.dim}Also built in: starter, one generic section type and two short pages; none, the same project without them.${colors.reset}`
|
|
86
|
+
)
|
|
84
87
|
console.log(
|
|
85
88
|
` ${colors.dim}--json for scripts. This is the roster THIS CLI ships with, not a live fetch.${colors.reset}`
|
|
86
89
|
)
|
package/src/framework-index.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"generatedAt": "2026-10-
|
|
3
|
+
"generatedAt": "2026-10-31T16:46:41.922Z",
|
|
4
4
|
"packages": {
|
|
5
5
|
"@uniweb/api": {
|
|
6
6
|
"version": "1.6.7"
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"version": "1.2.8"
|
|
37
37
|
},
|
|
38
38
|
"@uniweb/runtime": {
|
|
39
|
-
"version": "1.3.
|
|
39
|
+
"version": "1.3.4"
|
|
40
40
|
},
|
|
41
41
|
"@uniweb/scene": {
|
|
42
42
|
"version": "1.0.1"
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"version": "1.1.2"
|
|
55
55
|
},
|
|
56
56
|
"@uniweb/templates": {
|
|
57
|
-
"version": "1.1.
|
|
57
|
+
"version": "1.1.11"
|
|
58
58
|
},
|
|
59
59
|
"@uniweb/theming": {
|
|
60
60
|
"version": "1.2.1"
|
|
@@ -31,9 +31,10 @@ export default function Section({ content, params }) {
|
|
|
31
31
|
<div className={cn('py-16 px-6', alignments[align])}>
|
|
32
32
|
<div className={cn('mx-auto', widths[width])}>
|
|
33
33
|
{pretitle && (
|
|
34
|
-
<
|
|
35
|
-
{pretitle}
|
|
36
|
-
|
|
34
|
+
<P
|
|
35
|
+
text={pretitle}
|
|
36
|
+
className="text-sm font-medium text-link mb-4 uppercase tracking-wide"
|
|
37
|
+
/>
|
|
37
38
|
)}
|
|
38
39
|
|
|
39
40
|
{title && (
|