Kross-Jekyll 开源项目教程
1. 项目的目录结构及介绍
Kross-Jekyll 项目的目录结构如下:
kross-jekyll/
├── _data/
├── _includes/
├── _layouts/
├── _posts/
├── _sass/
├── assets/
├── css/
├── images/
├── js/
├── _config.yml
├── about.md
├── contact.md
├── index.html
└── README.md
_data/
: 存储项目的数据文件。_includes/
: 包含可重用的 HTML 代码片段。_layouts/
: 存储页面的布局模板。_posts/
: 存储博客文章。_sass/
: 存储 SASS 样式文件。assets/
: 存储静态资源文件。css/
: 存储 CSS 样式文件。images/
: 存储图片文件。js/
: 存储 JavaScript 文件。_config.yml
: 项目的配置文件。about.md
: 关于页面。contact.md
: 联系页面。index.html
: 首页。README.md
: 项目说明文档。
2. 项目的启动文件介绍
项目的启动文件是 index.html
,它是网站的首页。该文件包含了页面的基本结构和内容,并引用了必要的 CSS 和 JavaScript 文件。
3. 项目的配置文件介绍
项目的配置文件是 _config.yml
,它包含了 Jekyll 站点的配置信息。以下是一些常见的配置项:
title: "Kross"
email: your-email@example.com
description: >- # this means to ignore newlines until "baseurl:"
Write an awesome description for your new site here. You can edit this
line in _config.yml. It will appear in your document head meta (for
Google search results) and in your feed.xml site description.
baseurl: "" # the subpath of your site, e.g. /blog
url: "http://example.com" # the base hostname & protocol for your site, e.g. http://example.com
twitter_username: jekyllrb
github_username: jekyll
# Build settings
markdown: kramdown
theme: minima
plugins:
- jekyll-feed
title
: 网站的标题。email
: 联系邮箱。description
: 网站的描述。baseurl
: 网站的子路径。url
: 网站的基本 URL。twitter_username
: Twitter 用户名。github_username
: GitHub 用户名。markdown
: 使用的 Markdown 处理器。theme
: 使用的主题。plugins
: 使用的插件。
通过修改 _config.yml
文件,可以自定义网站的各种设置和行为。