npx skills add https://github.com/mindrally/skills --skill ghost您是一位精通 Ghost CMS 主题开发、Handlebars 模板引擎和现代前端技术的专家。
theme/
├── assets/
│ ├── css/
│ │ └── screen.css
│ ├── js/
│ │ └── main.js
│ └── images/
├── partials/
│ ├── header.hbs
│ ├── footer.hbs
│ └── post-card.hbs
├── default.hbs
├── index.hbs
├── post.hbs
├── page.hbs
├── tag.hbs
├── author.hbs
├── error.hbs
└── package.json
{{!< default}}
<main class="site-content">
{{#foreach posts}}
{{> post-card}}
{{/foreach}}
{{pagination}}
</main>
<!DOCTYPE html>
<html lang="{{@site.locale}}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{meta_title}}</title>
{{ghost_head}}
<link rel="stylesheet" href="{{asset "css/screen.css"}}">
</head>
<body class="{{body_class}}">
{{> header}}
{{{body}}}
{{> footer}}
{{ghost_foot}}
<script src="{{asset "js/main.js"}}"></script>
</body>
</html>
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
{{!-- partials/post-card.hbs --}}
<article class="post-card {{post_class}}">
{{#if feature_image}}
<a href="{{url}}" class="post-card-image-link">
<img
class="post-card-image"
src="{{img_url feature_image size="m"}}"
alt="{{title}}"
loading="lazy"
>
</a>
{{/if}}
<div class="post-card-content">
<h2 class="post-card-title">
<a href="{{url}}">{{title}}</a>
</h2>
{{#if excerpt}}
<p class="post-card-excerpt">{{excerpt words="30"}}</p>
{{/if}}
<footer class="post-card-meta">
<time datetime="{{date format="YYYY-MM-DD"}}">
{{date format="D MMM YYYY"}}
</time>
<span class="reading-time">{{reading_time}}</span>
</footer>
</div>
</article>
{{!-- 文章内容 --}}
{{content}}
{{!-- 带字数限制的摘要 --}}
{{excerpt words="50"}}
{{!-- 阅读时间 --}}
{{reading_time}}
{{!-- 带响应式尺寸的特色图片 --}}
{{img_url feature_image size="l"}}
{{!-- 日期格式化 --}}
{{date format="MMMM D, YYYY"}}
{{#is "home"}}
{{!-- 首页内容 --}}
{{/is}}
{{#is "post"}}
{{!-- 单篇文章内容 --}}
{{/is}}
{{#has tag="featured"}}
<span class="featured-badge">精选</span>
{{/has}}
{{#if @member}}
<p>欢迎,{{@member.name}}!</p>
{{/if}}
{{#foreach posts}}
{{!-- 访问循环变量 --}}
{{#if @first}}<div class="first-post">{{/if}}
{{> post-card}}
{{#if @first}}</div>{{/if}}
{{/foreach}}
{{!-- 获取带有特定标签的文章 --}}
{{#get "posts" filter="tag:featured" limit="3"}}
{{#foreach posts}}
{{> post-card}}
{{/foreach}}
{{/get}}
// tailwind.config.js
module.exports = {
content: ['./**/*.hbs'],
theme: {
extend: {
colors: {
ghost: {
accent: 'var(--ghost-accent-color)',
},
},
},
},
};
:root {
--ghost-accent-color: {{@site.accent_color}};
}
.accent-bg {
background-color: var(--ghost-accent-color);
}
<div x-data="{ open: false }">
<button @click="open = !open">切换菜单</button>
<nav x-show="open" x-transition>
{{navigation}}
</nav>
</div>
{{#if @member}}
{{#if @member.paid}}
{{!-- 付费会员内容 --}}
{{content}}
{{else}}
{{!-- 免费会员内容 --}}
<p>升级以访问高级内容</p>
{{/if}}
{{else}}
{{!-- 公开内容 --}}
<a href="#/portal/signup">订阅</a>
{{/if}}
<head>
{{!-- Ghost 通过 ghost_head 处理元数据 --}}
{{ghost_head}}
{{!-- 自定义结构化数据 --}}
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Blog",
"name": "{{@site.title}}",
"url": "{{@site.url}}"
}
</script>
</head>
{{!-- 响应式图片 --}}
<img
srcset="
{{img_url feature_image size="s"}} 300w,
{{img_url feature_image size="m"}} 600w,
{{img_url feature_image size="l"}} 1000w
"
sizes="(max-width: 600px) 300px, (max-width: 1000px) 600px, 1000px"
src="{{img_url feature_image size="m"}}"
alt="{{title}}"
loading="lazy"
>
{
"name": "theme-name",
"version": "1.0.0",
"engines": {
"ghost": ">=5.0.0"
},
"config": {
"posts_per_page": 10,
"image_sizes": {
"s": { "width": 300 },
"m": { "width": 600 },
"l": { "width": 1000 },
"xl": { "width": 2000 }
}
}
}
每周安装数
101
代码仓库
GitHub 星标数
43
首次出现
2026年1月25日
安全审计
安装于
gemini-cli85
opencode85
codex78
cursor77
claude-code75
github-copilot74
You are an expert in Ghost CMS theme development, Handlebars templating, and modern frontend technologies.
theme/
├── assets/
│ ├── css/
│ │ └── screen.css
│ ├── js/
│ │ └── main.js
│ └── images/
├── partials/
│ ├── header.hbs
│ ├── footer.hbs
│ └── post-card.hbs
├── default.hbs
├── index.hbs
├── post.hbs
├── page.hbs
├── tag.hbs
├── author.hbs
├── error.hbs
└── package.json
{{!< default}}
<main class="site-content">
{{#foreach posts}}
{{> post-card}}
{{/foreach}}
{{pagination}}
</main>
<!DOCTYPE html>
<html lang="{{@site.locale}}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{meta_title}}</title>
{{ghost_head}}
<link rel="stylesheet" href="{{asset "css/screen.css"}}">
</head>
<body class="{{body_class}}">
{{> header}}
{{{body}}}
{{> footer}}
{{ghost_foot}}
<script src="{{asset "js/main.js"}}"></script>
</body>
</html>
{{!-- partials/post-card.hbs --}}
<article class="post-card {{post_class}}">
{{#if feature_image}}
<a href="{{url}}" class="post-card-image-link">
<img
class="post-card-image"
src="{{img_url feature_image size="m"}}"
alt="{{title}}"
loading="lazy"
>
</a>
{{/if}}
<div class="post-card-content">
<h2 class="post-card-title">
<a href="{{url}}">{{title}}</a>
</h2>
{{#if excerpt}}
<p class="post-card-excerpt">{{excerpt words="30"}}</p>
{{/if}}
<footer class="post-card-meta">
<time datetime="{{date format="YYYY-MM-DD"}}">
{{date format="D MMM YYYY"}}
</time>
<span class="reading-time">{{reading_time}}</span>
</footer>
</div>
</article>
{{!-- Post content --}}
{{content}}
{{!-- Excerpt with word limit --}}
{{excerpt words="50"}}
{{!-- Reading time --}}
{{reading_time}}
{{!-- Featured image with responsive sizes --}}
{{img_url feature_image size="l"}}
{{!-- Date formatting --}}
{{date format="MMMM D, YYYY"}}
{{#is "home"}}
{{!-- Home page content --}}
{{/is}}
{{#is "post"}}
{{!-- Single post content --}}
{{/is}}
{{#has tag="featured"}}
<span class="featured-badge">Featured</span>
{{/has}}
{{#if @member}}
<p>Welcome, {{@member.name}}!</p>
{{/if}}
{{#foreach posts}}
{{!-- Access loop variables --}}
{{#if @first}}<div class="first-post">{{/if}}
{{> post-card}}
{{#if @first}}</div>{{/if}}
{{/foreach}}
{{!-- Get posts with specific tag --}}
{{#get "posts" filter="tag:featured" limit="3"}}
{{#foreach posts}}
{{> post-card}}
{{/foreach}}
{{/get}}
// tailwind.config.js
module.exports = {
content: ['./**/*.hbs'],
theme: {
extend: {
colors: {
ghost: {
accent: 'var(--ghost-accent-color)',
},
},
},
},
};
:root {
--ghost-accent-color: {{@site.accent_color}};
}
.accent-bg {
background-color: var(--ghost-accent-color);
}
<div x-data="{ open: false }">
<button @click="open = !open">Toggle Menu</button>
<nav x-show="open" x-transition>
{{navigation}}
</nav>
</div>
{{#if @member}}
{{#if @member.paid}}
{{!-- Premium content --}}
{{content}}
{{else}}
{{!-- Free member content --}}
<p>Upgrade to access premium content</p>
{{/if}}
{{else}}
{{!-- Public content --}}
<a href="#/portal/signup">Subscribe</a>
{{/if}}
<head>
{{!-- Ghost handles meta via ghost_head --}}
{{ghost_head}}
{{!-- Custom structured data --}}
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Blog",
"name": "{{@site.title}}",
"url": "{{@site.url}}"
}
</script>
</head>
{{!-- Responsive images --}}
<img
srcset="
{{img_url feature_image size="s"}} 300w,
{{img_url feature_image size="m"}} 600w,
{{img_url feature_image size="l"}} 1000w
"
sizes="(max-width: 600px) 300px, (max-width: 1000px) 600px, 1000px"
src="{{img_url feature_image size="m"}}"
alt="{{title}}"
loading="lazy"
>
{
"name": "theme-name",
"version": "1.0.0",
"engines": {
"ghost": ">=5.0.0"
},
"config": {
"posts_per_page": 10,
"image_sizes": {
"s": { "width": 300 },
"m": { "width": 600 },
"l": { "width": 1000 },
"xl": { "width": 2000 }
}
}
}
Weekly Installs
101
Repository
GitHub Stars
43
First Seen
Jan 25, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
gemini-cli85
opencode85
codex78
cursor77
claude-code75
github-copilot74
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
116,600 周安装