Files
personal-blog-20260928164707/README.md
T

1.2 KiB

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

快速开始

  1. 安装依赖:
pip install -r requirements.txt
  1. 启动应用:
python app.py
  1. 打开浏览器访问:
http://127.0.0.1:5000

添加新文章

在 posts/ 目录下创建新的 .md 文件,文件名即为 URL 路径。

文件头部使用 YAML front matter 定义元信息:

---
title: 我的文章标题
date: 2024-01-01
summary: 文章摘要
---

正文内容...

License

MIT