Communitygithub.com

YepAPI/skills

MDX 博客搭建、RSS 订阅源生成、sitemap.xml、结构化数据/JSON-LD 以及相关文章。

skills 是什么?

该技能为 AI 代理提供了一个完整的博客引擎配置方案,特别适用于 Next.js 项目。它规定了使用 MDX 格式管理博客内容,通过前端元数据(frontmatter)定义标题、描述、发布日期等关键信息。技能自动生成 RSS 订阅源(/rss.xml)、站点地图(sitemap.xml)以及 JSON-LD 结构化数据(Article 模式),从而优化 SEO 效果。此外,它还能基于标签匹配自动推荐相关文章,根据 H2/H3 标题生成文章目录,并实现分页导航。该技能显著提升了博客的可发现性、可访问性和用户体验,避免了常见 SEO 陷阱,如缺失发布日期或跳过 JSON-LD 导致失去富片段资格。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/YepAPI/skills/tree/HEAD/skills/blog-engine

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

博客引擎

规则

  • MDX 内容:content/blog/[slug].mdx —— 包含标题、描述、publishedAt、updatedAt、标签、图片等前端元数据
  • 动态路由:app/blog/[slug]/page.tsx —— 构建时获取 MDX,根据文件系统生成静态参数
  • RSS 订阅源:在 /rss.xml 生成 feed.xml —— 每篇文章包含标题、描述、pubDate、链接、guid —— 构建时重新生成
  • 站点地图:生成 sitemap.xml,包含所有博客 URL、最后修改日期、更改频率 —— 提交至 Google Search Console
  • JSON-LD 结构化数据:每篇文章使用 Article 模式 —— 包含 headline、datePublished、dateModified、author、image、publisher
  • 相关文章:基于标签匹配 —— 查找共享 2 个以上标签的文章,若无则退而取最新文章 —— 显示 3 篇相关文章
  • 目录:从 MDX 中的 H2/H3 标题自动生成 —— 在桌面上以粘性侧边栏形式渲染
  • 分页:每页 10 篇文章,路径为 /blog/page/[num] —— 包含上一页/下一页链接以优化 SEO

前端元数据格式

title: "文章标题"
description: "不超过160个字符的元描述"
publishedAt: "2025-01-15"
updatedAt: "2025-02-01"
tags: ["nextjs", "react"]
image: "/blog/post-title/cover.jpg"
author: "作者姓名"

RSS 订阅源模式

从 API 路由提供或在构建时生成。必需字段:<title>、<link>、<description>,每篇文章包含 <item>,其中有 <guid>、<pubDate>。

避免

  • 前端元数据中缺少 publishedAt —— 会破坏 RSS 和排序
  • 不提交站点地图 —— Google 无法快速发现新文章
  • 跳过 JSON-LD —— 会失去富片段资格
  • 硬编码相关文章 —— 应使用标签匹配以实现自动相关性

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

YepAPI/skills

WCAG 2.1 AA — semantic HTML, keyboard navigation, screen readers.

YepAPI/skills

Experiment setup, variant splitting, statistical significance, and feature flag integration.

YepAPI/skills

CRUD generators, data tables, user management, role-based access, and bulk operations.

YepAPI/skills

Monitor what ChatGPT and Gemini say about your brand using YepAPI.

YepAPI/skills

Queue workers with BullMQ/Inngest/Trigger.dev, job retries, dead letter queues, concurrency.

YepAPI/skills

Commander.js, interactive prompts with Clack, spinners, colors, config files, exit codes, and npm publishing.

YepAPI/skills

cmdk integration, Cmd+K trigger, fuzzy search, grouped actions, keyboard navigation, and dynamic action registration.

YepAPI/skills

Content planning with trend and sentiment data from YepAPI.

YepAPI/skills

Content calendar, keyword-driven planning, and content briefs.

YepAPI/skills

Theme switching with CSS variables, system preference detection, next-themes, and persistence.

YepAPI/skills

Threaded comments, @mentions, reactions, moderation queue, optimistic UI, and cursor pagination.

YepAPI/skills

Competitive analysis between domains using YepAPI.

YepAPI/skills

Layout grids, KPI cards, data tables with sorting/filtering, sidebar navigation, and responsive breakpoints.

YepAPI/skills

Data encryption — TLS everywhere, AES-256-GCM for PII, bcrypt passwords, encrypted backups.

YepAPI/skills

Chart patterns with Recharts/Nivo/D3, responsive containers, color scales, and accessibility.

YepAPI/skills

Drizzle schema definition, push vs migrate, type-safe queries, relations, transactions, and prepared statements.

YepAPI/skills

Upload handling, resize/compress, CDN delivery, blur placeholders, and next/image patterns.

YepAPI/skills

Local business and Google Maps research using YepAPI.

YepAPI/skills

Cursor-based pagination, IntersectionObserver, virtualized lists with @tanstack/react-virtual, and scroll position restoration.

YepAPI/skills

Chat UI components, streaming responses with AI SDK, context window management, and RAG patterns.

相关技能