feat: 更新 robots.txt、base.tsx 和 sitemap.xml,增強 SEO 設定與多語言支援
This commit is contained in:
parent
906f112999
commit
d38505f6fa
4 changed files with 80 additions and 4 deletions
|
|
@ -1,2 +1,14 @@
|
|||
# ConvertX-CN robots.txt
|
||||
# 允許所有搜尋引擎爬蟲抓取網站內容
|
||||
|
||||
User-agent: *
|
||||
Disallow: /
|
||||
Allow: /
|
||||
|
||||
# 禁止抓取的路徑(API 端點與內部資源)
|
||||
Disallow: /api/
|
||||
Disallow: /data/
|
||||
Disallow: /uploads/
|
||||
Disallow: /output/
|
||||
|
||||
# Sitemap 位置
|
||||
Sitemap: https://convertx-cn.bioailab.qzz.io/sitemap.xml
|
||||
31
public/sitemap.xml
Normal file
31
public/sitemap.xml
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
||||
xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
||||
|
||||
<!-- 首頁 -->
|
||||
<url>
|
||||
<loc>https://convertx-cn.bioailab.qzz.io/</loc>
|
||||
<lastmod>2026-01-25</lastmod>
|
||||
<changefreq>weekly</changefreq>
|
||||
<priority>1.0</priority>
|
||||
<xhtml:link rel="alternate" hreflang="zh-CN" href="https://convertx-cn.bioailab.qzz.io/"/>
|
||||
<xhtml:link rel="alternate" hreflang="x-default" href="https://convertx-cn.bioailab.qzz.io/"/>
|
||||
</url>
|
||||
|
||||
<!-- 登入頁面 -->
|
||||
<url>
|
||||
<loc>https://convertx-cn.bioailab.qzz.io/login</loc>
|
||||
<lastmod>2026-01-25</lastmod>
|
||||
<changefreq>monthly</changefreq>
|
||||
<priority>0.8</priority>
|
||||
</url>
|
||||
|
||||
<!-- 註冊頁面 -->
|
||||
<url>
|
||||
<loc>https://convertx-cn.bioailab.qzz.io/register</loc>
|
||||
<lastmod>2026-01-25</lastmod>
|
||||
<changefreq>monthly</changefreq>
|
||||
<priority>0.7</priority>
|
||||
</url>
|
||||
|
||||
</urlset>
|
||||
|
|
@ -3,7 +3,7 @@ import { type SupportedLocale, defaultLocale, getTranslations } from "../i18n/in
|
|||
|
||||
export const BaseHtml = ({
|
||||
children,
|
||||
title = "ConvertX-CN",
|
||||
title = "ConvertX-CN - 免費線上檔案轉換工具 | 支援 PDF、Word、圖片等格式轉換",
|
||||
webroot = "",
|
||||
locale = defaultLocale,
|
||||
}: {
|
||||
|
|
@ -16,13 +16,46 @@ export const BaseHtml = ({
|
|||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
{/* SEO 核心設定 - 允許搜尋引擎索引 */}
|
||||
<meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1" />
|
||||
<meta name="googlebot" content="index, follow" />
|
||||
<meta name="bingbot" content="index, follow" />
|
||||
<meta http-equiv="content-language" content="zh-CN" />
|
||||
|
||||
{/* Canonical URL */}
|
||||
<link rel="canonical" href="https://convertx-cn.bioailab.qzz.io/" />
|
||||
|
||||
{/* 多語言替代連結 */}
|
||||
<link rel="alternate" hreflang="zh-CN" href="https://convertx-cn.bioailab.qzz.io/" />
|
||||
<link rel="alternate" hreflang="x-default" href="https://convertx-cn.bioailab.qzz.io/" />
|
||||
|
||||
{/* 應用程式資訊 */}
|
||||
<meta name="webroot" content={webroot} />
|
||||
<meta name="locale" content={locale} />
|
||||
<meta name="application-name" content="ConvertX-CN" />
|
||||
<meta name="apple-mobile-web-app-title" content="ConvertX-CN" />
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta name="mobile-web-app-capable" content="yes" />
|
||||
<meta name="description" content="自架式多格式檔案轉換工具" />
|
||||
|
||||
{/* SEO 描述與關鍵字 */}
|
||||
<meta name="description" content="ConvertX-CN 是免費的線上檔案轉換工具,支援 PDF、Word、Excel、圖片、影片等 100+ 種格式互轉。無需安裝軟體,自架部署保護隱私。" />
|
||||
<meta name="keywords" content="檔案轉換,PDF轉換,Word轉PDF,圖片轉換,格式轉換,線上轉換,免費工具,ConvertX" />
|
||||
<meta name="author" content="ConvertX-CN" />
|
||||
|
||||
{/* Open Graph / 社交媒體分享 */}
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:url" content="https://convertx-cn.bioailab.qzz.io/" />
|
||||
<meta property="og:title" content="ConvertX-CN - 免費線上檔案轉換工具" />
|
||||
<meta property="og:description" content="支援 PDF、Word、Excel、圖片、影片等 100+ 種格式互轉,自架部署保護隱私。" />
|
||||
<meta property="og:locale" content="zh_CN" />
|
||||
<meta property="og:site_name" content="ConvertX-CN" />
|
||||
|
||||
{/* Twitter Card */}
|
||||
<meta name="twitter:card" content="summary_large_image" />
|
||||
<meta name="twitter:title" content="ConvertX-CN - 免費線上檔案轉換工具" />
|
||||
<meta name="twitter:description" content="支援 PDF、Word、Excel、圖片、影片等 100+ 種格式互轉" />
|
||||
|
||||
<meta name="theme-color" content="#a5d601" />
|
||||
<title safe>{title}</title>
|
||||
<link rel="stylesheet" href={`${webroot}/generated.css`} />
|
||||
|
|
|
|||
|
|
@ -228,7 +228,7 @@ export const supportedLocales: LocaleConfig[] = [
|
|||
];
|
||||
|
||||
// Default to zh-TW, fallback to en
|
||||
export const defaultLocale: SupportedLocale = "zh-TW";
|
||||
export const defaultLocale: SupportedLocale = "zh-CN";
|
||||
export const fallbackLocale: SupportedLocale = "en";
|
||||
|
||||
// Type definitions for translation keys
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue