开源项目 mercyblitz.github.io 使用教程
mercyblitz.github.io小马哥的技术博客 :D项目地址:https://gitcode.com/gh_mirrors/me/mercyblitz.github.io
1. 项目的目录结构及介绍
mercyblitz.github.io/
├── _config.yml
├── _data
│ └── members.yml
├── _includes
│ ├── footer.html
│ ├── head.html
│ ├── header.html
│ └── scripts.html
├── _layouts
│ ├── default.html
│ ├── home.html
│ └── post.html
├── _posts
│ └── 2023-01-01-welcome-to-jekyll.markdown
├── _sass
│ ├── _base.scss
│ ├── _layout.scss
│ └── _syntax-highlighting.scss
├── about.md
├── assets
│ ├── css
│ │ └── main.scss
│ └── images
│ └── logo.png
├── index.md
└── README.md
目录结构介绍
_config.yml
: 项目的配置文件。_data/
: 存储项目数据文件,如members.yml
。_includes/
: 包含可重用的HTML片段,如页眉、页脚等。_layouts/
: 定义页面布局模板。_posts/
: 存储博客文章。_sass/
: 包含SASS样式文件。about.md
: 关于页面的Markdown文件。assets/
: 存储静态资源,如CSS和图片。index.md
: 主页的Markdown文件。README.md
: 项目说明文件。
2. 项目的启动文件介绍
项目的启动文件是 index.md
,它定义了网站的主页内容。通过Jekyll的构建过程,index.md
会被转换成HTML文件,并作为网站的入口页面。
3. 项目的配置文件介绍
项目的配置文件是 _config.yml
,它包含了Jekyll站点的全局配置信息。以下是一些关键配置项的介绍:
title: "Your awesome title"
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
: 网站的描述,用于SEO。baseurl
: 网站的子路径。url
: 网站的基准URL。twitter_username
: Twitter用户名。github_username
: GitHub用户名。markdown
: 使用的Markdown处理器。theme
: 使用的主题。plugins
: 启用的插件列表。
通过这些配置项,可以定制网站的基本信息和行为。
mercyblitz.github.io小马哥的技术博客 :D项目地址:https://gitcode.com/gh_mirrors/me/mercyblitz.github.io