关于 seo-local-business
为本地企业网站生成 SEO 文件和结构化数据,适合企业及网站制作者。涵盖页面元数据、JSON-LD、robots.txt 和 sitemap.xml,并包含澳大利亚业务格式。
主要功能
- 01元数据及社交媒体标签
- 02LocalBusiness、Service 和 FAQ 的 JSON-LD
- 03生成 robots.txt
- 04生成 sitemap.xml
- 05澳大利亚业务格式
适用场景
- 01为本地企业网站准备 SEO 文件
- 02为服务页面添加结构化数据
- 03为澳大利亚企业创建搜索元数据
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ jezweb/ claude-skills --skill seo-local-business安装后在 Claude Code 中输入/seo-local-business确认已加载。
包含的文件
除 SKILL.md 外,安装时一起下载的参考资料和脚本。
assets/head-template.htmlrobots-template.txtsitemap-template.xml详细介绍
本地企业 SEO
为本地企业网站生成完整的 SEO 套件。生成元标签、结构化数据、robots.txt 和 sitemap.xml。
生成内容
- 包含元标签、Open Graph 和 Twitter Cards 的完整
<head>部分 - JSON-LD 结构化数据(LocalBusiness + Service + FAQ 模式)
robots.txtsitemap.xml
工作流
步骤 1:收集企业信息
询问以下信息(或从现有网站中提取):
| 必填 | 可选 |
|---|---|
| 企业名称 | ABN |
| 主要服务 | 营业时间 |
| 所在地(城市/郊区) | 社交媒体 URL |
| 电话号码 | 价格范围 |
| 网站 URL | 服务区域(郊区) |
| 企业描述 | GPS 坐标 |
步骤 2:生成 Head 标签
在此模板中填写占位符:
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{PAGE_TITLE}} | {{BUSINESS_NAME}}</title>
<meta name="title" content="{{PAGE_TITLE}} | {{BUSINESS_NAME}}">
<meta name="description" content="{{META_DESCRIPTION}}">
<link rel="canonical" href="{{CANONICAL_URL}}">
<meta property="og:type" content="website">
<meta property="og:url" content="{{CANONICAL_URL}}">
<meta property="og:title" content="{{PAGE_TITLE}} | {{BUSINESS_NAME}}">
<meta property="og:description" content="{{META_DESCRIPTION}}">
<meta property="og:image" content="{{OG_IMAGE_URL}}">
<meta property="twitter:card" content="summary_large_image">
<meta property="twitter:url" content="{{CANONICAL_URL}}">
<meta property="twitter:title" content="{{PAGE_TITLE}} | {{BUSINESS_NAME}}">
<meta property="twitter:description" content="{{META_DESCRIPTION}}">
<meta property="twitter:image" content="{{OG_IMAGE_URL}}">
<meta name="geo.region" content="{{GEO_REGION}}">
<meta name="geo.placename" content="{{CITY}}">
<meta name="geo.position" content="{{LATITUDE}};{{LONGITUDE}}">
<meta name="ICBM" content="{{LATITUDE}}, {{LONGITUDE}}">
<link rel="icon" type="image/svg+xml" href="favicon.svg">
<link rel="icon" type="image/png" sizes="32x32" href="favicon-32.png">
<link rel="apple-touch-icon" href="apple-touch-icon.png">
<script type="application/ld+json">
{{JSON_LD_SCHEMA}}
</script>
</head>
标题标签模式(最多 50-60 个字符):
| 页面 | 模式 | 示例 |
|---|---|---|
| 首页 | Brand - Tagline | Newcastle Plumbing - 24/7 Emergency Service |
| 服务 | Service in Location | Brand | Hot Water Repairs Newcastle | ABC Plumbing |
| 关于 | About Us | Brand | About Us | ABC Plumbing Newcastle |
| 联系 | Contact | Brand | Contact Us | ABC Plumbing Newcastle |
元描述模式(150-160 个字符):
| 页面 | 模式 |
|---|---|
| 首页 | [USP]. [Service] in [Location]. [CTA]. Call [phone]. |
| 服务 | Professional [service] in [location]. [Benefit]. [Trust signal]. Get a free quote today. |
| 关于 | [X] years serving [location]. [Team info]. [Credentials]. Learn about [brand]. |
| 联系 | Contact [brand] for [service] in [location]. [Hours]. Call [phone] or request a quote online. |
第 3 步:生成结构化数据
LocalBusiness(首页 — 始终包含):
使用 LocalBusiness 或更具体的子类型:
| 子类型 | 适用场景 |
|---|---|
Plumber | 管道服务 |
Electrician | 电气服务 |
RoofingContractor | 屋顶施工 |
HVACBusiness | 空调/供暖 |
AutoRepair | 汽车维修 |
BeautySalon | 美发/美容 |
Dentist | 牙科诊所 |
LegalService | 律师事务所 |
AccountingService | 会计师 |
RealEstateAgent | 房地产 |
Restaurant | 餐厅/咖啡馆 |
BarOrPub | 酒馆/酒吧 |
Hotel | 住宿 |
Store | 零售商店 |
ProfessionalService | 一般专业服务 |
LocalBusiness 模式属性:
| 属性 | 必填 | 说明 |
|---|---|---|
@type | 是 | LocalBusiness 或上述子类型 |
name | 是 | 面向客户展示的企业名称 |
image | 是 | 主要企业图片或徽标 |
description | 是 | 1-2 句企业描述 |
@id | 是 | 唯一 ID,使用 {url}/#organization |
url | 是 | 网站首页 URL |
telephone | 是 | 国际格式:+61-2-4900-1234 |
address | 是 | PostalAddress(见下文) |
email | 建议填写 | 主要联系邮箱 |
priceRange | 建议填写 | $ 至 $$$$ |
geo | 建议填写 | GeoCoordinates:纬度/经度 |
openingHoursSpecification | 建议填写 | 参见下方营业时间格式 |
areaServed | 建议填写 | 服务覆盖的城市/郊区 |
sameAs | 建议填写 | 社交媒体个人资料 URL |
taxID | 可选 | 澳大利亚企业的 ABN |
logo | 可选 | 企业徽标 URL |
foundingDate | 可选 | ISO 8601 日期 |
paymentAccepted | 可选 | 例如 "Cash, Credit Card, EFTPOS" |
currenciesAccepted | 可选 | AUD |
PostalAddress:
| 属性 | 示例 |
|---|---|
streetAddress | 123 Hunter Street |
addressLocality | Newcastle |
addressRegion | NSW |
postalCode | 2300 |
addressCountry | AU |
示例:
{
"@context": "https://schema.org",
"@type": "LocalBusiness",
"name": "ABC Plumbing Newcastle",
"image": "https://www.abcplumbing.com.au/og-image.jpg",
"description": "Professional plumbing services in Newcastle and Lake Macquarie.",
"@id": "https://www.abcplumbing.com.au/#organization",
"url": "https://www.abcplumbing.com.au",
"telephone": "+61-2-4900-1234",
"email": "[email protected]",
"priceRange": "$$",
"address": {
"@type": "PostalAddress",
"streetAddress": "123 Hunter Street",
"addressLocality": "Newcastle",
"addressRegion": "NSW",
"postalCode": "2300",
"addressCountry": "AU"
},
"geo": {
"@type": "GeoCoordinates",
"latitude": -32.9283,
"longitude": 151.7817
},
"openingHoursSpecification": [
{
"@type": "OpeningHoursSpecification",
"dayOfWeek": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"],
"opens": "07:00",
"closes": "17:00"
},
{
"@type": "OpeningHoursSpecification",
"dayOfWeek": ["Saturday"],
"opens": "08:00",
"closes": "12:00"
}
],
"areaServed": [
{ "@type": "City", "name": "Newcastle" },
{ "@type": "City", "name": "Lake Macquarie" }
],
"sameAs": [
"https://www.facebook.com/abcplumbing",
"https://www.instagram.com/abcplumbing"
]
}
Service(服务页面 — 每项服务添加一个):
| 属性 | 必填 | 说明 |
|---|---|---|
name | 是 | 服务名称 |
description | 是 | 服务内容 |
provider | 是 | { "@id": "{url}/#organization" } |
areaServed | 建议填写 | 城市或地区 |
serviceType | 建议填写 | 服务类别 |
offers | 可选 | 定价/可用情况 |
{
"@context": "https://schema.org",
"@type": "Service",
"name": "Hot Water System Installation",
"description": "Professional hot water system installation and replacement in Newcastle.",
"provider": { "@id": "https://www.abcplumbing.com.au/#organization" },
"areaServed": { "@type": "City", "name": "Newcastle" },
"serviceType": "Plumbing",
"offers": {
"@type": "Offer",
"availability": "https://schema.org/InStock",
"priceRange": "$$"
}
}
FAQ(包含常见问题解答部分的页面):
{
"@context": "https://schema.org",
"@type": "FAQPage",
"mainEntity": [
{
"@type": "Question",
"name": "How much does a plumber cost in Newcastle?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Plumber callout fees in Newcastle typically range from $80-150."
}
}
]
}
第 4 步:生成 robots.txt 和 sitemap.xml
robots.txt:
User-agent: *
Allow: /
Sitemap: {{SITE_URL}}/sitemap.xml
sitemap.xml:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>{{SITE_URL}}/</loc>
<lastmod>{{DATE}}</lastmod>
<changefreq>weekly</changefreq>
<priority>1.0</priority>
</url>
</urlset>
第 5 步:验证
在此测试结构化数据:https://validator.schema.org/
常见验证错误:
- 缺少
@context— 每个 JSON-LD 块都需要此属性 - 电话格式错误 — 必须使用国际格式(
+61-...) - 缺少
@id— 模式之间交叉引用时需要此属性 areaServed为空 — 至少填写一个城市
澳大利亚专属模式
电话号码
<a href="tel:+61249001234">(02) 4900 1234</a>
模式中的 telephone:"+61-2-4900-1234"
| 前缀 | 国际格式 |
|---|---|
| 02 | +612 |
| 04 | +614 |
| 1300 | 保持原样 |
ABN
如果有,请添加到 LocalBusiness 模式中:
{ "taxID": "12 345 678 901" }
澳大利亚州/领地代码
| 州/领地 | 代码 | 地理区域 |
|---|---|---|
| 新南威尔士州 | NSW | AU-NSW |
| 维多利亚州 | VIC | AU-VIC |
| 昆士兰州 | QLD | AU-QLD |
| 南澳大利亚州 | SA | AU-SA |
| 西澳大利亚州 | WA | AU-WA |
| 塔斯马尼亚州 | TAS | AU-TAS |
| 北领地 | NT | AU-NT |
| 澳大利亚首都领地 | ACT | AU-ACT |
服务区域
使用 areaServed 填写澳大利亚城市和郊区名称(参见上方 LocalBusiness 示例)。
评论
支持 Markdown