Skip to content

Commit

Permalink
add description for seo
Browse files Browse the repository at this point in the history
  • Loading branch information
zizdlp committed Oct 1, 2024
1 parent 2148663 commit adee173
Show file tree
Hide file tree
Showing 20 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions zbook_frontend/messages/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@
"DayAfter": "{duration, plural, =0 {gerade eben} =1 {in # Tag} other {in # Tagen} }"
},
"GenerateMetaData": {
"HomePageDescription": "Dies ist die Startseite von ZBook, die die Hauptfunktionen zeigt und wichtige Einstiegspunkte bietet.",
"User": "Benutzer",
"Session": "Sitzung",
"Repo": "Repository",
Expand Down
1 change: 1 addition & 0 deletions zbook_frontend/messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@
"DayAfter": "{duration, plural, =0 {just now} =1 {in # day} other {in # days} }"
},
"GenerateMetaData": {
"HomePageDescription": "This is the homepage of ZBook, showcasing its main features and providing key entry points.",
"User": "User",
"Session": "Session",
"Repo": "Repo",
Expand Down
1 change: 1 addition & 0 deletions zbook_frontend/messages/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@
"DayAfter": "{duration} 天后"
},
"GenerateMetaData": {
"HomePageDescription": "这是 ZBook 的首页,用于展示 ZBook 的主要功能,以及一些关键入口。",
"User": "用户",
"Session": "会话",
"Repo": "仓库",
Expand Down
1 change: 1 addition & 0 deletions zbook_frontend/src/app/[locale]/auth/forget/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export async function generateMetadata(): Promise<Metadata> {
const t = await getTranslations("GenerateMetaData");
return {
title: t("ForgetPassword"),
description: t("ForgetPassword"),
};
}
export default async function forget() {
Expand Down
1 change: 1 addition & 0 deletions zbook_frontend/src/app/[locale]/auth/login/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export async function generateMetadata(): Promise<Metadata> {
const t = await getTranslations("GenerateMetaData");
return {
title: t("Login"),
description: t("Login"),
};
}
export default async function Login() {
Expand Down
1 change: 1 addition & 0 deletions zbook_frontend/src/app/[locale]/auth/register/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export async function generateMetadata(): Promise<Metadata> {
const t = await getTranslations("GenerateMetaData");
return {
title: t("Register"),
description: t("Register"),
};
}
export default async function Register({
Expand Down
1 change: 1 addition & 0 deletions zbook_frontend/src/app/[locale]/cases/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export async function generateMetadata(): Promise<Metadata> {
const t = await getTranslations("GenerateMetaData");
return {
title: t("Cases"),
description: t("Cases"),
};
}

Expand Down
1 change: 1 addition & 0 deletions zbook_frontend/src/app/[locale]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export async function generateMetadata({
template: "%s - ZBook",
default: "ZBook | " + t("Slogan"), // a default is required when creating a template
},
description: t("HomePageDescription"),
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ export async function generateMetadata({
const t = await getTranslations("GenerateMetaData");
return {
title: params.username + " - " + t("DashBoard") + " - " + t("Comments"),
description:
params.username + " - " + t("DashBoard") + " - " + t("Comments"),
};
}
export default async function AdminCommentsPage({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ export async function generateMetadata({
const t = await getTranslations("GenerateMetaData");
return {
title: params.username + " - " + t("DashBoard") + " - " + t("OverView"),
description:
params.username + " - " + t("DashBoard") + " - " + t("OverView"),
};
}
export default async function AdminOverviewPage({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export async function generateMetadata({
const t = await getTranslations("GenerateMetaData");
return {
title: params.username + " - " + t("Favorite"),
description: params.username + " - " + t("Favorite"),
};
}
export default async function LikeRepoPage({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export async function generateMetadata({
const t = await getTranslations("GenerateMetaData");
return {
title: params.username + " - " + t("Follower"),
description: params.username + " - " + t("Follower"),
};
}
export default async function RepoPage({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export async function generateMetadata({
const t = await getTranslations("GenerateMetaData");
return {
title: params.username + " - " + t("Following"),
description: params.username + " - " + t("Following"),
};
}
export default async function RepoPage({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export async function generateMetadata({
const t = await getTranslations("GenerateMetaData");
return {
title: params.username + " - " + t("Repo"),
description: params.username + " - " + t("Repo"),
};
}
export default async function OwnRepoPage({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export async function generateMetadata({
const t = await getTranslations("GenerateMetaData");
return {
title: params.username + " - " + t("DashBoard") + " - " + t("Report"),
description: params.username + " - " + t("DashBoard") + " - " + t("Report"),
};
}
export default async function RepoPage({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export async function generateMetadata({
const t = await getTranslations("GenerateMetaData");
return {
title: params.username + " - " + t("DashBoard") + " - " + t("Repo"),
description: params.username + " - " + t("DashBoard") + " - " + t("Repo"),
};
}
export default async function RepoPage({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ export async function generateMetadata({
const t = await getTranslations("GenerateMetaData");
return {
title: params.username + " - " + t("DashBoard") + " - " + t("Session"),
description:
params.username + " - " + t("DashBoard") + " - " + t("Session"),
};
}
export default async function RepoPage({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export async function generateMetadata({
const t = await getTranslations("GenerateMetaData");
return {
title: params.username + " - " + t("DashBoard") + " - " + t("User"),
description: params.username + " - " + t("DashBoard") + " - " + t("User"),
};
}
export default async function RepoPage({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export async function generateMetadata({
const [firstPart, lastPart] = [parts[0] ?? "", parts[parts.length - 1]];
return {
title: parts.length > 1 ? `${firstPart}: ${lastPart}` : lastPart,
description: parts.length > 1 ? `${firstPart}: ${lastPart}` : lastPart,
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ export async function generateMetadata({
const t = await getTranslations("GenerateMetaData");
return {
title: params.username + " - repo - " + params.reponame + t("WhoCanSee"),
description:
params.username + " - repo - " + params.reponame + t("WhoCanSee"),
};
}
export default async function ListRepoVisi({
Expand Down

0 comments on commit adee173

Please sign in to comment.