@monkeyplus/flow 6.0.58 → 6.0.60
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 +1 -1
- package/server/lib/pages.mjs +2 -2
- package/server/lib/render.mjs +1 -1
package/package.json
CHANGED
package/server/lib/pages.mjs
CHANGED
|
@@ -383,8 +383,8 @@ export async function resolveBreadcrumbs(pageName, pathname, localeCode, params,
|
|
|
383
383
|
if (!localePage || !localePage.breadcrumb) return [];
|
|
384
384
|
const locale = createLocale(localeCode);
|
|
385
385
|
const ctx = createContext(definition, locale, localePage, pathname, params, dynamic, request);
|
|
386
|
-
const pageContext = await
|
|
387
|
-
const pageHead = await
|
|
386
|
+
const pageContext = localePage.context ? await localePage.context(ctx) : {};
|
|
387
|
+
const pageHead = localePage.head ? await localePage.head(ctx) : localePage.seo ? await localePage.seo(ctx) : {};
|
|
388
388
|
const breadcrumbCtx = {
|
|
389
389
|
...ctx,
|
|
390
390
|
context: pageContext,
|
package/server/lib/render.mjs
CHANGED
|
@@ -220,7 +220,7 @@ export async function renderDocument(page, clientAssets) {
|
|
|
220
220
|
}
|
|
221
221
|
};
|
|
222
222
|
replaceLang(data);
|
|
223
|
-
return match.replace(content, JSON.stringify(data));
|
|
223
|
+
return match.replace(content, JSON.stringify(data, null, 2));
|
|
224
224
|
} catch (e) {
|
|
225
225
|
return match;
|
|
226
226
|
}
|