Files
BrunoGao a29b6b6c65 feat: Implement file-based markdown content management system
- Add Vite import.meta.glob based content loader for efficient markdown processing
- Create separate content directories (blog, articles, docs) under src/content/
- Implement unified content data adapter with type safety
- Add 404 error page with navigation back functionality
- Fix blog and articles routing to support both content types
- Add comprehensive markdown files with frontmatter metadata
- Support for AI-friendly content structure for future translation/summarization
- Replace HTTP-based markdown loading with build-time static analysis
- Maintain backward compatibility with existing BlogPost interfaces

Benefits:
- Individual markdown file maintenance for easier AI processing
- High-performance content loading with Vite's native capabilities
- Type-safe content handling with comprehensive interfaces
- Proper separation of blog posts and technical articles
- Enhanced user experience with proper 404 handling
2025-10-02 19:53:48 +08:00
..

OmniVerse 内容管理指南

本目录包含网站的所有markdown内容文件,包括博客文章、技术文档和文章。

目录结构

content/
├── blog/           # 博客文章
├── docs/           # 技术文档
├── articles/       # 深度文章
└── README.md       # 本文件

内容类型

📝 博客文章 (content/blog/)

博客文章用于分享技术洞察、产品更新、行业动态等。

文件命名规范:

  • 使用kebab-case格式:ai-elderly-health-monitoring.md
  • 文件名应该简洁且具有描述性
  • 避免使用日期前缀

Front Matter 字段:

---
id: ai-elderly-health-monitoring           # 必填:唯一标识符
category: AI Health                        # 必填:分类
title: AI如何革新老年人健康监护体系          # 必填:标题
excerpt: 深入探讨人工智能技术...           # 必填:摘要
author: 张明博士                          # 必填:作者
authorTitle: AI健康技术专家                # 可选:作者职位
authorAvatar: https://...                  # 可选:作者头像
date: 2024-12-01                          # 必填:发布日期
readTime: 8分钟                           # 可选:阅读时间
image: https://...                        # 必填:封面图片
tags:                                     # 可选:标签列表
  - AI
  - 健康监护
  - 老年人护理
likes: 156                                # 可选:点赞数
comments: 24                              # 可选:评论数
trending: true                            # 可选:是否热门
relatedPosts:                             # 可选:相关文章
  - wearable-tech-revolution
  - smart-health-data-platform
---

📚 技术文档 (content/docs/)

技术文档用于产品使用指南、API文档、开发教程等。

Front Matter 字段:

---
id: getting-started                       # 必填:唯一标识符
title: 快速开始                           # 必填:标题
category: 基础教程                        # 必填:分类
description: 快速了解如何使用OmniVerse...   # 必填:描述
order: 1                                  # 必填:排序序号
lastUpdated: 2024-12-01                   # 必填:最后更新时间
tags:                                     # 可选:标签
  - 入门
  - 基础
---

📄 深度文章 (content/articles/)

深度文章用于行业分析、技术深度解读、白皮书等长篇内容。

Front Matter 字段:

---
id: health-tech-trends-2024               # 必填:唯一标识符
title: 2024年健康科技发展趋势              # 必填:标题
category: 行业分析                        # 必填:分类
excerpt: 深度分析2024年健康科技领域...      # 必填:摘要
author: 陈研究员                          # 必填:作者
date: 2024-11-20                         # 必填:发布日期
readTime: 12分钟                         # 可选:阅读时间
image: https://...                       # 必填:封面图片
tags:                                    # 可选:标签
  - 行业趋势
  - 健康科技
---

添加新内容

1. 创建新的博客文章

# 1. 创建新文件
touch content/blog/my-new-blog-post.md

# 2. 编辑文件,添加Front Matter和内容
# 3. 提交到git
git add content/blog/my-new-blog-post.md
git commit -m "feat: add new blog post about ..."

2. 创建新的技术文档

# 1. 创建新文件
touch content/docs/new-feature-guide.md

# 2. 编辑文件,记住设置order字段
# 3. 提交到git
git add content/docs/new-feature-guide.md
git commit -m "docs: add guide for new feature"

3. 创建新的文章

# 1. 创建新文件
touch content/articles/industry-analysis-2024.md

# 2. 编辑文件,添加详细内容
# 3. 提交到git
git add content/articles/industry-analysis-2024.md
git commit -m "feat: add industry analysis article"

内容编写指南

Markdown 语法

支持标准的Markdown语法,包括:

  • 标题:使用 # 到 ######
  • 段落:空行分隔
  • 列表:使用 - 或 1.
  • 链接:[文本](URL)
  • 图片:![alt text](URL)
  • 代码块:使用 ``` 包围
  • 表格:使用 | 分隔列

代码块示例

// JavaScript代码示例
const api = new OmniVerseAPI({
  apiKey: 'your-api-key'
});

const data = await api.getHealthData();
# Python代码示例
from omniverse import OmniVerseClient

client = OmniVerseClient(api_key='your-key')
data = client.get_health_data()

图片使用

  • 使用高质量的图片(推荐1200x600像素)
  • 优先使用Unsplash等免费图片库
  • 确保图片与内容相关
  • 添加合适的alt文本

内部链接

  • 博客文章:/blog/post-slug
  • 技术文档:/docs/doc-slug
  • 文章:/article/article-slug

分类指南

博客分类

  • AI Health: AI在健康领域的应用
  • Wearable Tech: 可穿戴设备技术
  • Data Platform: 数据平台和分析
  • Care Robotics: 护理机器人
  • Industry News: 行业新闻和动态

文档分类

  • 基础教程: 入门和基础概念
  • 开发者文档: API和SDK文档
  • 高级功能: 深入功能指南
  • 故障排除: 问题解决方案
  • 最佳实践: 推荐做法和案例

文章分类

  • 行业分析: 市场和趋势分析
  • 技术分析: 深度技术解读
  • 案例研究: 实际应用案例
  • 白皮书: 深度研究报告

标签规范

使用一致的标签有助于内容组织和搜索:

技术标签:

  • AI, 机器学习, 深度学习
  • 可穿戴设备, 智能硬件
  • 大数据, 数据分析, 云计算
  • API, SDK, 开发者

应用标签:

  • 健康监测, 医疗诊断, 预防医学
  • 老年人护理, 居家护理
  • 运动健身, 睡眠监测

行业标签:

  • 数字医疗, 智慧医疗, 精准医疗
  • 医疗器械, 健康管理
  • 行业趋势, 市场分析

提交规范

Commit Message 格式

type: description

type可以是:
- feat: 新增内容
- docs: 文档更新
- fix: 修复内容错误
- update: 更新现有内容
- remove: 删除内容

示例

# 新增博客文章
git commit -m "feat: add blog post about AI healthcare trends"

# 更新文档
git commit -m "docs: update API reference with new endpoints"

# 修复内容错误
git commit -m "fix: correct technical details in wearable tech article"

内容审核

在发布内容前,请确保:

  1. 内容质量

    • 语法正确,无错别字
    • 逻辑清晰,结构合理
    • 技术信息准确
  2. 格式规范

    • Front Matter字段完整
    • Markdown语法正确
    • 图片和链接有效
  3. SEO优化

    • 标题具有描述性
    • 摘要吸引人
    • 标签相关且准确

常见问题

Q: 如何预览内容效果?

A: 运行开发服务器 npm run dev,内容会自动加载显示。

Q: 可以使用HTML标签吗?

A: 可以在Markdown中使用HTML标签,但建议优先使用Markdown语法。

Q: 如何添加目录?

A: 系统会自动根据标题生成目录,无需手动添加。

Q: 图片应该存放在哪里?

A: 建议使用CDN或图片托管服务,在markdown中引用URL。

Q: 如何处理敏感信息?

A: 不要在内容中包含API密钥、密码等敏感信息。


如有任何问题,请联系技术团队或查阅项目文档。