@uniweb/build 0.14.14 → 0.14.15

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/build",
3
- "version": "0.14.14",
3
+ "version": "0.14.15",
4
4
  "description": "Build tooling for the Uniweb Component Web Platform",
5
5
  "type": "module",
6
6
  "exports": {
@@ -63,8 +63,8 @@
63
63
  "@uniweb/theming": "0.1.4"
64
64
  },
65
65
  "optionalDependencies": {
66
+ "@uniweb/runtime": "0.8.19",
66
67
  "@uniweb/content-reader": "1.1.12",
67
- "@uniweb/runtime": "0.8.18",
68
68
  "@uniweb/schemas": "0.2.3"
69
69
  },
70
70
  "peerDependencies": {
@@ -74,7 +74,7 @@
74
74
  "@tailwindcss/vite": "^4.0.0",
75
75
  "@vitejs/plugin-react": "^4.0.0 || ^5.0.0",
76
76
  "vite-plugin-svgr": "^4.0.0",
77
- "@uniweb/core": "0.7.13"
77
+ "@uniweb/core": "0.7.14"
78
78
  },
79
79
  "peerDependenciesMeta": {
80
80
  "vite": {
@@ -1269,6 +1269,9 @@ async function processPage(pagePath, pageName, siteRoot, { isIndex = false, pare
1269
1269
  seo: {
1270
1270
  noindex: seo.noindex || false,
1271
1271
  image: seo.image || null,
1272
+ ogTitle: seo.ogTitle || null,
1273
+ ogDescription: seo.ogDescription || null,
1274
+ canonical: seo.canonical || null,
1272
1275
  changefreq: seo.changefreq || null,
1273
1276
  priority: seo.priority || null
1274
1277
  },
@@ -100,6 +100,7 @@ const INFO_TO_SITE_YML = {
100
100
  paths: 'paths',
101
101
  data: 'data',
102
102
  template: 'template',
103
+ seo: 'seo',
103
104
  }
104
105
 
105
106
  /**
@@ -128,7 +129,13 @@ export function siteInfoToConfig({ document, siteRoot, sourceLocale = LOCALIZED_
128
129
  const description = unwrapLocalized(info.description, sourceLocale)
129
130
  if (description !== undefined) siteChanges.description = description
130
131
 
131
- // Verbatim fields.
132
+ // `keywords` is a localized list (mirrors page keywords) → unwrap to the
133
+ // source locale; the target locales are captured into the locales/ collector.
134
+ if (Array.isArray(info.keywords)) info.keywords.forEach((kw) => collector?.add(kw))
135
+ const keywords = unwrapLocalizedList(info.keywords, sourceLocale)
136
+ if (keywords !== undefined) siteChanges.keywords = keywords
137
+
138
+ // Verbatim fields (includes `seo` — the site-level social/SEO block).
132
139
  for (const [infoKey, ymlKey] of Object.entries(INFO_TO_SITE_YML)) {
133
140
  if (info[infoKey] !== undefined) siteChanges[ymlKey] = info[infoKey]
134
141
  }
package/src/uwx/site.js CHANGED
@@ -558,6 +558,13 @@ export async function siteProjectToDocument(siteRoot, opts = {}) {
558
558
  // refs). `assets` is a build-DERIVED upload manifest, not authored config, so it
559
559
  // is never produced from / projected to the site files.
560
560
  setIf(info, 'favicon', siteYml.favicon)
561
+ // Site-level SEO/social metadata — the same shape as page.yml's `seo:` + the
562
+ // top-level `keywords`, hoisted to the site root so the homepage social card
563
+ // and default keywords exist for any share/SSR/crawler. `seo` rides verbatim
564
+ // as authored config (round-trips like favicon); `keywords` is a localized
565
+ // list (like page keywords).
566
+ setIf(info, 'seo', siteYml.seo)
567
+ setIf(info, 'keywords', localizeScalarList(siteYml.keywords, sourceLocale, translations))
561
568
  setIf(info, 'head_html', headHtml)
562
569
  setIf(info, 'fetcher', siteYml.fetcher)
563
570
  setIf(info, 'build', siteYml.build)