feat: 支持 seo 优化

This commit is contained in:
2026-01-31 21:13:39 +08:00
parent a44a3f6a0d
commit 6ee608d678
9 changed files with 100 additions and 133 deletions

View File

@@ -1,6 +1,8 @@
# Application Configuration # Application Configuration
# Production domain: kymr.top
NEXT_PUBLIC_APP_URL=http://localhost:3000 NEXT_PUBLIC_APP_URL=http://localhost:3000
NEXT_PUBLIC_APP_NAME="Mini Game AI Tools" NEXT_PUBLIC_SITE_URL=https://kymr.top
NEXT_PUBLIC_APP_NAME="KYMR.TOP - Game Development Tools"
# Database (Phase 6) # Database (Phase 6)
# DATABASE_URL="postgresql://..." # DATABASE_URL="postgresql://..."

View File

@@ -50,3 +50,37 @@ All shared types in `types/index.ts` including file types, processing configs, A
- Current (Phase 1-4): Basic tools with mock API implementations - Current (Phase 1-4): Basic tools with mock API implementations
- Phase 5: AI services integration (Replicate, OpenAI) - Phase 5: AI services integration (Replicate, OpenAI)
- Phase 6: Authentication, database (PostgreSQL), payment processing (Stripe), cloud storage (Cloudflare R2) - Phase 6: Authentication, database (PostgreSQL), payment processing (Stripe), cloud storage (Cloudflare R2)
## Branding & SEO
### Website Identity
- **Project Name**: mini-game-ai (internal repository name)
- **Website Domain**: https://kymr.top
- **Brand Name**: KYMR.TOP
- **Tagline**: Image & Video Converter | Game Development Tools
**IMPORTANT**: When updating SEO metadata, always use "KYMR.TOP" as the brand name, NOT "Mini Game AI". The project name "mini-game-ai" is only used for the repository and should not appear in user-facing content.
### SEO Keywords
The website targets both English and Chinese search engines (Google, Baidu) with the following focus areas:
**English Keywords:**
- Primary: image compression, image converter, WebP converter, PNG optimizer
- Secondary: video converter, video to frames, audio compression
- Tertiary: texture atlas, sprite sheet generator, game development tools
**Chinese Keywords:**
- Primary: 图片压缩, 图片转换, WebP转换, PNG优化
- Secondary: 视频转换, 视频抽帧, 音频压缩, 音频转换
- Tertiary: 纹理图集, 精灵图生成, 游戏开发工具, 游戏素材工具
### SEO Configuration Files
- `src/app/layout.tsx` - Main metadata (title, description, keywords, Open Graph, Twitter Card)
- `src/app/sitemap.ts` - XML sitemap for search engines
- `src/app/robots.ts` - Robots.txt configuration
- `public/manifest.json` - PWA manifest
- `src/components/seo/StructuredData.tsx` - Schema.org structured data
### Environment Variables
- `NEXT_PUBLIC_SITE_URL` - Production URL (default: https://kymr.top)
- `NEXT_PUBLIC_APP_URL` - App URL (may differ for development)

View File

@@ -1,75 +0,0 @@
{
"name": "Mini Game AI - AI-Powered Tools for Game Developers",
"short_name": "Mini Game AI",
"description": "Transform your game development workflow with AI-powered tools. Video to frames, image compression, audio processing, texture atlas generation, and more.",
"start_url": "/",
"display": "standalone",
"background_color": "#09090b",
"theme_color": "#3b82f6",
"orientation": "portrait-primary",
"icons": [
{
"src": "/icon-72x72.png",
"sizes": "72x72",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "/icon-96x96.png",
"sizes": "96x96",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "/icon-128x128.png",
"sizes": "128x128",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "/icon-144x144.png",
"sizes": "144x144",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "/icon-152x152.png",
"sizes": "152x152",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "/icon-192x192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "/icon-384x384.png",
"sizes": "384x384",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "/icon-512x512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable any"
}
],
"categories": ["productivity", "utilities", "developer"],
"screenshots": [
{
"src": "/screenshot-desktop.png",
"sizes": "1280x720",
"type": "image/png",
"form_factor": "wide"
},
{
"src": "/screenshot-mobile.png",
"sizes": "750x1334",
"type": "image/png",
"form_factor": "narrow"
}
]
}

View File

@@ -12,32 +12,52 @@ import {
} from "@/lib/i18n-server"; } from "@/lib/i18n-server";
export const metadata: Metadata = { export const metadata: Metadata = {
metadataBase: new URL(process.env.NEXT_PUBLIC_SITE_URL || "https://minigameai.com"), metadataBase: new URL(process.env.NEXT_PUBLIC_SITE_URL || "https://kymr.top"),
title: { title: {
default: "Mini Game AI - AI-Powered Tools for Game Developers", default: "Image & Video Converter | Game Development Tools | KYMR.TOP",
template: "%s | Mini Game AI", template: "%s | KYMR.TOP",
}, },
description: description:
"Transform your game development workflow with AI-powered tools. Video to frames, image compression, audio processing, texture atlas generation, and more. All processing happens locally in your browser.", "Free online tools for game developers. Compress and convert images (PNG, JPEG, WebP), extract frames from videos, compress audio files, generate texture atlases and sprite sheets. All processing happens locally in your browser - no uploads, complete privacy.",
keywords: [ keywords: [
"game development", // Primary English keywords
"AI tools",
"video processing",
"image compression", "image compression",
"audio processing", "image converter",
"texture atlas",
"sprite sheet",
"game assets",
"WebP converter", "WebP converter",
"PNG optimizer", "PNG optimizer",
"video frames", "JPEG compressor",
"video converter",
"video to frames",
"video processing",
"audio compression",
"audio converter",
"MP3 compressor",
"texture atlas",
"sprite sheet generator",
"game development tools",
"game assets",
"browser-based tools", "browser-based tools",
"privacy-first", "privacy-first",
"no upload", "no upload",
// Chinese keywords for Baidu
"图片压缩",
"图片转换",
"WebP转换",
"PNG优化",
"视频转换",
"视频抽帧",
"音频压缩",
"音频转换",
"纹理图集",
"精灵图生成",
"游戏开发工具",
"游戏素材",
"在线工具",
"隐私保护",
], ],
authors: [{ name: "Mini Game AI", url: "https://minigameai.com" }], authors: [{ name: "KYMR.TOP", url: "https://kymr.top" }],
creator: "Mini Game AI", creator: "KYMR.TOP",
publisher: "Mini Game AI", publisher: "KYMR.TOP",
robots: { robots: {
index: true, index: true,
follow: true, follow: true,
@@ -50,28 +70,14 @@ export const metadata: Metadata = {
}, },
}, },
icons: { icons: {
icon: [ icon: "/icon.svg",
{ url: "/icon.svg", type: "image/svg+xml" },
{ url: "/icon-192.png", sizes: "192x192", type: "image/png" },
{ url: "/icon-512.png", sizes: "512x512", type: "image/png" },
],
shortcut: "/icon-192.png",
apple: [
{ url: "/apple-touch-icon.png", sizes: "180x180", type: "image/png" },
],
},
manifest: "/manifest.json",
appleWebApp: {
capable: true,
title: "Mini Game AI",
statusBarStyle: "default",
}, },
openGraph: { openGraph: {
type: "website", type: "website",
siteName: "Mini Game AI", siteName: "KYMR.TOP",
title: "Mini Game AI - AI-Powered Tools for Game Developers", title: "Image & Video Converter | Game Development Tools | KYMR.TOP",
description: description:
"Transform your game development workflow with AI-powered tools. Video to frames, image compression, audio processing, texture atlas generation, and more. All processing happens locally in your browser.", "Free online tools for game developers. Compress and convert images (PNG, JPEG, WebP), extract frames from videos, compress audio files, generate texture atlases and sprite sheets. All processing happens locally in your browser - no uploads, complete privacy.",
url: "/", url: "/",
locale: "en_US", locale: "en_US",
alternateLocale: ["zh_CN"], alternateLocale: ["zh_CN"],
@@ -80,17 +86,17 @@ export const metadata: Metadata = {
url: "/og-image.png", url: "/og-image.png",
width: 1200, width: 1200,
height: 630, height: 630,
alt: "Mini Game AI - AI-Powered Tools for Game Developers", alt: "KYMR.TOP - Image & Video Converter for Game Developers",
}, },
], ],
}, },
twitter: { twitter: {
card: "summary_large_image", card: "summary_large_image",
title: "Mini Game AI - AI-Powered Tools for Game Developers", title: "Image & Video Converter | Game Development Tools | KYMR.TOP",
description: description:
"Transform your game development workflow with AI-powered tools. Video to frames, image compression, audio processing, texture atlas generation, and more.", "Free online tools for game developers. Compress and convert images, extract frames from videos, compress audio, generate texture atlases. Browser-based, privacy-first.",
site: "@minigameai", site: "@kyMRtop",
creator: "@minigameai", creator: "@kyMRtop",
images: ["/twitter-image.png"], images: ["/twitter-image.png"],
}, },
alternates: { alternates: {

View File

@@ -1,7 +1,7 @@
import type { MetadataRoute } from "next"; import type { MetadataRoute } from "next";
export default function robots(): MetadataRoute.Robots { export default function robots(): MetadataRoute.Robots {
const baseUrl = process.env.NEXT_PUBLIC_SITE_URL || "https://minigameai.com"; const baseUrl = process.env.NEXT_PUBLIC_SITE_URL || "https://kymr.top";
return { return {
rules: [ rules: [

View File

@@ -59,7 +59,7 @@ const tools: ToolPage[] = [
]; ];
export default async function sitemap(): Promise<MetadataRoute.Sitemap> { export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
const baseUrl = process.env.NEXT_PUBLIC_SITE_URL || "https://minigameai.com"; const baseUrl = process.env.NEXT_PUBLIC_SITE_URL || "https://kymr.top";
const staticPages: MetadataRoute.Sitemap = [ const staticPages: MetadataRoute.Sitemap = [
{ {

View File

@@ -4,7 +4,7 @@ interface StructuredDataProps {
} }
export function StructuredData({ type, data }: StructuredDataProps) { export function StructuredData({ type, data }: StructuredDataProps) {
const baseUrl = process.env.NEXT_PUBLIC_SITE_URL || "https://minigameai.com"; const baseUrl = process.env.NEXT_PUBLIC_SITE_URL || "https://kymr.top";
const baseData = { const baseData = {
"@context": "https://schema.org", "@context": "https://schema.org",
@@ -26,16 +26,16 @@ interface WebSiteProps {
} }
export function WebSiteStructuredData({ lang = "en" }: WebSiteProps) { export function WebSiteStructuredData({ lang = "en" }: WebSiteProps) {
const baseUrl = process.env.NEXT_PUBLIC_SITE_URL || "https://minigameai.com"; const baseUrl = process.env.NEXT_PUBLIC_SITE_URL || "https://kymr.top";
const content = { const content = {
en: { en: {
name: "Mini Game AI", name: "KYMR.TOP",
alternateName: "MiniGameAI", alternateName: "KYMR Game Tools",
description: description:
"Transform your game development workflow with AI-powered tools. Video to frames, image compression, audio processing, texture atlas generation, and more.", "Free online tools for game developers. Compress and convert images (PNG, JPEG, WebP), extract frames from videos, compress audio files, generate texture atlases and sprite sheets. All processing happens locally in your browser - no uploads, complete privacy.",
keywords: keywords:
"game development, AI tools, video processing, image compression, audio processing, texture atlas", "image compression, image converter, WebP converter, PNG optimizer, video converter, video to frames, audio compression, texture atlas, sprite sheet generator, game development tools, browser-based tools",
inLanguage: "en-US", inLanguage: "en-US",
potentialAction: { potentialAction: {
"@type": "SearchAction", "@type": "SearchAction",
@@ -47,12 +47,12 @@ export function WebSiteStructuredData({ lang = "en" }: WebSiteProps) {
}, },
}, },
zh: { zh: {
name: "Mini Game AI", name: "KYMR.TOP",
alternateName: "迷你游戏AI", alternateName: "KYMR游戏工具",
description: description:
"用 AI 驱动的工具改变游戏开发流程。视频抽帧、图片压缩、音频处理、纹理图集生成。", "专为游戏开发者设计的免费在线工具平台。支持图片压缩转换(PNG、JPEG、WebP)、视频抽帧转换、音频压缩、纹理图集生成、精灵图制作。浏览器本地处理,无需上传,保护隐私。",
keywords: keywords:
"游戏开发, AI工具, 视频处理, 图片压缩, 音频处理, 纹理图集", "图片压缩, 图片转换, WebP转换, PNG优化, 视频转换, 视频抽帧, 音频压缩, 音频转换, 纹理图集, 精灵图生成, 游戏开发工具, 游戏素材工具, 在线工具, 隐私保护",
inLanguage: "zh-CN", inLanguage: "zh-CN",
}, },
}; };
@@ -73,16 +73,16 @@ export function WebSiteStructuredData({ lang = "en" }: WebSiteProps) {
} }
export function OrganizationStructuredData() { export function OrganizationStructuredData() {
const baseUrl = process.env.NEXT_PUBLIC_SITE_URL || "https://minigameai.com"; const baseUrl = process.env.NEXT_PUBLIC_SITE_URL || "https://kymr.top";
const data = { const data = {
"@context": "https://schema.org", "@context": "https://schema.org",
"@type": "Organization", "@type": "Organization",
name: "Mini Game AI", name: "KYMR.TOP",
url: baseUrl, url: baseUrl,
logo: `${baseUrl}/icon-512.png`, logo: `${baseUrl}/icon-512.png`,
description: description:
"AI-powered tools for game developers. Transform your workflow with browser-based tools for video, image, and audio processing.", "Free online tools for game developers. Browser-based tools for image compression, video conversion, audio processing, texture atlas generation, and sprite sheet creation. Privacy-first with no file uploads required.",
sameAs: [] as string[], sameAs: [] as string[],
contactPoint: { contactPoint: {
"@type": "ContactPoint", "@type": "ContactPoint",
@@ -118,7 +118,7 @@ export function SoftwareApplicationStructuredData({
offersPrice = "0", offersPrice = "0",
offersCurrency = "USD", offersCurrency = "USD",
}: SoftwareApplicationProps) { }: SoftwareApplicationProps) {
const baseUrl = process.env.NEXT_PUBLIC_SITE_URL || "https://minigameai.com"; const baseUrl = process.env.NEXT_PUBLIC_SITE_URL || "https://kymr.top";
const data = { const data = {
"@context": "https://schema.org", "@context": "https://schema.org",
@@ -143,7 +143,7 @@ export function SoftwareApplicationStructuredData({
softwareVersion: "1.0", softwareVersion: "1.0",
author: { author: {
"@type": "Organization", "@type": "Organization",
name: "Mini Game AI", name: "KYMR.TOP",
url: baseUrl, url: baseUrl,
}, },
}; };

View File

@@ -380,7 +380,7 @@
"compressionHint": "Enable PNG quantization to significantly reduce file size (similar to TinyPNG)" "compressionHint": "Enable PNG quantization to significantly reduce file size (similar to TinyPNG)"
}, },
"footer": { "footer": {
"tagline": "Media processing tools for game developers. Extract frames, compress images, optimize audio.", "tagline": "Image & video converter for game developers. Compress images, extract frames, convert audio, generate texture atlases. Browser-based, privacy-first.",
"note": "Inspired by modern product storytelling—centered on your workflow, not UI noise.", "note": "Inspired by modern product storytelling—centered on your workflow, not UI noise.",
"sections": { "sections": {
"tools": "Tools", "tools": "Tools",

View File

@@ -380,7 +380,7 @@
"compressionHint": "开启后使用 PNG 量化压缩,可大幅减小文件体积(类似 TinyPNG" "compressionHint": "开启后使用 PNG 量化压缩,可大幅减小文件体积(类似 TinyPNG"
}, },
"footer": { "footer": {
"tagline": "面向游戏开发者的媒体处理工具。视频抽帧、图片压缩、音频优化。", "tagline": "面向游戏开发者的图片视频转换工具。支持图片压缩转换、视频抽帧、音频压缩、纹理图集生成。浏览器本地处理,保护隐私。",
"note": "灵感来自现代产品网站的信息密度与克制动效,但以你自己的产品为中心。", "note": "灵感来自现代产品网站的信息密度与克制动效,但以你自己的产品为中心。",
"sections": { "sections": {
"tools": "工具", "tools": "工具",