开源项目 yashitanamdeo.github.io 使用教程
1. 项目的目录结构及介绍
yashitanamdeo.github.io/
├── _config.yml
├── _data/
│ └── members.yml
├── _includes/
│ ├── footer.html
│ ├── head.html
│ ├── header.html
│ └── scripts.html
├── _layouts/
│ ├── default.html
│ ├── home.html
│ ├── page.html
│ └── post.html
├── _posts/
│ └── 2023-01-01-welcome-to-jekyll.markdown
├── _sass/
│ ├── _base.scss
│ ├── _layout.scss
│ └── _syntax-highlighting.scss
├── assets/
│ ├── css/
│ │ └── main.scss
│ ├── fonts/
│ └── images/
├── index.html
└── README.md
目录结构介绍
_config.yml
: 项目的配置文件,包含网站的基本设置和配置。_data/
: 存放项目的数据文件,例如members.yml
文件。_includes/
: 存放可重用的HTML片段,如页眉、页脚等。_layouts/
: 存放页面的布局模板,如默认布局、首页布局等。_posts/
: 存放博客文章的Markdown文件。_sass/
: 存放SASS样式文件,用于生成CSS。assets/
: 存放静态资源,如CSS、字体和图片。index.html
: 网站的首页文件。README.md
: 项目的说明文档。
2. 项目的启动文件介绍
项目的启动文件是 index.html
,它是网站的首页文件。该文件通常包含网站的基本结构和内容,并且会引用 _includes/
目录下的HTML片段和 assets/
目录下的CSS和JavaScript文件。
3. 项目的配置文件介绍
项目的配置文件是 _config.yml
,它是一个YAML格式的文件,用于配置网站的基本设置。以下是一些常见的配置项:
title: 网站标题
email: 你的邮箱地址
description: 网站描述
baseurl: "" # 网站的根路径
url: "https://你的域名.com" # 网站的URL
twitter_username: 你的Twitter用户名
github_username: 你的GitHub用户名
# 导航栏链接
nav:
- title: 首页
url: /
- title: 关于
url: /about/
- title: 博客
url: /blog/
# 其他配置项
通过修改 _config.yml
文件,你可以自定义网站的标题、描述、导航栏链接等设置。