Jekyll-Klise 项目使用教程
1. 项目的目录结构及介绍
Jekyll-Klise 项目的目录结构如下:
jekyll-klise/
├── _config.yml
├── _data
│ └── members.yml
├── _includes
│ ├── footer.html
│ ├── head.html
│ ├── header.html
│ └── ...
├── _layouts
│ ├── default.html
│ ├── home.html
│ ├── page.html
│ └── post.html
├── _posts
│ └── 2023-01-01-welcome-to-jekyll.markdown
├── _sass
│ ├── base.scss
│ ├── layout.scss
│ └── ...
├── assets
│ ├── css
│ ├── images
│ └── js
├── Gemfile
├── Gemfile.lock
├── index.html
└── ...
目录结构介绍
_config.yml
: 项目的配置文件。_data/members.yml
: 存储数据文件,例如团队成员信息。_includes/
: 包含可重用的 HTML 片段,如页眉、页脚等。_layouts/
: 包含页面布局模板。_posts/
: 存储博客文章的目录。_sass/
: 包含 SASS 样式文件。assets/
: 存储静态资源,如 CSS、图片和 JavaScript 文件。Gemfile
和Gemfile.lock
: 定义项目依赖的 Gem 文件。index.html
: 网站的主页。
2. 项目的启动文件介绍
Jekyll-Klise 项目的启动文件主要是 index.html
和 _config.yml
。
index.html
这是网站的入口文件,定义了网站的主页结构和内容。
_config.yml
这是 Jekyll 项目的配置文件,包含了网站的基本配置信息,如网站标题、描述、URL 等。
3. 项目的配置文件介绍
_config.yml
_config.yml
文件是 Jekyll 项目的核心配置文件,包含以下主要配置项:
title: 你的网站标题
email: 你的邮箱地址
description: 网站描述
baseurl: "" # 网站的根路径
url: "http://你的网站地址.com"
twitter_username: 你的Twitter用户名
github_username: 你的GitHub用户名
# 构建配置
markdown: kramdown
theme: jekyll-klise
plugins:
- jekyll-feed
- jekyll-sitemap
# 其他配置
exclude:
- Gemfile
- Gemfile.lock
- vendor
配置项介绍
title
: 网站的标题。email
: 联系邮箱。description
: 网站的描述。baseurl
: 网站的根路径。url
: 网站的完整 URL。twitter_username
和github_username
: 社交媒体用户名。markdown
: 使用的 Markdown 解析器。theme
: 使用的主题。plugins
: 启用的插件列表。exclude
: 构建时排除的文件和目录。
以上是 Jekyll-Klise 项目的基本使用教程,涵盖了项目的目录结构、启动文件和配置文件的介绍。希望对你有所帮助!