UITxWoodyNguyen/myblog
GitHub: UITxWoodyNguyen/myblog
一个轻量级 Jekyll 博客模板,专为发布 CTF Writeup 和安全研究文章而设计,支持深色主题和代码高亮。
Stars: 0 | Forks: 0
# Woodie 的博客
一个现代、极简、深色主题的个人博客,使用 **Jekyll** 构建并托管在 **GitHub Pages** 上。



## 功能特性
- 默认深色主题(支持浅色模式切换)
- 基于 Markdown 的博客文章
- 语法高亮(Rouge)
- 按标题、标签或内容搜索文章
- 基于标签的筛选
- 响应式设计(桌面、平板、移动端)
- SEO 优化(meta 标签、Open Graph、站点地图、RSS feed)
- 平滑动画
- 极速性能
- 零依赖(无 jQuery,无框架)
## 项目结构
```
woodie.github.io/
├── _config.yml # Jekyll configuration
├── _layouts/
│ ├── default.html # Base layout
│ ├── post.html # Blog post layout
│ └── page.html # Static page layout
├── _includes/
│ ├── head.html # meta, fonts, styles
│ ├── navbar.html # Navigation bar
│ └── footer.html # Footer
├── _posts/
│ ├── 2026-01-01-welcome-to-my-blog.md
│ ├── 2026-01-15-getting-started-with-github-pages.md
│ ├── 2026-02-01-modern-css-tips-dark-themes.md
│ └── 2026-02-20-python-for-beginners.md
├── assets/
│ ├── css/
│ │ └── style.css # All styles
│ ├── js/
│ │ └── main.js # Theme toggle, search, tags
│ └── images/ # Blog images
├── index.html # Home page (post list)
├── about.md # About page
├── 404.html # 404 error page
├── Gemfile # Ruby dependencies
└── README.md # This file
```
## 部署到 GitHub Pages(分步指南)
### 选项 A:用户/组织站点(推荐)
1. 在 GitHub 上**创建**名为 `.github.io` 的仓库
2. **克隆**该仓库:
git clone https://github.com//.github.io.git
cd .github.io
3. 将本项目的**所有文件复制**到克隆的仓库中
4. **编辑 `_config.yml`**:
title: Your Blog Name
description: "Your blog description"
author: Your Name
url: "https://.github.io"
baseurl: ""
github_username:
5. **推送到 GitHub**:
git add .
git commit -m "Initial blog setup"
git push origin main
6. **启用 GitHub Pages**(如果未自动启用):
- 进入仓库 **Settings** → **Pages**
- Source:**Deploy from a branch**
- Branch:**main** / **(root)**
- 点击 **Save**
7. **访问** `https://.github.io` —— 你的博客已上线!
### 选项 B:项目站点
1. 创建一个任意名称的仓库(例如 `my-blog`)
2. 更新 `_config.yml`:
baseurl: "/my-blog"
3. 推送到 GitHub 并在 Settings → Pages 中启用 Pages
4. 访问 `https://.github.io/my-blog`
## 撰写新文章
1. 在 `_posts/` 中创建一个新文件,格式如下:
YYYY-MM-DD-your-post-title.md
2. 在顶部添加 frontmatter:
---
title: "Your Post Title"
date: 2026-03-01
tags: [tag1, tag2]
description: "A brief description of your post."
---
Your content here in Markdown...
3. 支持的 Markdown 功能:
- 标题(`# H1` 到 `###### H6`)
- **粗体**、*斜体*、~~删除线~~
- 带语法高亮的代码块
- 图片:``
- 链接:`[text](url)`
- 表格
- 引用块
- 有序和无序列表
4. 提交并推送 —— GitHub Pages 将自动重新构建。
## 添加图片
将图片放置在 `assets/images/` 中,并在文章中引用:
```

```
## 本地开发(可选)
如果你想在推送前在本地预览:
```
# 安装 Ruby 和 Bundler(如未安装)
# 参见:https://jekyllrb.com/docs/installation/
# 安装依赖
bundle install
# 运行本地服务器
bundle exec jekyll serve
# 打开 http://localhost:4000
```
## 自定义
### 修改颜色
编辑 `assets/css/style.css` 中的 CSS 自定义属性:
```
:root {
--bg: #0D1117;
--surface: #161B22;
--primary: #58A6FF;
--text: #C9D1D9;
/* ... */
}
```
### 修改字体
更新 `_includes/head.html` 中的 Google Fonts 导入。
### 添加新页面
在根目录创建一个新的 `.md` 文件,包含 frontmatter:
```
---
layout: page
title: Contact
permalink: /contact/
---
Your content...
```
然后在 `_includes/navbar.html` 中添加链接。
## 许可证
MIT License。可自由使用和修改。
标签:0依赖, GitHub Pages, Jekyll, Markdown, Open Graph, Rouge, RSS订阅, Ruby, SEO优化, Sitemap, Writeup, 个人博客, 代码高亮, 响应式设计, 技术博客, 暗黑主题, 漏洞分析, 知识库, 网络安全, 路径探测, 防御加固, 隐私保护, 静态站点