把多个平台上的写作内容汇总到同一个内容页展示
gatsby-starter-all-content — Gatsby 启动器模板
作者 dillionmegida
一个 Gatsby 启动器,把分散在多个平台上的写作内容集中到一个内容页展示,同时保留站内博客页面。
看看你的网站会是什么样
浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。
全部页面与视图 3
截图用于了解视觉与布局,交互效果请以实际项目为准。
值得关注的模板亮点
从已有项目资料中,快速了解它的特点。
内容数据与博客数据分目录存放:data/content 与 data/blog
平台内容以平台名命名的 .yml 文件维护,条目包含标题、链接和标签
新增平台需同步添加 yml 文件、GraphQL 查询并注册到 allContent 数组
使用 react-masonry-css 实现瀑布流网格,use-media 按屏幕宽度调整列数
模板详细介绍
这个模板来自 dillionmegida 的个人网站内容页,目标是把你在不同平台(如 Hashnode)上写过的内容汇总到一个页面中展示。仓库同时包含博客页和内容页两个页面,初始数据均为演示内容。
内容数据放在两个目录:data/blog 存放站内博客文章,data/content 存放其他平台的内容,后者按平台命名并以 .yml 扩展名保存,每个文件包含平台名称、平台链接以及由标题、链接、标签组成的条目数组。新增平台需要三步:添加对应的 yml 文件、在 src/pages/content 中增加对应的 GraphQL 查询、把该查询结果加入 Content 组件里的 allContent 数组;数组顺序决定内容网格中平台的展示顺序。
布局方面,内容网格使用 react-masonry-css 实现瀑布流,并用 use-media 根据屏幕宽度调整列数。README 还提供了配套的视频讲解链接。
适合你的项目吗?
适用场景
- 个人站点需要一个集中展示各平台写作内容的页面
- 把 Hashnode 等平台的文章按平台分组陈列并附上标签
- 在 Gatsby 站点中同时维护站内博客与外部平台内容索引
适合人群
- 使用 Gatsby 搭建个人网站并希望汇总多平台内容的开发者
- 愿意通过编辑 YAML 文件和 GraphQL 查询来维护内容清单的人
- 需要按平台分组、以网格形式展示内容链接的个人站点
上手与定制指南
结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。
- 1
使用 gatsby new YOUR-WEBSITE https://github.com/dillionmegida/gatsby-starter-all-content 创建项目,再执行 gatsby develop 启动本地服务
- 2
初始的博客页与内容页均为演示数据,需替换 data/blog 与 data/content 中的内容
- 3
新增平台时需在 data/content 添加同名 yml 文件,并在 src/pages/content 中补充 GraphQL 查询和 allContent 数组项
- 4
平台在内容网格中的显示顺序由 allContent 数组的顺序决定
授权与来源资料
使用条件与限制
免费使用 · 保留许可声明本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。
使用时需要遵守
- 允许免费使用、修改、商用和分发该版本代码。
- 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
- 代码按现状提供;担保与责任限制以原许可证及适用法律为准。
额外费用与待核对事项
- 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
- 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
查看原文依据
https://github.com/dillionmegida/gatsby-starter-all-content/blob/main/LICENSEhttps://github.com/dillionmegida/gatsby-starter-all-content/blob/main/README.mdPermission is hereby granted, free of charge
许可证原文
DeepSeek 根据仓库许可证和 README 整理 ·2026-10-02。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。
项目核对记录与介绍依据
模板资料
- 来源平台
- GitHub
- 资料与维护参考分
- 资料一般 · 68 / 100
- 技术栈
- Gatsby · React
- 网站类型
- 启动器
这个分数如何计算
本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。
这个项目需要核对什么
- 记录的仓库更新时间
- 2022-04-28
- 截图检查日期
- 2026-10-02
已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。
目录记录的主要技术栈是 Gatsby。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。
查看具体选型方法 →介绍的制作与核对状态
介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。
已完成服务器许可规则与 AI 来源核对;未经过人工编辑审核。
查看当时使用的来源资料
SHA-256: e49ad2ea0d29ee0634087213f63442faf9d3af5eb0125613650df34b8dee9d40
2026-10-02T11:21:08.363Z
来源文件 / 仓库# gatsby-starter-all-content
This is a template for the [content page of my website](https://dillionmegida.com/content):

Anyone interested in having something--where all content you've written on different platforms can be stored in one place--you're free to use this template.
Watch [this video](https://www.youtube.com/watch?v=_TXC20_UdF8) where I explain how to use the starter or read the text instructions below.
## Installation
You can use this starter with these commands:
```bash
gatsby new YOUR-WEBSITE https://github.com/dillionmegida/gatsby-starter-all-content
# goto your website directory
cd YOUR-WEBSITE
# start server
gatsby develop
```
On `localhost:8000`, you'll find two pages: the blog and content pages. The content page looks similar to this:

These are all demo content.
The content page is a compilation of all your content, including the blog posts on your website.
Read the following section to learn how to add your own content.
## Usage
All content live in the two directories: `data/blog` and `data/content`. The former is for blog posts on your website, and the latter is for all content you've written on different platforms.
For the latter, files are named by their platform with the `.yml` extension. For example, hashnode's content are stored in `data/content/hashnode.yml`. The structure of the file is as follows:
```yaml
- platform: Hashnode
link: [link to your hashnode profile, or null]
content:
- item:
title: [title1 of your content]
link: [link to your content]
tags: [helpful tags for your content]
- item:
title: [title2 of your content]
link: [link to your content]
tags: [helpful tags for your content]
- ...and so on
```
You can add as many content in the `content` array.
### Adding new platforms
The first step is adding the file as described above to add a new platform.
Then you'd need to do a few more things:
In `src/pages/content`, create a new graphql query in the exported query object below the file. Say your platform is Hashnode, you'd need to add the following query:
```graphql
hashnode: allHashnodeYaml {
edges {
node {
id
platform
link
content {
title
link
tags
}
}
}
}
```
Next, add this platform to the `allContent` array in the `Content` component in the same file:
```js
//
const {
// previous content here
// ..,
hashnode,
} = data
const allContent = [
// add previous content to the array
// ..,
hashnode,
]
//
```
And that's all. On your content page, you can see the content of your new platform.
Also, note that the order of the platforms in the `allContent` array determines how they are displayed on the content grid.
## Helpful Notes
- [react-mansory-css](https://www.npmjs.com/package/react-masonry-css) is the library used to display the mansory grid layout. Thank you, Paul.
- [use-media](https://www.npmjs.com/package/use-media) is the library used to change the number of columns based on the screen side. Thank you streamich.
## Contributing
Highly recommended. Please create a pull request if you have contributions.
看看同类模板
对比同技术栈与用途的模板,找到更适合的视觉与内容结构。

gatsby-starter-gcn
gatsby-starter-gcn 是一个面向静态网站构建的 Gatsby 启动器,将内容管理、部署和前端开发串联起来。
Gatsby · 博客

gatsby-starter-morning-dew
:rocket: A Gatsby theme/starter to build lightning-fast blog/websites
Gatsby · 博客

starter-gatsby-blog
这是一个由 Contentful 社区维护的 Gatsby 博客启动器,目标是把静态站点的低维护成本与 Contentful 的友好编辑界面结合起来。
Gatsby · 社区

automatic-gatsbyjs-app-landing-page
Automatic GatsbyJS App Landing Page - Automatically generate iOS app landing page using GatsbyJS
Gatsby · 工具站

gatsby-starter-cv
A simple starter to get up and developing your digital curriculum with GatsbyJS
Gatsby · 启动器

clay-theme
Image-centric Gatsby theme for publishers, portfolios, photographers blogs and more.
Gatsby · 作品集
