SEO 优化快速参考指南
本文档提供了营销官网 SEO 配置的快速参考,便于日常维护和更新。
配置文件位置
- 主配置:
/marketing/docs/.vitepress/config.js - 主题文件:
/marketing/docs/.vitepress/theme/index.js - robots.txt:
/marketing/docs/public/robots.txt - RSS 插件:
/marketing/docs/.vitepress/plugins/rss.js
关键配置项
页面元数据模板
在博客文章中使用此模板确保 SEO 优化:
markdown
---
title: 文章标题
description: 文章描述(50-160个字符)
date: 2026-01-15
author: 租管家数据科技有限公司
category: 业务管理 # 可选:电脑租赁、租赁管理、ERP系统、企业管理、业务转型
# draft: true # 如为草稿则设置此项
---
文章内容...结构化数据类型
根据页面类型自动生成相应的 Schema.org 结构化数据:
| 页面类型 | Schema 类型 | 示例路径 |
|---|---|---|
| 首页 | WebPage | / 或 /index |
| 博客文章 | Article | /blog/digital-transformation |
| 功能介绍 | ItemPage | /features |
| 定价页面 | ItemPage | /pricing |
| 关于页面 | WebPage | /about |
Sitemap 优先级
| 页面类型 | changefreq | priority |
|---|---|---|
| 首页 | daily | 1.0 |
| 功能/定价 | weekly | 0.8 |
| 博客文章 | monthly | 0.7 |
| 关于页面 | monthly | 0.6 |
| 其他页面 | weekly | 0.5 |
常用维护任务
添加新博客文章
- 在
/marketing/docs/blog/创建新的.md文件 - 添加完整的 frontmatter(参考上方模板)
- 更新
/marketing/docs/.vitepress/config.js中的 sidebar 配置 - 构建网站:
npm run build - 验证 RSS feed 包含新文章
更新备案信息
编辑 /marketing/docs/.vitepress/config.js 中的 footer 配置:
javascript
footer: {
message: '<a href="https://beian.miit.gov.cn" target="_blank" rel="noopener noreferrer">鲁ICP备XXXXXXXX号-X</a>',
copyright: 'Copyright © 2025-2026 租管家数据科技有限公司'
}配置 SSL 证书监控
- 编辑
/marketing/scripts/ssl-renew-check.sh - 修改域名、告警阈值、邮箱等配置
- 测试脚本:
./ssl-renew-check.sh - 配置 Cron 定时任务(参考
ssl-cron-setup.md)
更新组织信息
编辑 /marketing/docs/.vitepress/config.js 中的 Organization JSON-LD:
javascript
['script', { type: 'application/ld+json' }, JSON.stringify({
"@context": "https://schema.org",
"@type": "Organization",
"name": "租管家",
"alternateName": "租管家数据科技有限公司",
"url": "https://www.zuguanjia.net",
"logo": "https://www.zuguanjia.net/logo.svg",
"sameAs": ["https://github.com/zuguanjia"],
"contactPoint": {
"@type": "ContactPoint",
"email": "sales@zuguanjia.net",
"contactType": "sales",
"availableLanguage": ["zh-CN"]
},
"address": {
"@type": "PostalAddress",
"addressCountry": "CN",
"addressRegion": "山东省",
"addressLocality": "青岛市",
"streetAddress": "市南区",
"postalCode": "266000"
},
"foundingDate": "2025"
})]验证和测试
在线验证工具
- Google 结构化数据测试: https://search.google.com/test/rich-results
- Baidu 站长平台: https://ziyuan.baidu.com/
- RSS 验证: https://validator.w3.org/feed/
本地测试命令
bash
# 进入营销站目录
cd /home/ihgoo/project/zu/marketing
# 安装依赖(首次)
npm install
# 本地开发
npm run dev
# 构建生产版本
npm run build
# 预览构建结果
npm run preview
# 验证 SSL 证书监控脚本
./scripts/ssl-renew-check.sh
# 检查 RSS feed
cat docs/public/feed.xml
# 测试 robots.txt
cat docs/public/robots.txt常见问题
RSS feed 未更新
解决方案:
- 确保博客文章 frontmatter 包含
date字段 - 检查文章是否设置为草稿(
draft: true) - 重新构建网站:
npm run build - 清除浏览器缓存后重试
结构化数据未显示
解决方案:
- 在浏览器中查看页面源代码
- 搜索
application/ld+json确认是否存在 - 使用 Google 结构化数据测试工具验证
- 检查 JSON 格式是否正确
404 页面未生效
解决方案:
- 确认
NotFound.vue文件存在 - 检查
theme/index.js中是否正确注册 - 重新构建网站
- 访问一个不存在的页面测试(如
/test-404)
SSL 证书告警未发送
解决方案:
- 检查脚本中的邮箱配置是否正确
- 确认系统已安装邮件服务(mailutils 或 mailx)
- 测试邮件发送:
echo "test" | mail -s "test" your-email@example.com - 检查 Cron 日志:
sudo grep CRON /var/log/syslog
SEO 最佳实践
内容优化
标题优化
- 标题长度:50-60 个字符
- 包含关键词
- 独特且描述性强
描述优化
- 长度:150-160 个字符
- 包含关键词和行动号召
- 准确描述页面内容
关键词优化
- 在标题、描述、正文中自然使用
- 避免关键词堆砌
- 使用长尾关键词
技术优化
页面速度
- 优化图片大小和格式
- 启用 gzip 压缩
- 使用 CDN 加速
移动优化
- 响应式设计
- 移动端友好测试
- 触摸目标大小合理
网站结构
- 清晰的导航层次
- 面包屑导航
- 内部链接网络
监控和分析
收录监控
- 定期检查搜索引擎收录情况
- 提交 sitemap 到百度站长平台
- 使用 site: 命令检查索引
排名监控
- 跟踪关键词排名
- 分析竞争对手
- 调整 SEO 策略
流量分析
- 配置 Google Analytics
- 配置百度统计
- 分析用户行为数据
联系和支持
如有 SEO 相关问题或需要进一步优化,请参考:
- 详细任务文档:
/marketing/docs/seo-tasks-completion.md - RSS 配置文档:
/marketing/docs/rss-feed.md - SSL 监控文档:
/marketing/scripts/ssl-cron-setup.md - VitePress 官方文档: https://vitepress.dev/
最后更新: 2026 年 4 月 14 日 维护者: fullstack-developer Agent