Skip to content

Commit

Permalink
v3 - include non-dynamic pages in SEO fetching (#697)
Browse files Browse the repository at this point in the history
* feat(customerCasesPage): seo fields

* feat(seo): include non-pageBuilder documents in seo fetching
  • Loading branch information
mathiazom authored Sep 23, 2024
1 parent 166d745 commit 5aed243
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion studio/lib/queries/page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export const SLUG_QUERY = groq`
`;

export const SEO_SLUG_QUERY = groq`
*[_type == "pageBuilder" && slug.current == $slug][0]{
*[defined(seo) && slug.current == $slug][0]{
"title": seo.seoTitle,
"description": seo.seoDescription,
"imageUrl": seo.seoImage.asset->url
Expand Down
2 changes: 2 additions & 0 deletions studio/schemas/documents/specialPages/customerCasesPage.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { defineType } from "sanity";

import { title } from "studio/schemas/fields/text";
import seo from "studio/schemas/objects/seo";
import { titleSlug } from "studio/schemas/schemaTypes/slug";

export const customerCasesPageID = "customerCasesPage";
Expand All @@ -17,6 +18,7 @@ const customerCasesPage = defineType({
"Enter the primary title that will be displayed at the top of the customer cases page. This is what users will see when they visit the page.",
},
titleSlug,
seo,
],
preview: {
select: {
Expand Down

0 comments on commit 5aed243

Please sign in to comment.