Eleventy启动器

eleventy-starter-ghost — Eleventy 启动器模板

作者 shivanshu814

基于 Eleventy 与 Ghost 的静态站点启动器,通过 Ghost Content API 拉取内容并在构建时生成纯静态页面。

看看你的网站会是什么样

浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。

3 个预览视图
桌面端首页1 / 3
桌面端截图首屏预览

由服务器浏览器实际访问页面后截取。

全部页面与视图 3

截图用于了解视觉与布局,交互效果请以实际项目为准。

采集于 2026-10-02查看来源

值得关注的模板亮点

从已有项目资料中,快速了解它的特点。

01

Eleventy 构建纯静态页面,内容通过 Ghost Content API 在构建时获取

02

默认连接 Ghost 官方演示站点,配置 .env 中的 contentApiKey 后可切换为自己的 Ghost 实例

03

内置 netlify.toml、headers.njk、redirects.njk 三个 Netlify 部署相关配置

04

支持通过 Ghost 与 Netlify 集成,用 deploy hook 在内容变更时触发重新构建

05

可在 Ghost 中开启站点私有化,关闭默认主题前端并输出 noindex,由 Eleventy 前端承担 SEO

模板详细介绍

这是一个用于构建完全静态网站的启动器模板,内容来源为 Ghost(作为无头 CMS),页面生成由 Eleventy 完成。默认情况下,模板会从 Ghost 官方提供的默认站点(eleventy.ghost.io)读取内容,因此无需自建 Ghost 即可先跑通流程;要接入自己的内容,需要在 .env 配置文件中填入 Ghost 的 Content API 凭据,其中 contentApiKey 可在 Ghost 后台的 Integrations 页面获取。README 说明使用该启动器需要 Ghost 版本不低于 2.10.0。

仓库内包含三个面向 Netlify 的配置文件:netlify.toml 用于构建设置,headers.njk 生成默认安全响应头(输出到 /_headers),redirects.njk 用于自定义域名重定向(输出到 /_redirects)。部署后可通过 Ghost 与 Netlify 的集成,用 Ghost 的 deploy hook 触发 Netlify 重新构建,使 Ghost 中的数据变更同步到静态站点。

模板还提供一项优化选项:在 Ghost 设置中开启“Make this site private”,可停用 Ghost 默认的 Handlebars 主题前端,并加上 noindex 元标签,让 Eleventy 生成的前端成为对外唯一入口。本地开发使用 yarn start,构建使用 yarn build。代码以 MIT 许可发布,版权归 Ghost Foundation。

Eleventy启动器

适合你的项目吗?

适用场景

  • 用 Ghost 作为内容后台、对外输出纯静态站点的博客或内容站
  • 把现有 Ghost 内容以静态方式部署到 Netlify
  • 需要自定义安全响应头与重定向规则的静态站点
  • 希望内容编辑在 Ghost 完成、发布流程走静态构建的团队

适合人群

  • 熟悉 Eleventy 与 Node 构建流程的开发者
  • 已使用或计划使用 Ghost 作为无头 CMS 的站点
  • 打算部署到 Netlify 并需要构建与重定向配置的项目
  • 需要 MIT 许可下可自由修改的静态站点起步代码

上手与定制指南

结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。

  1. 1

    克隆仓库后执行 yarn 安装依赖,yarn start 启动开发服务器,yarn build 本地构建

  2. 2

    在 .env 中填写自己的 Ghost 凭据,contentApiKey 从 Ghost 后台 Integrations 页面获取

  3. 3

    使用自建 Ghost 时版本需不低于 2.10.0

  4. 4

    部署到 Netlify 可使用仓库中的部署按钮,或按 netlify.toml 配置构建

  5. 5

    若不希望提交 Content API Key,可移除 .env 中的该项并改用 Netlify 环境变量

查看仓库使用说明

授权与来源资料

使用条件与限制

免费使用 · 保留许可声明

本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。

使用时需要遵守

  • 允许免费使用、修改、商用和分发该版本代码。
  • 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
  • 代码按现状提供;担保与责任限制以原许可证及适用法律为准。

额外费用与待核对事项

  • 默认从 Ghost 官方演示站点 https://eleventy.ghost.io 拉取内容,需联网访问该外部服务才能跑通默认流程。
  • 接入自有内容需自建或已有 Ghost 实例,并在 .env 中填写凭据;contentApiKey 须在 Ghost 后台 Integrations 页面获取。
  • 使用自建 Ghost 时版本不得低于 2.10.0,否则可能出现问题。
  • 部署流程依赖 Netlify 账号与平台服务,需注册并授权 Netlify。
  • 自动重建需额外配置 Ghost 与 Netlify 的集成及 deploy hook,属于外部服务配置。
  • 启用该优化需在 Ghost 设置中开启“Make this site private”标志,会启用密码保护并输出 noindex。
  • 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
  • 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
查看原文依据

Permission is hereby granted, free of charge

许可证原文

By default, the starter will populate content from a default Ghost install located at https://eleventy.ghost.io.

README 原文

To use your own install, edit the `.env` config file with your credentials. You can find your `contentApiKey` in the "Integrations" screen in Ghost Admin.

README 原文

The minimum required version for Ghost is `2.10.0` in order to use this starter without issues.

README 原文

To deploy to your Netlify account, hit the button below.

README 原文

you can set up a [Ghost + Netlify Integration](https://docs.ghost.org/integrations/netlify/) to use deploy hooks from Ghost to trigger Netlify rebuilds

README 原文

You can disable the default Ghost Handlebars Theme front-end by enabling the `Make this site private` flag within your Ghost settings.

README 原文
https://github.com/shivanshu814/eleventy-starter-ghost/blob/main/LICENSEhttps://github.com/shivanshu814/eleventy-starter-ghost/blob/main/README.md

DeepSeek 根据仓库许可证和 README 整理 ·2026-10-02。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。

项目核对记录与介绍依据

模板资料

来源平台
GitHub
资料与维护参考分
资料较完整 · 83 / 100
技术栈
Eleventy
网站类型
启动器
这个分数如何计算

本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。

这个项目需要核对什么

记录的仓库更新时间
2025-12-18
截图检查日期
2026-10-02

已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。

目录记录的主要技术栈是 Eleventy。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。

查看具体选型方法 →

介绍的制作与核对状态

介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。

已完成服务器许可规则与 AI 来源核对;未经过人工编辑审核。

查看当时使用的来源资料

SHA-256: 43639da60cfca92a5e8985a3b56b51353b61c600bb83d1958bbcc7219dd0cb82

2026-10-02T11:15:57.316Z

来源文件 / 仓库
# Eleventy Starter Ghost

A starter template to build completely static websites with [Ghost](https://ghost.org) & [Eleventy](https://www.11ty.io)

**Demo:** https://eleventy.ghost.org

![screenshot](https://user-images.githubusercontent.com/1177460/61880744-5b138980-aeed-11e9-9d8e-07c0b3c03cc5.png)

# Installing

```bash
# From Source
git clone https://github.com/TryGhost/eleventy-starter-ghost.git
cd eleventy-starter-ghost
```

Then install dependencies

```bash
yarn
```

# Running

Start the development server

```bash
yarn start
```

You now have a completely static site pulling content from Ghost running as a headless CMS.

By default, the starter will populate content from a default Ghost install located at https://eleventy.ghost.io.

To use your own install, edit the `.env` config file with your credentials. You can find your `contentApiKey` in the "Integrations" screen in Ghost Admin. The minimum required version for Ghost is `2.10.0` in order to use this starter without issues.

# Deploying with Netlify

The starter contains three config files specifically for deploying with Netlify. A `netlify.toml` file for build settings, a `headers.njk` file with default security headers set for all routes (builds to `/_headers` path), and `redirects.njk` to set Netlify custom domain redirects (builds to `/_redirects` path).

To deploy to your Netlify account, hit the button below.

[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/TryGhost/eleventy-starter-ghost)

Content API Keys are generally not considered to be sensitive information, they exist so that they can be changed in the event of abuse; so most people commit it directly to their `.env` config file. If you prefer to keep this information out of your repository you can remove this config and set [Netlify ENV variables](https://www.netlify.com/docs/continuous-deployment/#build-environment-variables) for production builds instead.

Once deployed, you can set up a [Ghost + Netlify Integration](https://docs.ghost.org/integrations/netlify/) to use deploy hooks from Ghost to trigger Netlify rebuilds. That way, any time data changes in Ghost, your site will rebuild on Netlify.

# Optimising

You can disable the default Ghost Handlebars Theme front-end by enabling the `Make this site private` flag within your Ghost settings. This enables password protection in front of the Ghost install and sets `<meta name="robots" content="noindex" />` so your Eleventy front-end becomes the source of truth for SEO.

# Extra options

```bash
# Build the site locally
yarn build
```

# Copyright & License

Copyright (c) 2013-2022 Ghost Foundation - Released under the [MIT license](LICENSE).
反馈内容错误

看看同类模板

对比同技术栈与用途的模板,找到更适合的视觉与内容结构。