refactor: update site metadata and translations
- Renamed "Site" to "Metadata" in translation files for clarity. - Updated the title, tagline, and description in both English and Chinese translations to reflect the new branding. - Adjusted references in various components to use the updated metadata structure. - Removed the obsolete site.webmanifest file and updated the manifest path in the metadata construction.
This commit is contained in:
parent
7cf3a5afe8
commit
a6e2ee698a
@ -1,7 +1,9 @@
|
|||||||
{
|
{
|
||||||
"Site": {
|
"Metadata": {
|
||||||
"name": "MkSaaS",
|
"name": "MkSaaS",
|
||||||
"tagline": "Make AI SaaS in hours, simply and effortlessly"
|
"title": "MkSaaS - The Best AI SaaS Boilerplate",
|
||||||
|
"tagline": "Make AI SaaS in days, simply and effortlessly",
|
||||||
|
"description": "MkSaaS is the best AI SaaS boilerplate. Make AI SaaS in days, simply and effortlessly"
|
||||||
},
|
},
|
||||||
"Common": {
|
"Common": {
|
||||||
"login": "Log in",
|
"login": "Log in",
|
||||||
@ -18,10 +20,6 @@
|
|||||||
"cancel": "Cancel",
|
"cancel": "Cancel",
|
||||||
"logoutFailed": "Failed to log out"
|
"logoutFailed": "Failed to log out"
|
||||||
},
|
},
|
||||||
"Metadata": {
|
|
||||||
"title": "MkSaaS - The Best AI SaaS Boilerplate",
|
|
||||||
"description": "MkSaaS is the best AI SaaS boilerplate. Make AI SaaS in hours, simply and effortlessly"
|
|
||||||
},
|
|
||||||
"HomePage": {
|
"HomePage": {
|
||||||
"title": "next-intl example",
|
"title": "next-intl example",
|
||||||
"description": "This is a simple example of how to use next-intl to build a website"
|
"description": "This is a simple example of how to use next-intl to build a website"
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
{
|
{
|
||||||
"Site": {
|
"Metadata": {
|
||||||
"name": "MkSaaS",
|
"name": "MkSaaS",
|
||||||
"tagline": "使用 MkSaaS 在几小时内轻松构建您的 AI SaaS"
|
"title": "MkSaaS - 最好的 AI SaaS 模板",
|
||||||
|
"tagline": "使用 MkSaaS 在几天内轻松构建您的 AI SaaS",
|
||||||
|
"description": "MkSaaS 是构建 AI SaaS 的最佳模板,使用 MkSaaS 可以在几天内轻松构建您的 AI SaaS,简单且毫不费力。"
|
||||||
},
|
},
|
||||||
"Common": {
|
"Common": {
|
||||||
"login": "登录",
|
"login": "登录",
|
||||||
@ -18,10 +20,6 @@
|
|||||||
"cancel": "取消",
|
"cancel": "取消",
|
||||||
"logoutFailed": "退出失败"
|
"logoutFailed": "退出失败"
|
||||||
},
|
},
|
||||||
"Metadata": {
|
|
||||||
"title": "MkSaaS - 最好的 AI SaaS 模板",
|
|
||||||
"description": "MkSaaS 是构建 AI SaaS 的最佳模板,使用 MkSaaS 可以在几小时内轻松构建您的 AI SaaS,简单且毫不费力。"
|
|
||||||
},
|
|
||||||
"HomePage": {
|
"HomePage": {
|
||||||
"title": "MkSaaS 示例",
|
"title": "MkSaaS 示例",
|
||||||
"description": "这是一个使用 MkSaaS 构建网站的简单示例"
|
"description": "这是一个使用 MkSaaS 构建网站的简单示例"
|
||||||
|
@ -1 +0,0 @@
|
|||||||
{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}
|
|
@ -22,9 +22,9 @@ import { type MetadataRoute } from 'next';
|
|||||||
*/
|
*/
|
||||||
export default function manifest(): MetadataRoute.Manifest {
|
export default function manifest(): MetadataRoute.Manifest {
|
||||||
return {
|
return {
|
||||||
name: defaultMessages.Site.name,
|
name: defaultMessages.Metadata.name,
|
||||||
short_name: defaultMessages.Site.name,
|
short_name: defaultMessages.Metadata.name,
|
||||||
description: defaultMessages.Site.tagline,
|
description: defaultMessages.Metadata.description,
|
||||||
start_url: '/',
|
start_url: '/',
|
||||||
display: 'standalone',
|
display: 'standalone',
|
||||||
background_color: '#ffffff',
|
background_color: '#ffffff',
|
||||||
|
@ -38,7 +38,7 @@ export function DashboardSidebar({ ...props }: React.ComponentProps<typeof Sideb
|
|||||||
<LocaleLink href="/">
|
<LocaleLink href="/">
|
||||||
<Logo className="size-5 rounded-full" />
|
<Logo className="size-5 rounded-full" />
|
||||||
<span className="truncate font-semibold text-base">
|
<span className="truncate font-semibold text-base">
|
||||||
{t('Site.name')}
|
{t('Metadata.name')}
|
||||||
</span>
|
</span>
|
||||||
</LocaleLink>
|
</LocaleLink>
|
||||||
</SidebarMenuButton>
|
</SidebarMenuButton>
|
||||||
|
@ -25,13 +25,13 @@ export function Footer({ className }: React.HTMLAttributes<HTMLElement>) {
|
|||||||
<div className="items-center space-x-2 flex">
|
<div className="items-center space-x-2 flex">
|
||||||
<Logo />
|
<Logo />
|
||||||
<span className="text-xl font-semibold">
|
<span className="text-xl font-semibold">
|
||||||
{t('Site.name')}
|
{t('Metadata.name')}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* tagline */}
|
{/* tagline */}
|
||||||
<p className="text-muted-foreground text-base py-2 md:pr-12">
|
<p className="text-muted-foreground text-base py-2 md:pr-12">
|
||||||
{t('Site.tagline')}
|
{t('Metadata.tagline')}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
{/* social links */}
|
{/* social links */}
|
||||||
@ -94,7 +94,7 @@ export function Footer({ className }: React.HTMLAttributes<HTMLElement>) {
|
|||||||
<div className="border-t py-8">
|
<div className="border-t py-8">
|
||||||
<Container className="px-4 flex items-center justify-between">
|
<Container className="px-4 flex items-center justify-between">
|
||||||
<span className="text-muted-foreground text-sm">
|
<span className="text-muted-foreground text-sm">
|
||||||
© {new Date().getFullYear()} {t('Site.name')} All Rights
|
© {new Date().getFullYear()} {t('Metadata.name')} All Rights
|
||||||
Reserved.
|
Reserved.
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ export function NavbarMobile({
|
|||||||
<LocaleLink href={Routes.Root} className="flex items-center gap-2">
|
<LocaleLink href={Routes.Root} className="flex items-center gap-2">
|
||||||
<Logo />
|
<Logo />
|
||||||
<span className="text-xl font-semibold">
|
<span className="text-xl font-semibold">
|
||||||
{t('Site.name')}
|
{t('Metadata.name')}
|
||||||
</span>
|
</span>
|
||||||
</LocaleLink>
|
</LocaleLink>
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ export function Navbar({ scroll }: NavBarProps) {
|
|||||||
<LocaleLink href="/" className="flex items-center space-x-2">
|
<LocaleLink href="/" className="flex items-center space-x-2">
|
||||||
<Logo />
|
<Logo />
|
||||||
<span className="text-xl font-semibold">
|
<span className="text-xl font-semibold">
|
||||||
{t('Site.name')}
|
{t('Metadata.name')}
|
||||||
</span>
|
</span>
|
||||||
</LocaleLink>
|
</LocaleLink>
|
||||||
</div>
|
</div>
|
||||||
|
@ -52,7 +52,7 @@ export const websiteConfig: WebsiteConfig = {
|
|||||||
},
|
},
|
||||||
social: {
|
social: {
|
||||||
github: 'https://github.com/MkSaaSHQ',
|
github: 'https://github.com/MkSaaSHQ',
|
||||||
twitter: 'https://twitter.com/mksaas',
|
twitter: 'https://x.com/MkSaaSHQ',
|
||||||
blueSky: 'https://bsky.app/profile/mksaas.com',
|
blueSky: 'https://bsky.app/profile/mksaas.com',
|
||||||
youtube: 'https://www.youtube.com/@MkSaaSHQ',
|
youtube: 'https://www.youtube.com/@MkSaaSHQ',
|
||||||
linkedin: 'https://linkedin.com/company/mksaas',
|
linkedin: 'https://linkedin.com/company/mksaas',
|
||||||
|
@ -13,7 +13,7 @@ import { admin, username } from 'better-auth/plugins';
|
|||||||
* https://www.better-auth.com/docs/reference/options
|
* https://www.better-auth.com/docs/reference/options
|
||||||
*/
|
*/
|
||||||
export const auth = betterAuth({
|
export const auth = betterAuth({
|
||||||
appName: defaultMessages.Site.name,
|
appName: defaultMessages.Metadata.name,
|
||||||
database: drizzleAdapter(db, {
|
database: drizzleAdapter(db, {
|
||||||
provider: 'pg', // or "mysql", "sqlite"
|
provider: 'pg', // or "mysql", "sqlite"
|
||||||
// The schema object that defines the tables and fields
|
// The schema object that defines the tables and fields
|
||||||
|
@ -2,6 +2,7 @@ import { websiteConfig } from '@/config';
|
|||||||
import { routing } from '@/i18n/routing';
|
import { routing } from '@/i18n/routing';
|
||||||
import type { Metadata } from 'next';
|
import type { Metadata } from 'next';
|
||||||
import { getBaseUrl } from './urls/get-base-url';
|
import { getBaseUrl } from './urls/get-base-url';
|
||||||
|
import { defaultMessages } from '@/i18n/messages';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct the metadata object for the current page (in docs/guides)
|
* Construct the metadata object for the current page (in docs/guides)
|
||||||
@ -21,6 +22,8 @@ export function constructMetadata({
|
|||||||
noIndex?: boolean;
|
noIndex?: boolean;
|
||||||
locale?: string;
|
locale?: string;
|
||||||
} = {}): Metadata {
|
} = {}): Metadata {
|
||||||
|
title = title || defaultMessages.Metadata.name;
|
||||||
|
description = description || defaultMessages.Metadata.description;
|
||||||
image = image || websiteConfig.metadata.image;
|
image = image || websiteConfig.metadata.image;
|
||||||
const ogImageUrl = new URL(`${getBaseUrl()}${image}`);
|
const ogImageUrl = new URL(`${getBaseUrl()}${image}`);
|
||||||
return {
|
return {
|
||||||
@ -53,7 +56,7 @@ export function constructMetadata({
|
|||||||
apple: '/apple-touch-icon.png',
|
apple: '/apple-touch-icon.png',
|
||||||
},
|
},
|
||||||
metadataBase: new URL(getBaseUrl()),
|
metadataBase: new URL(getBaseUrl()),
|
||||||
manifest: `${getBaseUrl()}/site.webmanifest`,
|
manifest: `${getBaseUrl()}/manifest.webmanifest`,
|
||||||
...(noIndex && {
|
...(noIndex && {
|
||||||
robots: {
|
robots: {
|
||||||
index: false,
|
index: false,
|
||||||
|
@ -43,7 +43,7 @@ export default function EmailLayout({ locale, messages, children }: EmailLayoutP
|
|||||||
|
|
||||||
<Hr className="my-8" />
|
<Hr className="my-8" />
|
||||||
<Text className="mt-4">
|
<Text className="mt-4">
|
||||||
{t('Mail.common.team', { name: t('Site.name') })}
|
{t('Mail.common.team', { name: t('Metadata.name') })}
|
||||||
</Text>
|
</Text>
|
||||||
<Text>
|
<Text>
|
||||||
{t('Mail.common.copyright', { year: new Date().getFullYear() })}
|
{t('Mail.common.copyright', { year: new Date().getFullYear() })}
|
||||||
|
Loading…
Reference in New Issue
Block a user