文章与页面均使用 Markdown 编写
gatsby-blog-template — Gatsby 博客模板
作者 completejavascript
基于 Gatsby 和 React 的博客模板,用 Markdown 管理文章与页面,内置标签、分类、分页、代码高亮和 Disqus 评论。
看看你的网站会是什么样
浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。
全部页面与视图 3
截图用于了解视觉与布局,交互效果请以实际项目为准。
值得关注的模板亮点
从已有项目资料中,快速了解它的特点。
标签和分类页面支持分页
首页文章列表带“加载更多”
Prism.js 代码高亮,Tomorrow Night 主题
Disqus 评论并支持懒加载
站点信息、导航与作者资料集中在 data/SiteConfig 配置
模板详细介绍
这是一个面向博客场景的 Gatsby 启动器,仓库名为 gatsby-blog-template,采用 MIT 许可。内容以 Markdown 编写,文章和独立页面都走同一套文件组织方式,适合把写作与站点结构分开处理。
功能层面,模板提供标签和分类页面并带分页,首页以文章列表呈现并支持“加载更多”;代码块使用 Prism.js 配合 Tomorrow Night 主题高亮;评论接入 Disqus,并支持评论懒加载。样式基于 Shiba.CSS。站点信息、导航、页脚、作者资料、分页数量、标签与分类路径前缀、404 文案等集中在 data/SiteConfig 的导出对象中配置。
安装方式有两种:用 gatsby new 从仓库创建新项目,或克隆仓库后删除 .git 再安装依赖,随后运行 npm run develop 在 localhost:8000 预览。模板基于 gatsby-advanced-starter、taniarascia.com 和 Shiba.CSS 构建,README 未说明 Node 版本要求或生产构建细节,使用前需自行核对依赖与第三方素材的许可。
适合你的项目吗?
适用场景
- 搭建以 Markdown 为内容源的个人技术博客
- 需要标签、分类与分页组织的文章归档站点
- 希望接入 Disqus 评论并控制评论加载时机的博客
- 需要代码高亮的开发者写作场景
适合人群
- 熟悉 Gatsby 与 React、愿意通过配置文件调整站点的开发者
- 以 Markdown 写作、不依赖后台管理系统的博客作者
- 需要现成博客结构并自行替换样式与内容的项目
上手与定制指南
结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。
- 1
使用 gatsby new 从仓库创建项目,或克隆仓库后删除 .git 再执行 npm install
- 2
运行 npm run develop 或 gatsby develop,在 localhost:8000 预览
- 3
站点标题、域名、导航、页脚、作者资料、分页数量、Disqus shortname 等在 data/SiteConfig 中修改
- 4
README 未列出 Node 版本要求,需自行确认本地环境与依赖兼容
- 5
演示图片、字体、图标等第三方素材需单独核对许可,MIT 仅覆盖代码
授权与来源资料
使用条件与限制
免费使用 · 保留许可声明本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。
使用时需要遵守
- 允许免费使用、修改、商用和分发该版本代码。
- 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
- 代码按现状提供;担保与责任限制以原许可证及适用法律为准。
额外费用与待核对事项
- 评论功能依赖第三方 Disqus 服务,需注册 Disqus 账号并配置 shortname(data/SiteConfig 中的 disqusShortname),评论数据托管在 Disqus 平台,可能受其服务条款与免费额度限制。
- 使用 Facebook App Insights 需提供 Facebook 应用 ID,属于外部服务依赖,需自行申请并遵守 Facebook 平台条款。
- 站点统计依赖 Google Analytics,需替换为自己的 GA 跟踪 ID 并遵守 Google 服务条款,属于外部服务依赖。
- 作者头像默认引用 Gravatar 外部图片地址,实际使用时需替换为自己的头像资源,并注意该外部资源的可用性与许可。
- MIT 许可仅覆盖代码;README 明确“除非另有说明”,因此演示图片、字体、图标等第三方素材可能另有许可,需单独核对后方可使用。
- 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
- 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
查看原文依据
Permission is hereby granted, free of charge
许可证原文
Disqus for comment
README 原文
siteFBAppID: "399626517562189", // FB Application ID for using app insights
README 原文
googleAnalyticsID: "UA-96543695-7", // GA tracking ID.
README 原文
userAvatar: "https://www.gravatar.com/avatar/42fd3d526fde1ef76d5002e4ebd303e9.jpg?s=300"
README 原文
https://github.com/completejavascript/gatsby-blog-template/blob/dev/LICENSEhttps://github.com/completejavascript/gatsby-blog-template/blob/dev/README.mdCopyright © 2019 Lam Pham. Unless otherwise noted, all code MIT license.
README 原文
DeepSeek 根据仓库许可证和 README 整理 ·2026-10-01。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。
项目核对记录与介绍依据
模板资料
- 来源平台
- GitHub
- 资料与维护参考分
- 资料较完整 · 92 / 100
- 技术栈
- Gatsby · React
- 网站类型
- 博客 · 启动器
这个分数如何计算
本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。
这个项目需要核对什么
- 记录的仓库更新时间
- 2026-01-15
- 截图检查日期
- 2026-10-01
已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。
目录记录的主要技术栈是 Gatsby。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。
查看具体选型方法 →介绍的制作与核对状态
介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。
已完成服务器许可规则与 AI 来源核对;未经过人工编辑审核。
查看当时使用的来源资料
SHA-256: a96827e42730e824dd25bc371ee1665e9d57bc4caefac563e7ec3541d96fa9a2
2026-10-01T13:56:55.608Z
来源文件 / 仓库[](https://app.netlify.com/sites/gb-template/deploys) [](https://opensource.org/licenses/MIT) [](https://codeclimate.com/github/completejavascript/gatsby-blog-template/maintainability)
# gatsby-blog-template
A GatsbyJS Blog Template for blogging purpose.
## Installation
Install this template (assuming [Gatsby](https://github.com/gatsbyjs/gatsby/) is installed and updated) by running from your CLI:
```bash
gatsby new YourProjectName https://github.com/completejavascript/gatsby-blog-template
npm run develop # or gatsby develop
```
Or you can fork the project, make your changes there and merge new features when needed.
Alternatively:
```bash
git clone https://github.com/completejavascript/gatsby-blog-template YourProjectName # Clone the project
cd YourProjectname
rm -rf .git # So you can have your own changes stored in VCS.
npm install # or yarn install
npm run develop # or gatsby develop
```
Navigate to localhost:8000.
## Features
* Posts and pages in Markdown
* Tags and categories with pagination
* Homepage as list of articles, support "Load more" function
* Code highlight using [Prism.js](https://prismjs.com/) and Tomorrow Night theme
* Disqus for comment
* Style using [Shiba.CSS](https://github.com/completejavascript/shiba-css)
## Configuration
Edit the export object in `data/SiteConfig`:
```js
const config = {
// Site info
siteTitle: "Gatsby Blog Template", // Site title.
siteTitleShort: "GB Template", // Short site title for homescreen (PWA). Preferably should be under 12 characters to prevent truncation.
siteTitleAlt: "Gatsby Blog Template", // Alternative site title for SEO.
siteLogo: "/logos/logo-1024x1024.png", // Logo used for SEO and manifest.
siteUrl: "https://gb-template.netlify.com", // Domain of your website without pathPrefix.
pathPrefix: "", // Prefixes all links. For cases when deployed to example.github.io/gatsby-advanced-starter/.
siteDescription: "A GatsbyJS Blog Template for blogging purpose.", // Website description used for RSS feeds/meta description tag.
siteRss: "/rss.xml", // Path to the RSS file.
siteLang: "en",
siteFBAppID: "399626517562189", // FB Application ID for using app insights
googleAnalyticsID: "UA-96543695-7", // GA tracking ID.
postDefaultCategoryID: "", // Default category for posts.
// Common for tag, category pages and widget
numberLatestPost: 8,
postsPerPage: 6,
// Use for post
dateFromFormat: "YYYY-MM-DD HH:mm", // Date format used in the frontmatter.
dateFormat: "MMMM Do, YYYY", // Date format for display.
postTagged: "TAGGED",
postInCategories: "POSTED IN",
postOnDate: "Posted on",
// Use for comment
lazyLoadComments: true,
disqusShortname: "gb-template", // Disqus shortname.
btnLoadComments: "Load comments",
// Use for home page
numberLoadmore: 6,
btnLoadmore: "Load more",
homeHasLoadmore: true,
homeHasThumbnail: true,
homeHeader: "Home",
// Use for page
pathPrefixPagination: "/page", // Prefix path for pagination
pageNotFoundTitle: "Page Not Found", //
pageNotFoundBtn: "Back to our site",
pageNotFoundContent: "Looks like you've followed a broken link or entered a URL that doesn't exist on this site.",
// Use for tag
pathPrefixTag: "/tag", // Prefix path for tags
tagHeader: "Posts tagged as", // use in header of tag-template page
tagHasThumbnail: true,
// Use for category
pathPrefixCategory: "/category", // Prefix path for category
categoryHeader: "Posts in category", // use in header of category-template page
categoryHasThumbnail: true,
// Use for widget
categoryWidgetTitle: "Categories",
tagWidgetTitle: "Tags",
latestPostsWidgetTitle: "Latest posts",
// Use for user info
userName: "Lam Pham", // Username to display in the author segment.
userEmail: "[email protected]", // Email used for RSS feed's author segment
userTwitter: "CmpltJavaScript", // Optionally renders "Follow Me" in the UserInfo segment.
userLocation: "Hanoi, Vietnam", // User location to display in the author segment.
userAvatar: "https://www.gravatar.com/avatar/42fd3d526fde1ef76d5002e4ebd303e9.jpg?s=300", // User avatar to display in the author segment.
userDescription:
"Software Engineer, Web Developer, JavaScript Lover & Blogger @completejavascript.", // User description to display in the author segment.
// Links to social profiles/projects you want to display in the author segment/navigation bar.
userLinks: [
{
label: "Email",
url: "mailto:[email protected]",
iconClassName: "far envelope"
},
{
label: "Website",
url: "https://completejavascript.com/",
iconClassName: "fas globe"
},
{
label: "Twitter",
url: "https://twitter.com/CmpltJavaScript",
iconClassName: "fab twitter"
},
{
label: "Facebook",
url: "https://www.facebook.com/completejavascript/",
iconClassName: "fab facebook-f"
},
{
label: "Linkedin",
url: "https://www.linkedin.com/in/completejavascript/",
iconClassName: "fab linkedin-in"
},
],
// Use for navigation
navTitle: "GB Template",
navLinks: [
{ label: "About", url: "/about" },
{ label: "Contact", url: "/contact" },
],
// Use for footer
socialLinks: [
{
label: "Codepen",
url: "https://codepen.io/completejavascript/",
iconClassName: "fab codepen"
},
{
label: "FreeCodeCamp",
url: "", // Ignore
iconClassName: "fab free-code-camp"
},
{
label: "GitHub",
url: "https://github.com/completejavascript",
iconClassName: "fab github"
},
{
label: "Facebook",
url: "https://www.facebook.com/completejavascript/",
iconClassName: "fab facebook-f"
},
{
label: "Linkedin",
url: "https://www.linkedin.com/in/completejavascript/",
iconClassName: "fab linkedin-in"
},
{
label: "Twitter",
url: "https://twitter.com/CmpltJavaScript",
iconClassName: "fab twitter"
},
{
label: "RSS",
url: "https://gb-template.netlify.com/rss.xml",
iconClassName: "fas rss"
},
],
footerLinks: [
{ label: "Home", url: "/" },
{ label: "About", url: "/about" },
{ label: "Contact", url: "/contact" },
{ label: "Terms of Use", url: "/terms" },
{ label: "Privacy Policy", url: "/privacy" },
{ label: "Sitemap", url: "https://gb-template.netlify.com/sitemap.xml" },
],
copyright: "Copyright © 2019 Lam Pham. Unless otherwise noted, all code MIT license.",
// Use for manifest
themeColor: "#2196F3", // Used for setting manifest and progress theme colors.
backgroundColor: "#FFF" // Used for setting manifest background color.
};
// Validate
// Make sure pathPrefix is empty if not needed
if (config.pathPrefix === "/" || config.pathPrefix === "") {
config.pathPrefix = "";
} else {
// Make sure pathPrefix only contains the first forward slash
config.pathPrefix = `/${config.pathPrefix.replace(/^\/|\/$/g, "")}`;
}
// Make sure siteUrl doesn't have an ending forward slash
if (config.siteUrl.substr(-1) === "/")
config.siteUrl = config.siteUrl.slice(0, -1);
// Make sure siteRss has a starting forward slash
if (config.siteRss && config.siteRss[0] !== "/")
config.siteRss = `/${config.siteRss}`;
module.exports = config;
```
## Acknowledgements
This project is based on:
* [gatsby-advanced-starter](https://github.com/vagr9k/gatsby-advanced-starter/)
* [taniarascia.com](https://github.com/taniarascia/taniarascia.com)
* [Shiba.CSS](https://github.com/completejavascript/shiba-css)
## Author
* [Lam Pham](http://about.phamvanlam.com)
## License
This project is open source and available under the [MIT License](https://github.com/completejavascript/gatsby-blog-template/blob/dev/LICENSE).看看同类模板
对比同技术栈与用途的模板,找到更适合的视觉与内容结构。

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

devblog
A lightweight, customizable personal blog template built with GatsbyJS and React
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 · 启动器
