Communitygithub.com

YepAPI/skills

MDX 部落格設定、RSS 摘要產生、sitemap.xml、結構化資料/JSON-LD 以及相關文章。

skills 是什麼?

這個技能提供了一套完整的部落格引擎實作方案,專為使用 MDX 作為內容格式的靜態網站(如 Next.js)設計。它會自動從 `content/blog/[slug].mdx` 路徑讀取文章,並根據前置資料(frontmatter)中的標題、描述、發布時間、標籤等資訊,在構建時生成動態路由、RSS 摘要(feed.xml)、Sitemap(sitemap.xml)以及 JSON-LD 結構化資料(Article schema),幫助提升 SEO 和社群媒體曝光。此外,技能還包含基於標籤比對的相關文章推薦(顯示 3 篇)、從 H2/H3 標題自動生成的文章目錄(桌面端可作為黏性側邊欄),以及每頁 10 篇文章的分頁功能,支援上一頁/下一頁連結。此技能主要適用於 Next.js / React 生態系的開發者,可以在 Claude Code、Cursor 或 Codex 等 AI 編碼代理中直接套用,加速部落格功能的開發。

相容平台~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 — 前置資料須包含 title、description、publishedAt、updatedAt、tags、image
  • 動態路由:app/blog/[slug]/page.tsx — 在構建時擷取 MDX,並從檔案系統生成靜態參數
  • RSS 摘要:在 /rss.xml 產生 feed.xml — 每篇文章需包含 title、description、pubDate、link、guid — 每次構建時重新生成
  • Sitemap:產生 sitemap.xml,包含所有部落格 URL、最後修改日期、更新頻率 — 提交至 Google Search Console
  • JSON-LD 結構化資料:每篇文章使用 Article schema — 包含 headline、datePublished、dateModified、author、image、publisher
  • 相關文章:根據標籤比對 — 尋找共 2 個以上相同標籤的文章,若無則回退至最新文章 — 顯示 3 篇相關文章
  • 目錄:從 MDX 中的 H2/H3 標題自動生成 — 在桌面端呈現為黏性側邊欄
  • 分頁:每頁 10 篇文章,路徑為 /blog/page/[num] — 包含上一頁/下一頁連結以利 SEO

前置資料結構

title: "文章標題"
description: "不超過 160 個字元的 Meta 描述"
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 和排序功能失效
  • 未提交 Sitemap — 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.

相關技能