Jekyll博客

hanuman — Jekyll 博客模板

作者 samanyougarg

Hanuman 是一个基于 Jekyll 与 AMP 的响应式博客主题,支持标签、多作者、分页、封面图与社交分享,可通过主题 gem、远程主题或克隆仓库三种方式安装。

看看你的网站会是什么样

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

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

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

全部页面与视图 3

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

采集于 2026-09-30查看来源

值得关注的模板亮点

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

01

基于 Jekyll 与 AMP Start 框架构建的博客主题

02

支持标签、多作者、分页与首页及文章封面图

03

内置代码语法高亮与社交分享

04

提供简单导航菜单与可选 Google Analytics 接入

05

可通过主题 gem、jekyll-remote-theme 或克隆仓库三种方式安装

06

样式集中在 styles.scss,通过 $theme-color 变量更换主色

模板详细介绍

Hanuman 是面向博客与网站内容的 Jekyll 主题,核心特点是以 AMP(Accelerated Mobile Pages)作为页面构建基础,并基于开源 AMP Start 框架实现,因此主题样式集中在 includes 目录的 styles.scss 中,通过修改 $theme-color 变量调整主色。主题提供首页与文章封面图、代码语法高亮、社交分享、简单导航菜单、分页、标签与多作者支持,并可选接入 Google Analytics。

安装方式有三种:克隆仓库后修改 _config.yml 并部署到 GitHub Pages 或自有服务器;以 Ruby Gem 形式在 Gemfile 中加入 hanuman 并在 _config.yml 设置 theme;或通过 jekyll-remote-theme 插件引用远程主题。使用 Gem 方式时还需要自行准备 _config.yml、_data/navigation.yml 与 _data/author.yml。

写作方面与常规 Jekyll 不同:AMP 对外部内容有严格限制,不能使用 Markdown 图片语法或普通 HTML 标签,需改用 amp-img、amp-youtube 等 AMP 自定义标签;部分 AMP 组件还需先在 includes/head.html 中声明对应外部脚本。页面可通过在 URL 后加 #development=1 在浏览器控制台运行 AMP 校验。

该主题仓库最后更新于 2020 年,README 中的 Travis CI 徽章与部署流程反映的是当时的工具链。主题代码采用 MIT 许可,可免费使用、修改、商用与分发,但演示图片、字体、图标等第三方素材需单独核对许可。

Jekyll博客

适合你的项目吗?

适用场景

  • 搭建以文章为主的个人博客或内容站点
  • 需要 AMP 页面结构、希望页面适配移动端阅读的站点
  • 需要多作者协作发布与标签分类的博客
  • 部署到 GitHub Pages 或自有服务器的 Jekyll 项目

适合人群

  • 熟悉 Jekyll 与 Markdown 写作流程的开发者
  • 接受使用 AMP 自定义标签撰写文章内容的用户
  • 需要标签、多作者与分页等基础博客功能的站点
  • 希望以 MIT 许可免费使用并自行修改主题代码的项目

上手与定制指南

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

  1. 1

    克隆仓库方式:fork 并克隆后修改 _config.yml,将文章放入 _posts,再部署到 GitHub Pages 或自有服务器。

  2. 2

    Gem 方式:在 Gemfile 加入 gem "hanuman",在 _config.yml 设置 theme: hanuman,并自行准备 _config.yml、_data/navigation.yml 与 _data/author.yml。

  3. 3

    远程主题方式:在 Gemfile 加入 jekyll-remote-theme,在 _config.yml 设置 remote_theme 并把 jekyll-remote-theme 加入 plugins 数组。

  4. 4

    文章内容需使用 AMP 自定义标签(如 amp-img、amp-youtube),部分组件需先在 includes/head.html 中引入对应外部脚本。

  5. 5

    启用 Google Analytics 需在 _config.yml 配置跟踪 ID,并移除 layouts/default.html 中的 comment 标签。

查看仓库使用说明

授权与来源资料

使用条件与限制

免费使用 · 保留许可声明

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

使用时需要遵守

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

额外费用与待核对事项

  • 部分 AMP 组件需在 includes/head.html 中手动引入对应的外部脚本后才能使用,属于使用限制。
  • 文章内容不能使用 Markdown 图片语法或普通 HTML 标签,必须改用 amp-img、amp-youtube 等 AMP 自定义标签。
  • 启用 Google Analytics 需自行配置跟踪 ID,并依赖 Google 的外部服务。
  • 以 Gem 方式安装时需自行准备 _config.yml、_data/navigation.yml 与 _data/author.yml 等配置文件。
  • 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
  • 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
查看原文依据

Permission is hereby granted, free of charge

许可证原文

Some AMP components require you to specify external scripts before using them.

README 原文

You cannot use Markdown format or normal HTML tags. AMP provides its own custom tags for images, videos etc...

README 原文

Set up your Analytics Tracking ID in _config.yml.

README 原文

You'll also need to copy or create the _config.yml file just like in this repository. Similarly, you'll need to have a navigation.yml and author.yml in your _data directory.

README 原文
https://github.com/samanyougarg/hanuman/blob/master/LICENSE.txthttps://github.com/samanyougarg/hanuman/blob/master/README.md

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

项目核对记录与介绍依据

模板资料

来源平台
GitHub
资料与维护参考分
资料较完整 · 76 / 100
技术栈
Jekyll
网站类型
博客
这个分数如何计算

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

这个项目需要核对什么

记录的仓库更新时间
2020-08-31
截图检查日期
2026-09-30

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

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

查看具体选型方法 →

介绍的制作与核对状态

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

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

查看当时使用的来源资料

SHA-256: 792ab80c3092594ee6ff5ff07de0d7436fa81f4db4343144a721484a893d7937

2026-09-30T11:25:31.587Z

来源文件 / 仓库
# HANUMAN Jekyll Theme

[![Build Status](https://travis-ci.org/samanyougarg/hanuman.svg?branch=master)](https://travis-ci.org/samanyougarg/hanuman)

Hanuman is a minimal yet powerful Jekyll theme for your blogs and websites.

It is built using the open source [AMP Start framework](https://www.ampstart.com/) and can be customized as per your requirements.

<a href="https://www.buymeacoffee.com/samanyougarg"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;" target="_blank"></a>

## Live Demo
## [Hanuman](https://samanyougarg.com/hanuman)
![Hanuman](/Screenshots/hanuman.jpg "Hanuman Preview")


## Features

- Minimal
- Responsive
- Syntax Highlighting for code
- Cover Images for homepage and blog posts
- Social Sharing
- Simple Navigation Menu
- Pagination
- Google Analytics
- Can be easily installed via "theme gem"
- Github Pages support
- Easily Customisable
- Tags
- Multiple Authors

## What is AMP

AMP stands for [Accelerated Mobile Pages](https://www.ampproject.org/), a Google-backed project designed as an open standard for any publisher to have pages load quickly on mobile devices.

## Installation

There are different ways to install the theme -

### 1. Cloning the repository and updating settings
1. Fork this repository and clone the forked repository.
2. Update the _config.yml file as per your requirements.
3. Add your posts to the _posts directory.
4. Deploy to Github Pages or your own server.

#### Deploying to Github Pages
**Method 1**

Push the contents of the destination folder (mentioned in _config.yml. eg - destination: ../hanuman-pages/) to the gh-pages branch(if project page) or master branch(if user page) of your repository.

**Method 2**

- Set up travis-ci for your fork.
- Generate your secure token with the travis gem:
  Run `gem install travis` on your terminal.
- Grab the GH_TOKEN from https://github.com/settings/tokens
- Then run `travis encrypt 'GIT_NAME="YOUR_USERNAME" GIT_EMAIL="YOUR_EMAIL" GH_TOKEN=YOUR_TOKEN'`
- Add the token to your .travis.yml file.
Now you just need to push the files. Travis will generate the HTML files and automatically push them to your gh-pages branch.
This is the setup I am using.

### 2. Ruby Gem Method
Add this line to your Jekyll site's `Gemfile`:

```ruby
gem "hanuman"
```

And add this line to your Jekyll site's `_config.yml`:

```yaml
theme: hanuman
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install hanuman

You'll also need to copy or create the _config.yml file just like in this repository. Similarly, you'll need to have a navigation.yml and author.yml in your _data directory.

#### Deploying to Github Pages
Run `bundle exec jekyll serve` inside your cloned repository. Push the contents of the resulting _site to your Github Pages repository.


### 3. Jekyll Remote Theme
1. Create or update your Gemfile with the following -

```ruby
source "https://rubygems.org"
gem "github-pages", group: :jekyll_plugins
gem "jekyll-remote-theme"
```

2. Update the bundled gems using `bundle` command.

3. Add `remote_theme: "hanuman"` to your `_config.yml`.

4. Add `jekyll-remote-theme` to the plugins array of your `_config.yml` -

```yaml
plugins:
  - jekyll-remote-theme
```

## Usage

### _config.yml
Update _config.yml with your respective settings like updating your site's name, description etc...

### Styling
AMP has a limitation that you can only use inline css.
All the CSS for this theme is in the styles.scss file in the includes directory.

#### Changing the Default Color
In the styles.scss file in the includes directory, you can change the hex value of $theme-color to the color you would like your site to use.

### Author Information
Author information is present in the author.yml file in the _data folder. You can update the fields of that file as per your requirements.

### Sidenav
Sidenav can be updated from the navigation.yml file in the _data folder.

## Writing Posts
You can write posts just as you would in Jekyll, the only difference being that AMP has some strict guidelines on including external content.

You cannot use Markdown format or normal HTML tags. AMP provides its own custom tags for images, videos etc...

### Examples -

**Images**
`<amp-img src="welcome.jpg" alt="Welcome" height="400" width="800"></amp-img>`

**Videos**
`<amp-youtube data-videoid="mGENRKrdoGY" layout="responsive" width="480" height="270"></amp-youtube>`

[See Full AMP Documentation.](https://www.ampproject.org/docs/)

### Using AMP Components
Some AMP components require you to specify external scripts before using them.
You can specify these scripts in the head.html file in the includes directory after the already imported scripts and then use these components in any post.

## Validating your page with AMP
AMP provides built-in validator to validate your pages so that they can rendered quickly.

You can access this validator by opening the Developer Console in your browser and adding #development=1 to any url of your site.

Example -
http://localhost:4000/#development=1

If you have errors on your page, AMP will list those for you in the console. If you do not have any errors, you'll get a message "AMP Validation Successful" on your console.

## Enabling Google Analytics
1. Set up your Analytics Tracking ID in _config.yml.
2. Remove {% comment %} and {% endcomment %} tags in the default.html file in layouts directory.

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/samanyougarg/hanuman. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.

To submit a pull request -

1. Fork/clone the repository.
2. Develop.
3. Create a new branch from the master branch.
4. Open a pull request on Github describing what was fixed or added.

## Thanks
Hanuman is based on [amplify](https://github.com/ageitgey/amplify) jekyll theme. Thank You.

## License

The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
反馈内容错误

看看同类模板

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