基于 Jekyll 的博客主题,代码采用 MIT 许可
centrarium — Jekyll 博客模板
作者 bencentra
Centrarium 是一个基于 Jekyll 的博客与网站主题,采用 MIT 许可,支持封面图、分页、分类与标签归档、代码高亮、Disqus 评论和社交分享。
看看你的网站会是什么样
浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。
全部页面与视图 3
截图用于了解视觉与布局,交互效果请以实际项目为准。
值得关注的模板亮点
从已有项目资料中,快速了解它的特点。
通过 _sass/base/_variables.scss 调整字体、字号与颜色
首页与文章支持封面图,图片可用 Lightbox 全屏查看
默认启用分页,并支持按分类和标签生成归档页
集成 HighlightJS 代码高亮、Disqus 评论与 Google Analytics
导航和页脚链接由页面 front matter 自动生成
模板详细介绍
Centrarium 是 Ben Centra 为 Jekyll 网站或博客开发的主题,仓库采用 MIT 许可,可免费使用、修改和分发。主题的样式基于 Bourbon、Neat、Bitters、Refills 等 Sass 工具库构建,图标使用 Font Awesome,代码高亮使用 HighlightJS,图片查看使用 Lightbox。
功能方面,主题提供可自定义的字体与颜色、首页与文章封面图、默认开启的分页、按分类和标签归档文章、代码片段语法高亮、Disqus 评论、图片灯箱、带自定义页面名称跟踪的 Google Analytics,以及 Twitter、Facebook、LinkedIn、GitHub 等社交网络集成。导航与页脚链接由 front matter 自动生成:标记为 category: page、带标题且设置 main_nav: true 的页面会出现在导航中。
使用方式有两种:将仓库作为新站点的起点,把文章放入 posts/ 目录并按 Jekyll front matter 创建页面;或在已有 Jekyll 站点中替换 _includes、_layouts、_sass 目录,替换 index.html 并复制 posts.html 与 _config.yml。依赖通过 Bundler 安装。
需要注意的限制:分类与标签归档依赖 jekyll-archives,而该插件不包含在 GitHub Pages 中,若部署到 GitHub Pages 需禁用归档功能或改为本地编译后推送生成结果;Disqus、Google Analytics 等属于外部服务,需自行配置账号;主题中的演示封面图等第三方素材需单独核对许可。
适合你的项目吗?
适用场景
- 搭建个人博客并发布带代码片段的文章
- 为已有 Jekyll 站点更换主题样式与布局
- 需要按分类或标签浏览文章归档的内容站点
- 通过 Stackbit 导入并连接 NetlifyCMS、Contentful 等无头 CMS
适合人群
- 使用 Jekyll 构建静态博客的个人开发者
- 希望直接修改 Sass 变量定制配色的用户
- 需要文章评论、代码高亮和社交分享功能的博客作者
- 计划部署到 Netlify 或自行托管静态站点的用户
上手与定制指南
结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。
- 1
需先安装 Bundler,再执行 bundle install 安装 Jekyll、jekyll-archives、jekyll-sitemap 和 jekyll-paginate 等依赖
- 2
新站点可直接使用仓库文件,已有站点需替换 _includes、_layouts、_sass 目录并合并 _config.yml
- 3
部署到 GitHub Pages 时需禁用 jekyll-archives,因为该插件不被 GitHub Pages 支持
- 4
Disqus 评论需在 _config.yml 中设置 disqus_shortname,Google Analytics 需设置 ga_tracking_id
- 5
封面图、字体、图标等第三方素材应单独核对其许可,不能仅依据代码的 MIT 许可判断
授权与来源资料
使用条件与限制
免费使用 · 保留许可声明本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。
使用时需要遵守
- 允许免费使用、修改、商用和分发该版本代码。
- 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
- 代码按现状提供;担保与责任限制以原许可证及适用法律为准。
额外费用与待核对事项
- 分类与标签归档依赖 jekyll-archives 插件,该插件不被 GitHub Pages 支持;若部署到 GitHub Pages,必须禁用归档功能,或改为本地编译后推送生成结果。
- Disqus 评论为可选外部服务,需自行注册 Disqus 账号并在 _config.yml 中设置 disqus_shortname 才能启用。
- Google Analytics 为可选外部服务,需自行拥有 Google Analytics 账号并填写 ga_tracking_id 才能启用统计。
- 主题内演示封面图来自第三方(Chris M. Morris / Flickr),其许可与代码的 MIT 许可无关,使用前需单独核对素材授权。
- 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
- 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
查看原文依据
Permission is hereby granted, free of charge
许可证原文
the Jekyll Archive gem is NOT included with GitHub pages! Disable the archive feature if you intend to deploy your site to GitHub pages.
README 原文
You can enable [Disqus][disqus] comments for you site by including one config option
README 原文
You can enable basic [Google Analytics][ga] pageview tracking by including your site's tracking ID
README 原文
https://github.com/bencentra/centrarium/blob/master/LICENSE.mdhttps://github.com/bencentra/centrarium/blob/master/README.mdCover image by Chris M. Morris ([flickr][cover]).
README 原文
DeepSeek 根据仓库许可证和 README 整理 ·2026-10-01。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。
项目核对记录与介绍依据
模板资料
- 来源平台
- GitHub
- 资料与维护参考分
- 资料较完整 · 76 / 100
- 技术栈
- Jekyll
- 网站类型
- 博客
这个分数如何计算
本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。
这个项目需要核对什么
- 记录的仓库更新时间
- 2024-08-15
- 截图检查日期
- 2026-10-01
已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。
目录记录的主要技术栈是 Jekyll。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。
查看具体选型方法 →介绍的制作与核对状态
介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。
已完成服务器许可规则与 AI 来源核对;未经过人工编辑审核。
查看当时使用的来源资料
SHA-256: 1b0304078ec4f25fa66022fb17f6b0473db24a8f1ceecda7bd2be18d5a43c101
2026-10-01T13:34:47.189Z
来源文件 / 仓库# Centrarium [](https://circleci.com/gh/bencentra/centrarium/tree/master)
A simple yet classy theme for your Jekyll website or blog. Customizable to fit your style or brand.
Built with these awesome libraries:
* [Bourbon][bourbon]
* [Neat][neat]
* [Bitters][bitters]
* [Refills][refills]
* [Font Awesome][fontawesome]
* [HighlightJS][highlightjs]
* [Lightbox][lightbox]
Here's a [demo](http://bencentra.com/centrarium). It also works on [GitHub Pages](http://bencentra.github.io/centrarium/). I also use it for [my own website][bencentra].
Inspired by dirkfabisch's [Mediator](https://github.com/dirkfabisch/mediator) theme, which I previously used for my own blog, as well as [Type Theme](http://rohanchandra.github.io/type-theme/).
Cover image by Chris M. Morris ([flickr][cover]).
## Features
This theme comes with a number of features, including:
* Easily customizable fonts and colors
* Cover images for your homepage and blog posts
* Pagination enabled by default
* Archiving of posts by categories and tags
* Syntax highlighting for code snippets
* Disqus integration for post comments
* Lightbox for viewing full-screen photos and albums
* Google Analytics with custom page name tracking
* Social media integration (Twitter, Facebook, LinkedIn, GitHub, and more)
## Installation
If you're just getting started with Jekyll, you can use this repository as a starting point for your own site. Just [download this project](https://github.com/bencentra/centrarium/archive/master.zip) and add all the files to your project. Add your blog posts to the `posts/` directory, and create your pages with the proper Jekyll front matter (see `posts.html` for an example).
If your site already uses Jekyll, follow these steps:
1. Replace the files in the `_includes`, `_layouts`, and `_sass` directories with those from this project.
2. Replace your `index.html` with the one from this project, and copy over the `posts.html` file as well.
3. Copy the contents of the `_config.yml` from this project in to yours, and update the necessary information.
Don't forget to install Jekyll and other dependencies:
```bash
# cd into project directory
cd centrarium
# install Bundler if you don't have it already
gem install bundler
# install jekyll, jekyll-archives, jekyll-sitemap, and jekyll-paginate
bundle install
```
## Stackbit Deploy
This theme is ready to import into Stackbit. This theme can be deployed to Netlify and you can connect any headless CMS including Forestry, NetlifyCMS, DatoCMS or Contentful.
[](https://app.stackbit.com/create?theme=https://github.com/bencentra/centrarium)
## Updating Header and Footer Links
Links in the header and footer are auto-generated. Links will be made for all files marked `category: page`, that have a title, and have the custom `main_nav` front-matter variable set to `true`. You can modify the rules for link generation in `_layouts/nav_links.html`.
## Updating Styles
If you want change the CSS of the theme, you'll probably want to check out these files in the `_sass/` directory:
* `base/_variables.scss`: Common values found throughout the project, including base font size, font families, colors, and more.
* `base/_typography.scss`: Base typography values for the site (see `typography.html` for a demonstration)
* `_layout.scss`: The primary styles for the layout and design of the theme.
### Important Variables
Here are the important variables from `base/_variables.scss` you can tweak to customize the theme to your liking:
* `$base-font-family`: The font-family of the body text. Make sure to `@import` any new fonts!
* `$heading-font-family`: The font-family of the headers. Make sure to `@import` any new fonts!
* `$base-font-size`: The base font-size. Defaults to $em-base from Bourbon (`bourbon/settings/_px-to-em.scss`).
* `$base-font-color`: The color for the body text.
* `$action-color`: The color for links in the body text.
* `$highlight-color`: The color for the footer and page headers (when no cover image provided).
## Configuration
All configuration options can be found in `_config.yml`.
### Site Settings
* __title:__ The title for your site. Displayed in the navigation menu, the `index.html` header, and the footer.
* __subtitle:__ The subtitle of your site. Displayed in the `index.html` header.
* __email:__ Your email address, displayed with the Contact info in the footer.
* __name:__ Your name. _Currently unused._
* __description:__ The description of your site. Used for search engine results and displayed in the footer.
* __baseurl:__ The subpath of your site (e.g. /blog/).
* __url:__ The base hostname and protocol for your site.
* __cover:__ The relative path to your site's cover image.
* __logo:__ The relative path to your site's logo. Used in the navigation menu instead of the title if provided.
### Build Settings
* __markdown:__ Markdown parsing engine. Default is kramdown.
* __inter_post_navigation:__ Whether to render links to the next and previous post on each post.
### Pagination settings
See the documentation for [jekyll-paginate-v2](https://github.com/sverrirs/jekyll-paginate-v2/blob/master/README-GENERATOR.md#site-configuration) for more details.
### Archive Settings
Although this theme comes with a combined, categorized archive (see `posts.html`), you can enable further archive creation thanks to [jekyll-archives][archives]. Support for category and tag archive pages is included, but you can also add your own archive pages for years, months, and days.
To change archive settings, see the __jekyll-archives__ section of `_config.yml`:
```yml
jekyll-archives:
enabled:
- categories
- tags
layout: 'archive'
permalinks:
category: '/category/:name/'
tag: '/tag/:name/'
```
To fully disable the archive, remove the __jekyll-archives__ section AND remove it from the __gems__ list.
__NOTE:__ the Jekyll Archive gem is NOT included with GitHub pages! Disable the archive feature if you intend to deploy your site to GitHub pages. [Here is a guide](http://ixti.net/software/2013/01/28/using-jekyll-plugins-on-github-pages.html) on how you can use the `jekyll archive` gem with GitHub pages. The general gist: compile the Jekyll site locally and then push that compiled site to GitHub.
A sitemap is also generated using [jekyll-sitemap][sitemap].
### Syntax Highlighting Settings
Inside of a post, you can enable syntax highlighting with the `{% highlight <language> %}` Liquid tag. For example:
```
{% highlight javascript %}
function demo(string, times) {
for (var i = 0; i < times; i++) {
console.log(string);
}
}
demo("hello, world!", 10);
{% endhighlight %}
```
You can change the [HighlightJS theme][highlightjs_theme] in `_config.yml`:
```yml
highlightjs_theme: "monokai_sublime"
```
### Disqus Settings
You can enable [Disqus][disqus] comments for you site by including one config option:
* __disqus_shortname:__ Your Disqus username. If the property is set, Disqus comments will be included with your blog posts.
If you want to disable Disqus for only a specific page, add __disqus_disabled: true__ to the page's front matter.
### Google Analytics Settings
You can enable basic [Google Analytics][ga] pageview tracking by including your site's tracking ID:
* __ga_tracking_id__: The Tracking ID for your website. You can find it on your Google Analytics dashboard. If the property is set, Google Analytics will be added to the footer of each page.
### Social Settings
Your personal social network settings are combined with the social sharing options. In the __social__ section of `_config.yml`, include an entry for each network you want to include. For example:
```yml
social:
- name: Twitter # Name of the service
icon: twitter # Font Awesome icon to use (minus fa- prefix)
username: TheBenCentra # (User) Name to display in the footer link
url: https://twitter.com/TheBenCentra # URL of your profile (leave blank to not display in footer)
desc: Follow me on Twitter # Description to display as link title, etc
share: true # Include in the "Share" section of posts
```
### Social Protocols
Using the Open Graph Protocol or Twitter Card metadata, you can automatically set the images and text used when people share your site on Twitter or Facebook. These take a bit of setup, but are well worth it. The relevant fields are at the end of the `_config.yml` file.
Also there is another protocol, the Open Source protocol, for saying where your site is hosted if the source is open. This helps develops more easily see your code if they are interested, or if they have issues. For more, see http://osprotocol.com.
### Category Descriptions
You can enhance the `posts.html` archive page with descriptions of your post categories. See the __descriptions__ section of `_config.yml`:
```yml
# Category descriptions (for archive pages)
descriptions:
- cat: jekyll
desc: "Posts describing Jekyll setup techniques."
```
### Custom Page-Specific Javascript
You can add page-specific javascript files by adding them to the top-level `/js` directory and including the filename in the __custom_js__ page's configuration file:
```yml
# Custom js (for individual pages)
---
layout: post
title: "Dummy Post"
date: 2015-04-18 08:43:59
author: Ben Centra
categories: Dummy
custom_js:
- Popmotion
- Vue
---
```
The `/js/` directory would contain the corresponding files:
```bash
$ ls js/
Popmotion.js Vue.js
```
## Contributing
Want to help make this theme even better? Contributions from the community are welcome!
Please follow these steps:
1. Fork/clone this repository.
2. Develop (and test!) your changes.
3. Open a pull request on GitHub. A description and/or screenshot of changes would be appreciated!
4. I ([Ben Centra](https://github.com/bencentra)) will review and merge the pull request.
## License
MIT. See [LICENSE.MD](https://github.com/bencentra/centrarium/blob/master/LICENSE.md).
[bencentra]: http://bencentra.com
[bourbon]: http://bourbon.io/
[neat]: http://neat.bourbon.io/
[bitters]: http://bitters.bourbon.io/
[refills]: http://refills.bourbon.io/
[fontawesome]: http://fortawesome.github.io/Font-Awesome/
[highlightjs]: https://highlightjs.org/
[highlightjs_theme]: https://highlightjs.org/static/demo/
[lightbox]: http://lokeshdhakar.com/projects/lightbox2/
[cover]: https://www.flickr.com/photos/79666107@N00/3796678503/in/photolist-6MuYfc-61Rtft-8XzPmY-a6Cozm-54eSMs-6oMJmk-aepZQq-9YkPHp-fiAEGE-dVP4Z5-oxPyJP-atKUFJ-9YHWA5-9YF2f2-9YF2gR-9YHVGN-9YHVvs-qZYYQ6-4JqP2i-a2peGy-9YHVUm-9YHVF7-9YHVCL-9YF3NK-cYteMo-aiPmb9-69dtAi-9YF21x-4aWpmn-7SLiUL-77pqVX-8vXbYv-4HGDSH-a2h5P1-8LsZrQ-9aj1ez-auPZ7q-9YHVMd-9YF2bi-9YF23D-8LpWpn-9an6KL-9YHVZL-dqZ3Cz-2GuvnX-9YHWUo-9YHVWd-p5Roh5-i1zTbv-6sYrUT
[disqus]: https://disqus.com/
[ga]: http://www.google.com/analytics/
[archives]: https://github.com/jekyll/jekyll-archives
[sitemap]: https://github.com/jekyll/jekyll-sitemap
看看同类模板
对比同技术栈与用途的模板,找到更适合的视觉与内容结构。

al-folio
al-folio 是一个面向学者与研究人员的 Jekyll 作品集主题,设计简洁、响应式,适合搭建个人学术主页。
Jekyll · 作品集

minimal-mistakes
:triangular_ruler: Jekyll theme for building a personal site, blog, project documentation, or portfolio.
Jekyll · 作品集

Beautiful Jekyll
Beautiful Jekyll 是一个在 Jekyll 生态中经过长期打磨的博客主题,由 Dean Attali 维护,自 2015 年起积累了超过 5 万用户。
Jekyll · 博客

jekyll-TeXt-theme
💎 🐳 A super customizable Jekyll theme for personal site, team site, blog, project, documentation, etc.
Jekyll · 博客

startbootstrap-clean-blog-jekyll
A Jekyll version of the Clean Blog theme by Start Bootstrap
Jekyll · 博客

So Simple
So Simple 是 Michael Rose 开发的 Jekyll 主题,定位清晰:为文字和图片提供一个干净、可读性强的展示框架。
Jekyll · 博客
