diff --git a/COLLABORATOR_GUIDE.md b/COLLABORATOR_GUIDE.md index 347f640c57545..ce48c74d05424 100644 --- a/COLLABORATOR_GUIDE.md +++ b/COLLABORATOR_GUIDE.md @@ -8,7 +8,7 @@ - [Adding new pages](#adding-new-pages) - [Create the page content](#create-the-page-content) - [Translating pages](#translating-pages) -- [Creating Components](#creating-components) +- [Creating Components](#creating-react-components) - [Styling a Component](#styling-a-component) - [Best practices when creating a Component](#best-practices-when-creating-a-component) - [How a new Component should look like when freshly created](#how-a-new-component-should-look-like-when-freshly-created) @@ -141,7 +141,7 @@ layout: layout-name.hbs ``` > \[!NOTE]\ -> A list of currently available Layouts is provided within `providers/layoutProvider` on the `getLegacyProviders` map.\ +> A list of currently available Layouts is provided within `components/withLayout` on the `layoutComponents` map.\ > This is a temporary map and this map might change its location and be defined in a different way in the future. ### Translating Pages diff --git a/app/[locale]/[[...path]]/page.tsx b/app/[locale]/[[...path]]/page.tsx index 198ce3f921509..f5d5b1fa9649e 100644 --- a/app/[locale]/[[...path]]/page.tsx +++ b/app/[locale]/[[...path]]/page.tsx @@ -19,8 +19,8 @@ export const viewport = DEFAULT_VIEWPORT; // This generates each page's HTML Metadata // @see https://nextjs.org/docs/app/api-reference/functions/generate-metadata -export const generateMetadata = async (c: DynamicParams) => { - const { path = [], locale = defaultLocale.code } = c.params; +export const generateMetadata = async ({ params }: DynamicParams) => { + const { path = [], locale = defaultLocale.code } = params; const pathname = dynamicRouter.getPathname(path); diff --git a/app/sitemap.ts b/app/sitemap.ts index 6d257fc043c1b..50a67cc9c9ba4 100644 --- a/app/sitemap.ts +++ b/app/sitemap.ts @@ -19,15 +19,14 @@ const sitemap = async (): Promise => { for (const locale of availableLocaleCodes) { const routesForLanguage = await dynamicRouter.getRoutesByLanguage(locale); - - paths.push(...routesForLanguage.map(route => `${locale}/${route}`)); + paths.push( + ...routesForLanguage.map(route => `${baseUrlAndPath}/${locale}/${route}`) + ); } const currentDate = new Date().toISOString(); - const appRoutes = paths.sort().map(route => `${baseUrlAndPath}/${route}`); - - return [...appRoutes, ...EXTERNAL_LINKS_SITEMAP].map(route => ({ + return [...paths, ...EXTERNAL_LINKS_SITEMAP].map(route => ({ url: route, lastModified: currentDate, changeFrequency: 'always', diff --git a/client-context.ts b/client-context.ts index 4be4cf2b95ada..27750981b6d9a 100644 --- a/client-context.ts +++ b/client-context.ts @@ -1,6 +1,6 @@ import { cache } from 'react'; -import type { ClientSharedServerContext } from './types'; +import type { ClientSharedServerContext } from '@/types'; // This allows us to have Server-Side Context's of the shared "contextual" data // which includes the frontmatter, the current pathname from the dynamic segments