diff --git a/client/app/root.tsx b/client/app/root.tsx
index b0da34a..ed9913b 100644
--- a/client/app/root.tsx
+++ b/client/app/root.tsx
@@ -2,7 +2,7 @@ import "@unocss/reset/tailwind.css";
import "./style.css";
import { cssBundleHref } from "@remix-run/css-bundle";
-import type { LinksFunction, LoaderFunctionArgs } from "@remix-run/node";
+import type { LinksFunction, LoaderFunctionArgs, MetaFunction } from "@remix-run/node";
import {
Links,
LiveReload,
@@ -49,6 +49,7 @@ export default function App() {
content="width=device-width,initial-scale=1,maximum-scale=1"
/>
+
diff --git a/client/app/routes/discussions.tsx b/client/app/routes/discussions.tsx
index 9aa45ee..2e3a1f4 100644
--- a/client/app/routes/discussions.tsx
+++ b/client/app/routes/discussions.tsx
@@ -42,7 +42,13 @@ export const action = async ({ request }: ActionFunctionArgs) => {
};
export const meta: MetaFunction = ({ data }) => {
- return [{ title: `Discussions | ${data?.school.shortName} | compa` }];
+ return [
+ { title: `Discussions | ${data?.school.shortName} | compa` },
+ {
+ name: "description",
+ content: `Find out about all the conversations going on in ${data?.school.shortName}. Share ideas and learn from each other.`,
+ },
+ ];
};
export default function Discussions() {
diff --git a/client/app/routes/discussions_.$id.tsx b/client/app/routes/discussions_.$id.tsx
index c6396a9..af34c72 100644
--- a/client/app/routes/discussions_.$id.tsx
+++ b/client/app/routes/discussions_.$id.tsx
@@ -97,7 +97,13 @@ async function updatePostProps(postId: number) {
}
export const meta: MetaFunction = ({ data }) => {
- return [{ title: `Discussions | ${data?.schoolName} | compa` }];
+ const summary = data?.post.content.substring(0, 72);
+ const description = [`Post from @${data?.post.user.username}: ${summary}…`];
+
+ return [
+ { title: `Discussions | ${data?.schoolName} | compa` },
+ { name: "description", content: description },
+ ];
};
export default function Discussion() {
diff --git a/client/app/routes/timetable_.$year.$programme.$level.$sem.$day.tsx b/client/app/routes/timetable_.$year.$programme.$level.$sem.$day.tsx
index a44886e..d20dc25 100644
--- a/client/app/routes/timetable_.$year.$programme.$level.$sem.$day.tsx
+++ b/client/app/routes/timetable_.$year.$programme.$level.$sem.$day.tsx
@@ -91,7 +91,12 @@ export const action = async ({ request, params }: ActionFunctionArgs) => {
};
export const meta: MetaFunction = ({ data }) => {
- return [{ title: `Timetable | ${data?.school.shortName} | compa` }];
+ const description = `See timetable for ${data?.programme}, L${data?.level} for the year ${data?.year}`;
+
+ return [
+ { title: `Timetable | ${data?.school.shortName} | compa` },
+ { name: "description", content: description },
+ ];
};
export default function TimeTable() {