Jekyll 主题 Hamilton 使用教程
1. 项目的目录结构及介绍
jekyll-theme-hamilton/
├── _data/
├── _includes/
├── _layouts/
├── _posts/
├── _sass/
├── assets/
│ └── css/
├── scripts/
├── .gitignore
├── 404.html
├── Gemfile
├── LICENSE.txt
├── README.md
├── _config.yml
├── about.md
├── categories.md
├── docs.md
├── faq.md
├── index.html
├── jekyll-theme-hamilton.gemspec
├── logo.png
├── screenshot-midnight.png
├── screenshot-sunrise.png
└── screenshot.png
_data/
: 存储项目的数据文件。_includes/
: 存储可重用的模板片段。_layouts/
: 存储页面的布局模板。_posts/
: 存储博客文章。_sass/
: 存储SASS样式文件。assets/css/
: 存储CSS文件。scripts/
: 存储JavaScript脚本文件。.gitignore
: 指定Git忽略的文件和目录。404.html
: 404错误页面。Gemfile
: 指定项目依赖的Gem包。LICENSE.txt
: 项目的许可证文件。README.md
: 项目的说明文档。_config.yml
: 项目的配置文件。about.md
: 关于页面。categories.md
: 分类页面。docs.md
: 文档页面。faq.md
: 常见问题页面。index.html
: 首页。jekyll-theme-hamilton.gemspec
: 项目的gemspec文件。logo.png
: 项目的logo图片。screenshot-midnight.png
: 主题的午夜截图。screenshot-sunrise.png
: 主题的日出截图。screenshot.png
: 主题的截图。
2. 项目的启动文件介绍
项目的启动文件主要是 index.html
,这是网站的首页。它使用了 _layouts
目录下的布局文件来渲染页面内容。
3. 项目的配置文件介绍
项目的配置文件是 _config.yml
,它包含了以下重要参数:
title: 网站标题
disqus: Disqus短名称
plugins:
- jekyll-theme-hamilton
title
: 网站的标题。disqus
: Disqus评论系统的短名称。plugins
: 指定使用的Jekyll插件,这里使用了jekyll-theme-hamilton
主题。
通过配置 _config.yml
文件,可以自定义网站的标题、评论系统以及其他功能。