}
search={
diff --git a/workspaces/website/src/pages/posts/@category/index.page.server.ts b/workspaces/website/src/pages/posts/@category/index.page.server.ts
index c50ed2155c..45250037d7 100644
--- a/workspaces/website/src/pages/posts/@category/index.page.server.ts
+++ b/workspaces/website/src/pages/posts/@category/index.page.server.ts
@@ -1,15 +1,26 @@
+/**
+ * Module dependencies.
+ */
+
import { getCategories } from "@starknet-io/cms-data/src/categories";
import { getTopics } from "@starknet-io/cms-data/src/topics";
import { PageContextServer } from "src/renderer/types";
import { Props } from "src/pages/posts/PostsPage";
import { getDefaultPageContext } from "src/renderer/helpers";
+/**
+ * Export `onBeforeRender` function.
+ */
+
export async function onBeforeRender(pageContext: PageContextServer) {
const defaultPageContext = await getDefaultPageContext(pageContext);
const { locale } = defaultPageContext;
+ const { category: categorySlug } = pageContext.routeParams!;
+ const categories = await getCategories(locale, pageContext.context);
+ const category = categories.find((category) => category.slug === categorySlug);
const pageProps: Props = {
- categories: await getCategories(locale, pageContext.context),
+ categories,
topics: await getTopics(locale, pageContext.context),
env: {
ALGOLIA_INDEX: import.meta.env.VITE_ALGOLIA_INDEX!,
@@ -27,7 +38,7 @@ export async function onBeforeRender(pageContext: PageContextServer) {
...defaultPageContext,
pageProps,
documentProps: {
- title: "Starknet Blog",
+ title: `Starknet Blog - ${category?.name}`,
description: "Get the latest insights from across the Starknet ecosystem, learn what community members are building or take a deep dive into the math that powers Starknet.",
image: `${import.meta.env.VITE_SITE_URL}/assets/share/blog_landing.png`,
},
diff --git a/workspaces/website/src/pages/roadmap/@slug/index.page.server.tsx b/workspaces/website/src/pages/roadmap/@slug/index.page.server.tsx
index 3101cc7d6d..a2e7efb1d2 100644
--- a/workspaces/website/src/pages/roadmap/@slug/index.page.server.tsx
+++ b/workspaces/website/src/pages/roadmap/@slug/index.page.server.tsx
@@ -1,4 +1,8 @@
-import { PageContextServer } from "src/renderer/types";
+/**
+ * Module dependencies.
+ */
+
+import { DocumentProps, PageContextServer } from "src/renderer/types";
import { getDefaultPageContext } from "src/renderer/helpers";
import {
getRoadmapPostBySlug,
@@ -7,6 +11,10 @@ import {
import { RoadmapPostProps } from "./(components)/RoadmapPost";
import { getRoadmapSettings } from "@starknet-io/cms-data/src/settings/roadmap";
+/**
+ * Export `onBeforeRender` function.
+ */
+
export async function onBeforeRender(pageContext: PageContextServer) {
const defaultPageContext = await getDefaultPageContext(pageContext);
const { locale } = defaultPageContext;
@@ -30,6 +38,9 @@ export async function onBeforeRender(pageContext: PageContextServer) {
pageContext: {
...defaultPageContext,
pageProps,
+ documentProps: {
+ title: `Starknet Roadmap - ${roadmapPost.title}`,
+ } satisfies DocumentProps,
},
};
}
diff --git a/workspaces/website/src/pages/roadmap/index.page.tsx b/workspaces/website/src/pages/roadmap/index.page.tsx
index e199b447bb..790cba80ee 100644
--- a/workspaces/website/src/pages/roadmap/index.page.tsx
+++ b/workspaces/website/src/pages/roadmap/index.page.tsx
@@ -1 +1,20 @@
-export { default as Page } from "src/pages/roadmap/(components)/RoadmapPage";
\ No newline at end of file
+/**
+ * Module dependencies
+ */
+
+import { DocumentProps } from "src/renderer/types";
+
+/**
+ * Export `Page` component
+ */
+
+export { default as Page } from "src/pages/roadmap/(components)/RoadmapPage";
+
+/**
+ * Export `documentProps`.
+ */
+
+export const documentProps = {
+ title: "Starknet Roadmap",
+ description: "Explore the Starknet Roadmap for a comprehensive journey through our development milestones. Follow our progress as we continue to enhance performance, security, and usability, driving Starknet towards a new era of decentralized computing. Stay informed and join us on this exciting roadmap as we redefine the possibilities of blockchain technology."
+} satisfies DocumentProps;