@quintype/framework 7.10.5 → 7.11.0-notfound-metadata.0

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": "@quintype/framework",
3
- "version": "7.10.5",
3
+ "version": "7.11.0-notfound-metadata.0",
4
4
  "description": "Libraries to help build Quintype Node.js apps",
5
5
  "main": "index.js",
6
6
  "engines": {
@@ -346,7 +346,7 @@ exports.notFoundHandler = function notFoundHandler(
346
346
  req,
347
347
  res,
348
348
  next,
349
- { config, client, loadErrorData, renderLayout, pickComponent, logError, domainSlug }
349
+ { config, client, loadErrorData, seo, renderLayout, pickComponent, logError, domainSlug }
350
350
  ) {
351
351
  const url = urlLib.parse(req.url, true);
352
352
 
@@ -365,11 +365,14 @@ exports.notFoundHandler = function notFoundHandler(
365
365
  })
366
366
  .then((result) => {
367
367
  const statusCode = result.httpStatusCode || 404;
368
-
369
368
  const store = createStoreFromResult(url, result, {
370
369
  disableIsomorphicComponent: false,
371
370
  defaultPageType: "not-found",
372
371
  });
372
+ console.log("seo-----------", seo);
373
+ const seoInstance = getSeoInstance(seo, config, result.pageType);
374
+ console.log("seoInstance---------");
375
+ const seoTags = seoInstance && seoInstance.getMetaTags(config, result.pageType || "not-found", result, { url });
373
376
 
374
377
  res.status(statusCode);
375
378
  res.setHeader("Cache-Control", "public,max-age=15,s-maxage=60, stale-while-revalidate=150,stale-if-error=3600");
@@ -378,7 +381,8 @@ exports.notFoundHandler = function notFoundHandler(
378
381
  return pickComponent.preloadComponent(store.getState().qt.pageType, store.getState().qt.subPageType).then(() =>
379
382
  renderLayout(res, {
380
383
  config,
381
- title: result.title,
384
+ seoTags,
385
+ title: seoInstance ? seoInstance.getTitle(config, result.pageType, result) : result.title,
382
386
  content: renderReduxComponent(IsomorphicComponent, store, {
383
387
  pickComponent,
384
388
  }),
package/server/routes.js CHANGED
@@ -536,6 +536,7 @@ exports.isomorphicRoutes = function isomorphicRoutes(
536
536
  pickComponent,
537
537
  loadErrorData,
538
538
  logError,
539
+ seo,
539
540
  assetHelper,
540
541
  })
541
542
  );