Skip to content

Commit b57c62d

Browse files
authored
Merge pull request #53 from calderbuild/fix/seo-audit-fixes
fix(seo): resolve sitemap/robots routing conflict and fix schema errors
2 parents acf2fdf + 5ceef24 commit b57c62d

File tree

6 files changed

+50
-181
lines changed

6 files changed

+50
-181
lines changed

api/index.py

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -446,35 +446,7 @@ async def bing_verification():
446446
# 如果文件不存在,返回404
447447
raise HTTPException(status_code=404, detail="Bing verification file not found")
448448

449-
@app.api_route("/sitemap.xml", methods=["GET", "HEAD"])
450-
async def sitemap():
451-
"""返回站点地图(支持GET和HEAD请求)"""
452-
sitemap_file = "public/sitemap.xml"
453-
if os.path.exists(sitemap_file):
454-
return FileResponse(
455-
sitemap_file,
456-
media_type="application/xml",
457-
headers={
458-
"Cache-Control": "public, max-age=3600",
459-
"Content-Type": "application/xml; charset=utf-8"
460-
}
461-
)
462-
raise HTTPException(status_code=404, detail="Sitemap not found")
463-
464-
@app.api_route("/robots.txt", methods=["GET", "HEAD"])
465-
async def robots():
466-
"""返回robots.txt(支持GET和HEAD请求)"""
467-
robots_file = "public/robots.txt"
468-
if os.path.exists(robots_file):
469-
return FileResponse(
470-
robots_file,
471-
media_type="text/plain",
472-
headers={
473-
"Cache-Control": "public, max-age=3600",
474-
"Content-Type": "text/plain; charset=utf-8"
475-
}
476-
)
477-
raise HTTPException(status_code=404, detail="robots.txt not found")
449+
# sitemap.xml 和 robots.txt 由 seo_pages.router 动态生成(含城市页)
478450

479451
@app.api_route("/favicon.ico", methods=["GET", "HEAD"])
480452
async def favicon_ico():

api/services/seo_content.py

Lines changed: 41 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -53,65 +53,66 @@ def extract_keywords(self, text: str, top_k: int = 10) -> List[str]:
5353
def generate_meta_tags(self, page_type: str, data: Dict) -> Dict[str, str]:
5454
"""根据页面类型生成Meta标签."""
5555
if page_type == "homepage":
56-
title = "MeetSpot - Find Meeting Location Midpoint | 智能聚会地点推荐"
56+
title = "MeetSpot 聚点 - 多人聚会地点智能推荐"
5757
description = (
58-
"MeetSpot让2-10人团队快速找到公平会面中点, 智能推荐咖啡馆、餐厅、共享空间, 自动输出路线、"
59-
"预算与结构化数据, 15秒生成可索引聚会页面; Midpoint engine saves 30% commute, fuels SEO-ready recaps with clear CTA."
60-
)
61-
keywords = (
62-
"meeting location,find midpoint,group meeting,location finder,"
63-
"聚会地点推荐,中点计算,团队聚会"
58+
"MeetSpot 帮助 2-10 人快速找到公平的聚会中点,"
59+
"智能推荐咖啡馆、餐厅、图书馆等场所,"
60+
"球面几何算法计算公平中心,覆盖 350+ 城市,免费使用无需注册。"
6461
)
62+
keywords = "聚会地点推荐,中点计算,团队聚会,meeting location,midpoint"
6563
elif page_type == "city_page":
6664
city = data.get("city", "")
6765
city_en = data.get("city_en", "")
6866
venue_types = data.get("venue_types", [])
6967
venue_snippet = "、".join(venue_types[:3]) if venue_types else "热门场所"
70-
title = f"{city}聚会地点推荐 | {city_en} Meeting Location Finder - MeetSpot"
68+
title = f"{city}聚会地点推荐 - MeetSpot 聚点"
7169
description = (
72-
f"{city or '所在城市'}聚会需要公平中点? MeetSpot根据2-10人轨迹计算平衡路线, 推荐{venue_snippet}等场所, "
73-
"输出中文/英文场地文案、预算与交通信息, 15秒生成可索引城市着陆页; Local insights boost trust, shareable cards unlock faster decisions."
70+
f"在{city or '所在城市'}找多人聚会的公平中点?"
71+
f"MeetSpot 根据 2-10 人位置计算最佳会面点,推荐{venue_snippet}等高评分场所,"
72+
f"覆盖{city}主要商圈和高校周边。"
7473
)
75-
keywords = f"{city},{city_en},meeting location,{venue_snippet},midpoint"
74+
keywords = f"{city}聚会地点,{city}聚餐推荐,{venue_snippet},{city_en}"
7675
elif page_type == "about":
77-
title = "About MeetSpot - How We Find Perfect Meeting Locations | 关于我们"
76+
title = "关于 MeetSpot 聚点 - 智能聚会地点推荐"
7877
description = (
79-
"MeetSpot团队由地图算法、内容运营与产品负责人组成, 公开使命、技术栈、治理方式, 分享用户案例、AMAP合规、安全策略与开源路线图; "
80-
"Learn how we guarantee equitable experiences backed by ongoing UX research。"
78+
"MeetSpot 是一款开源的多人聚会地点推荐工具,"
79+
"使用球面几何算法计算公平中点,结合智能评分推荐最佳场所,"
80+
"覆盖 350+ 城市,12 种场景主题。"
8181
)
82-
keywords = "about meetspot,meeting algorithm,location technology,关于,聚会算法"
82+
keywords = "关于 MeetSpot,聚会算法,地点推荐技术"
8383
elif page_type == "faq":
84-
title = "FAQ - Meeting Location Questions Answered | 常见问题 - MeetSpot"
84+
title = "常见问题 - MeetSpot 聚点"
8585
description = (
86-
"覆盖聚会地点、费用、功能等核心提问, 提供结构化答案, 支持Google FAQ Schema, 让用户与搜索引擎获得清晰指导, "
87-
"并附上联系入口与下一步CTA, FAQ hub helps planners resolve objections faster and improve conversions。"
86+
"MeetSpot 常见问题解答:如何计算聚会中点、支持多少人、"
87+
"覆盖哪些城市、是否免费、推荐速度等核心问题一站式解答。"
8888
)
89-
keywords = "faq,meeting questions,location help,常见问题,使用指南"
89+
keywords = "MeetSpot 常见问题,聚会地点帮助,使用指南"
9090
elif page_type == "how_it_works":
91-
title = "How MeetSpot Works | 智能聚会地点中点计算流程"
91+
title = "使用指南 - MeetSpot 聚点"
9292
description = (
93-
"4步流程涵盖收集地址、平衡权重、筛选场地与导出SEO文案, 附带动图、清单和风控提示, 指导团队15分钟内发布可索引页面; "
94-
"Learn safeguards, KPIs, stakeholder handoffs, and post-launch QA behind MeetSpot。"
93+
"MeetSpot 使用指南:输入参与者地址、选择场所类型、"
94+
"设置特殊需求,5 步智能推理流程为你找到对所有人都公平的聚会地点。"
9595
)
96-
keywords = "how meetspot works,midpoint guide,workflow,使用指南"
96+
keywords = "MeetSpot 使用指南,聚会地点怎么选,中点计算教程"
9797
elif page_type == "recommendation":
9898
city = data.get("city", "未知城市")
9999
keyword = data.get("keyword", "聚会地点")
100100
count = data.get("locations_count", 2)
101-
title = f"{city}{keyword}推荐 - {count}人聚会最佳会面点 | MeetSpot"
101+
title = f"{city}{keyword}推荐 - {count}人聚会 | MeetSpot"
102102
description = (
103-
f"{city}{count}{keyword}推荐由MeetSpot中点引擎生成, 结合每位参与者的路程、预算与场地偏好, "
104-
"给出评分、热力图和可复制行程; Share SEO-ready cards、CTA, keep planning transparent, document-ready for clients, and measurable。"
103+
f"{city} {count}{keyword}推荐,"
104+
f"MeetSpot 根据所有参与者位置计算公平中点,"
105+
f"智能推荐评分最高的{keyword}。"
105106
)
106-
keywords = f"{city},{keyword},聚会地点推荐,中点计算,{count}人聚会"
107+
keywords = f"{city},{keyword},聚会地点推荐,中点计算"
107108
else:
108-
title = "MeetSpot - 智能聚会地点推荐"
109-
description = "MeetSpot通过公平的中点计算, 为多人聚会推荐最佳会面地点。"
110-
keywords = "meetspot,meeting location,聚会地点"
109+
title = "MeetSpot 聚点 - 智能聚会地点推荐"
110+
description = "MeetSpot 通过公平的中点计算,为多人聚会推荐最佳会面地点。"
111+
keywords = "MeetSpot,聚会地点推荐,中点计算"
111112

112113
return {
113114
"title": title[:60],
114-
"description": description[:160],
115+
"description": description[:155],
115116
"keywords": keywords,
116117
}
117118

@@ -152,13 +153,11 @@ def generate_schema_org(self, page_type: str, data: Dict) -> Dict:
152153
"@type": "Organization",
153154
"name": "MeetSpot",
154155
"url": base_url,
155-
"logo": f"{base_url}/static/images/og-image.png",
156-
"foundingDate": "2023-08-01",
157156
"contactPoint": [
158157
{
159158
"@type": "ContactPoint",
160159
"contactType": "customer support",
161-
"email": "hello@meetspot.app",
160+
"email": "Johnrobertdestiny@gmail.com",
162161
"availableLanguage": ["zh-CN", "en"],
163162
}
164163
],
@@ -184,12 +183,6 @@ def generate_schema_org(self, page_type: str, data: Dict) -> Dict:
184183
"latitude": venue.get("lat"),
185184
"longitude": venue.get("lng"),
186185
},
187-
"aggregateRating": {
188-
"@type": "AggregateRating",
189-
"ratingValue": venue.get("rating", 4.5),
190-
"reviewCount": venue.get("review_count", 100),
191-
},
192-
"priceRange": venue.get("price_range", "$$"),
193186
}
194187
if page_type == "faq":
195188
faqs = data.get("faqs", [])
@@ -230,8 +223,14 @@ def generate_schema_org(self, page_type: str, data: Dict) -> Dict:
230223
}
231224
for step in steps
232225
],
233-
"supply": data.get("supplies", ["参与者地址", "交通方式偏好"]),
234-
"tool": data.get("tools", ["MeetSpot Dashboard"]),
226+
"supply": [
227+
{"@type": "HowToSupply", "name": s}
228+
for s in data.get("supplies", ["参与者地址", "交通方式偏好"])
229+
],
230+
"tool": [
231+
{"@type": "HowToTool", "name": t}
232+
for t in data.get("tools", ["MeetSpot Dashboard"])
233+
],
235234
}
236235
if page_type == "breadcrumb":
237236
items = data.get("items", [])

public/robots.txt

Lines changed: 0 additions & 53 deletions
This file was deleted.

public/sitemap.xml

Lines changed: 0 additions & 50 deletions
This file was deleted.

templates/base.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<meta charset="UTF-8">
55
<meta name="viewport" content="width=device-width, initial-scale=1.0">
66

7+
<link rel="icon" type="image/svg+xml" href="/public/favicon.svg">
78
<title>{{ meta_title }}</title>
89
<meta name="description" content="{{ meta_description }}">
910
<meta name="keywords" content="{{ meta_keywords }}">
@@ -767,7 +768,7 @@ <h3>支持项目</h3>
767768
</div>
768769

769770
<div class="footer-bottom">
770-
<p>© 2025 MeetSpot · Built with ❤️ by <a href="https://jasonrobert.me/" target="_blank">Jason Robert</a></p>
771+
<p>© 2025-2026 MeetSpot · Built with ❤️ by <a href="https://jasonrobert.me/" target="_blank">Jason Robert</a></p>
771772
</div>
772773
</footer>
773774

templates/pages/home.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
font-size: 1rem;
117117
}
118118

119-
.hero-section h2 {
119+
.hero-section h1 {
120120
font-size: 3rem;
121121
margin-bottom: 16px;
122122
font-family: "Outfit", sans-serif;
@@ -126,7 +126,7 @@
126126
text-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
127127
}
128128

129-
.hero-section h2 .highlight {
129+
.hero-section h1 .highlight {
130130
background: linear-gradient(135deg, var(--nav-secondary) 0%, #00E5A0 100%);
131131
-webkit-background-clip: text;
132132
-webkit-text-fill-color: transparent;
@@ -956,7 +956,7 @@
956956
padding: 40px 24px;
957957
}
958958

959-
.hero-section h2 {
959+
.hero-section h1 {
960960
font-size: 2rem;
961961
}
962962

@@ -1047,10 +1047,10 @@
10471047
<i class='bx bx-bot'></i>
10481048
AI Agent
10491049
</div>
1050-
<h2>
1050+
<h1>
10511051
MeetSpot <span class="highlight">AI Agent</span>
10521052
<br>智能聚会地点推荐
1053-
</h2>
1053+
</h1>
10541054
<p class="hero-tagline">球面几何计算公平中点 + GPT-4o智能评分</p>
10551055
<div class="hero-tech-stack">
10561056
<span>Haversine</span>
@@ -1173,7 +1173,7 @@ <h2 class="section-title">5步透明推理</h2>
11731173
<section class="main-content-grid">
11741174
<div class="content-card reveal reveal-3">
11751175
<p class="badge">AI Agent · 完全免费</p>
1176-
<h1 class="main-heading">多人聚会,一键找到最公平的中点位置</h1>
1176+
<h2 class="main-heading">多人聚会,一键找到最公平的中点位置</h2>
11771177
<p class="main-desc">
11781178
MeetSpot(聚点)是一个智能会面地点推荐AI Agent。无论是咖啡馆商务会谈、餐厅朋友聚餐、还是图书馆学习讨论,都能根据多人位置快速计算最佳中点,推荐附近高评分场所。
11791179
</p>

0 commit comments

Comments
 (0)