Skip to content

Commit 19b42dd

Browse files
committed
修改文件结构
1 parent 83b3be8 commit 19b42dd

7 files changed

Lines changed: 77 additions & 19 deletions

File tree

‎404.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
layout: page
3+
title: 404 - 页面未找到
4+
permalink: /404.html # 固定路径,GitHub Pages自动识别
5+
---
6+
## 😕 抱歉,你访问的页面不存在
7+
- 可能是网址输入错误
8+
- 点击<a href="{{ site.url | relative_url }}">返回首页</a>

‎_config.yml‎

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,16 @@ url: "https://tyuecode.github.io"
88
author:
99
name: TY
1010
email: 1252107428@qq.com
11-
avatar: "/asset/MiLogal.jpg" # 作者头像路径
11+
avatar: "/assets/images/MiLogal.jpg" # 作者头像路径
12+
github: "tyuecode"
1213

1314
# 主题设置(根据主题不同而异)
14-
theme: minima # 或你的主题名称
15+
theme: minima
16+
minima:
17+
skin: auto # 自动跟随系统明暗主题(可选:light/dark)
18+
social_links: # 导航栏添加社交链接(minima v3+支持)
19+
- { platform: github, user_url: "https://github.com/tyuecode" }
20+
- { platform: email, user_url: "mailto:1252107428@qq.com" }
1521

1622
# 构建设置
1723
markdown: kramdown # 使用的Markdown解析器
@@ -22,6 +28,7 @@ source: "." # 源文件目录(通常是项目根目录)
2228
destination: "_site" # 构建输出目录
2329
layouts_dir: "_layouts" # 布局模板目录
2430
includes_dir: "_includes" # 包含文件目录(header、footer等)
31+
assets_dir: "assets" # 静态资源目录
2532

2633

2734
# 默认设置
@@ -33,6 +40,7 @@ defaults:
3340
layout: "post" # 默认使用post布局
3441
comments: true # 默认开启评论
3542
share: true # 默认开启分享
43+
author: TY
3644

3745
- scope:
3846
path: "pages" # 对pages目录下的文件生效
@@ -48,4 +56,7 @@ plugins:
4856
comments:
4957
provider: utterances
5058
utterances:
51-
repo: tyuecode/tyuecode.github.io
59+
repo: tyuecode/tyuecode.github.io # 修正缩进(YAML对缩进敏感)
60+
issue_term: pathname # 按页面路径匹配评论
61+
label: comment 💬 # 评论对应的GitHub Issue标签
62+
theme: github-light # 评论区主题(可选:github-dark)
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
layout: post
3+
title: "我的第一篇博客:Jekyll+GitHub Pages搭建指南"
4+
date: 2026-02-02 10:00:00 +0800
5+
categories: [博客教程, GitHub Pages] # 精准分类(两级)
6+
tags: [github, jekyll, 静态博客] # 细分标签
7+
excerpt: "本文详细讲解从0到1搭建Jekyll+GitHub Pages博客,包括配置、部署、个性化全流程。" # 自定义摘要
8+
toc: true # 开启目录(后续实现)
9+
---
10+
11+
# 欢迎来到我的博客!
12+
这是我的第一篇博客,记录基于Jekyll+GitHub Pages搭建个人博客的全过程。
13+
14+
<!--more--> <!-- 摘要分隔符,前面内容会作为首页摘要 -->
15+
16+
## 一、为什么选Jekyll+GitHub Pages?
17+
- 免费:GitHub Pages提供免费静态托管,无服务器成本;
18+
- 轻量:无数据库,静态页面加载快;
19+
- 易维护:Markdown写文章,Git版本控制。
20+
21+
## 二、核心步骤
22+
1. 创建GitHub仓库(命名:用户名.github.io);
23+
2. 配置Jekyll核心文件(_config.yml、_posts等);
24+
3. 通过GitHub Actions自动部署。
25+
26+
### 代码示例
27+
```bash
28+
# 本地启动Jekyll服务
29+
bundle exec jekyll serve

‎_posts/2026-2-2-第一篇博客.md‎

Lines changed: 0 additions & 16 deletions
This file was deleted.

‎about.md‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
layout: page
3+
title: 关于我
4+
permalink: /about/ # 固定访问路径:https://tyuecode.github.io/about/
5+
---
6+
# 关于TY
7+
嗨,我是TY,一名热爱编程的开发者,喜欢分享技术干货和生活感悟。
8+
9+
## 联系方式
10+
- 邮箱:{{ site.author.email }} <!-- 复用_config.yml中的配置,避免重复修改 -->
11+
- GitHub:<a href="https://github.com/tyuecode">tyuecode</a>

‎index.md‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
layout: home # 使用minima主题的home布局
3+
title: 首页
4+
---
5+
# 欢迎来到TY的博客 📝
6+
分享编程技巧与生活感悟,专注于Jekyll、GitHub、前端相关内容。
7+
8+
## 最新文章
9+
{% for post in site.posts limit:5 %} <!-- 遍历文章,只显示5篇 -->
10+
<div class="post-item">
11+
<h3><a href="{{ post.url | relative_url }}">{{ post.title }}</a></h3>
12+
<p class="post-meta">{{ post.date | date: "%Y-%m-%d" }} | {{ post.categories | join: " / " }}</p>
13+
<p class="post-excerpt">{{ post.excerpt | strip_html | truncate: 150 }}</p> <!-- 摘要(去HTML+截断) -->
14+
</div>
15+
{% endfor %}

0 commit comments

Comments
 (0)