mcpField
S
seo-local-business

seo-local-business

github.com/jezweb营销与增长1.1k1.8k 次安装3 周前更新
代码仓库

关于 seo-local-business

为本地企业网站生成 SEO 文件和结构化数据,适合企业及网站制作者。涵盖页面元数据、JSON-LD、robots.txt 和 sitemap.xml,并包含澳大利亚业务格式。

主要功能

  1. 01元数据及社交媒体标签
  2. 02LocalBusiness、Service 和 FAQ 的 JSON-LD
  3. 03生成 robots.txt
  4. 04生成 sitemap.xml
  5. 05澳大利亚业务格式

适用场景

  1. 01为本地企业网站准备 SEO 文件
  2. 02为服务页面添加结构化数据
  3. 03为澳大利亚企业创建搜索元数据

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/jezweb/claude-skills --skill seo-local-business

安装后在 Claude Code 中输入/seo-local-business确认已加载。

包含的文件

除 SKILL.md 外,安装时一起下载的参考资料和脚本。

assets/
head-template.html
robots-template.txt
sitemap-template.xml

详细介绍

本地企业 SEO

为本地企业网站生成完整的 SEO 套件。生成元标签、结构化数据、robots.txt 和 sitemap.xml。

生成内容

  1. 包含元标签、Open Graph 和 Twitter Cards 的完整 <head> 部分
  2. JSON-LD 结构化数据(LocalBusiness + Service + FAQ 模式)
  3. robots.txt
  4. sitemap.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 - TaglineNewcastle Plumbing - 24/7 Emergency Service
服务Service in Location | BrandHot Water Repairs Newcastle | ABC Plumbing
关于About Us | BrandAbout Us | ABC Plumbing Newcastle
联系Contact | BrandContact 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:

属性示例
streetAddress123 Hunter Street
addressLocalityNewcastle
addressRegionNSW
postalCode2300
addressCountryAU

示例:

{
  "@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" }
澳大利亚州/领地代码
州/领地代码地理区域
新南威尔士州NSWAU-NSW
维多利亚州VICAU-VIC
昆士兰州QLDAU-QLD
南澳大利亚州SAAU-SA
西澳大利亚州WAAU-WA
塔斯马尼亚州TASAU-TAS
北领地NTAU-NT
澳大利亚首都领地ACTAU-ACT
服务区域

使用 areaServed 填写澳大利亚城市和郊区名称(参见上方 LocalBusiness 示例)。

评论

支持 Markdown