53852dbbb0e3f0a52d4fb452fae820419da98de2
Personal Blog
一个简洁优雅的个人博客网站。
功能特性
- 首页文章列表
- 文章详情页(支持 Markdown 渲染)
- 关于页面
- 响应式设计,简洁优雅的界面
技术栈
- Python 3.8+
- Flask
- Markdown
- HTML5 / CSS3
目录结构
personal-blog/
├── app.py # Flask 应用入口
├── requirements.txt # 依赖文件
├── README.md # 说明文件
├── posts/ # Markdown 文章目录
│ ├── hello-world.md
│ └── python-tips.md
├── templates/ # HTML 模板
│ ├── base.html
│ ├── index.html
│ ├── post.html
│ └── about.html
└── static/
└── css/
└── style.css
快速开始
- 安装依赖:
pip install -r requirements.txt
- 启动应用:
python app.py
- 打开浏览器访问:
http://127.0.0.1:5000
添加新文章
在 posts/ 目录下创建新的 .md 文件,文件名即为 URL 路径。
文件头部使用 YAML front matter 定义元信息:
---
title: 我的文章标题
date: 2024-01-01
summary: 文章摘要
---
正文内容...
License
MIT
Languages
CSS
44.8%
HTML
32.5%
Python
22.7%