Skip to content

Commit

Permalink
Override document title/og:title and description for `provisions-geo-…
Browse files Browse the repository at this point in the history
…regulations`
  • Loading branch information
igalst committed Feb 14, 2024
1 parent f672708 commit 12efde6
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions workspaces/website/src/renderer/_default.page.server.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,19 @@ export async function render(pageContext: PageContextServer) {
const documentProps =
pageContext.documentProps ?? pageContext.exports.documentProps

const title = documentProps?.title ?? pageSeo?.seoTitle
? `${documentProps?.title ?? pageSeo?.seoTitle} - Starknet`
: "Starknet";
// @ts-ignore
const isGeoRegulationsPage = pageProps?.data?.slug === 'provisions-geo-regulations';

const description =
documentProps?.description ?? pageSeo?.seoDescription as string ??
"Starknet is the secure scaling technology bringing Ethereum’s benefits to the world.";
const title = isGeoRegulationsPage ? pageSeo?.seoTitle as string : (
documentProps?.title ?? pageSeo?.seoTitle
? `${documentProps?.title ?? pageSeo?.seoTitle} - Starknet`
: "Starknet"
);

const description = isGeoRegulationsPage ? pageSeo?.seoDescription as string : (
documentProps?.description ?? pageSeo?.seoDescription as string ??
"Starknet is the secure scaling technology bringing Ethereum’s benefits to the world."
);

const image =
documentProps?.image ??
Expand Down

0 comments on commit 12efde6

Please sign in to comment.