优化页面结构:移除README文件中的Front Matter,改为在配置文件中统一管理页面元数据
This commit is contained in:
42
Gemfile
42
Gemfile
@@ -1,42 +0,0 @@
|
||||
source "https://rubygems.org"
|
||||
|
||||
# Hello! This is where you manage which Jekyll version is used to run.
|
||||
# When you want to use a different version, change it below, save the
|
||||
# file and run `bundle install`. Run Jekyll with `bundle exec`, like this:
|
||||
#
|
||||
# bundle exec jekyll serve
|
||||
#
|
||||
# This will help ensure the proper Jekyll version is running.
|
||||
# Happy Jekylling!
|
||||
|
||||
gem "jekyll", "~> 4.3.2"
|
||||
|
||||
# This is the default theme for new Jekyll sites.
|
||||
gem "jekyll-theme-cayman", "~> 0.2.0"
|
||||
|
||||
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
|
||||
# uncomment the line below. To upgrade, run `bundle update github-pages`.
|
||||
# gem "github-pages", group: :jekyll_plugins
|
||||
|
||||
# If you have any plugins, put them here!
|
||||
group :jekyll_plugins do
|
||||
gem "jekyll-feed", "~> 0.12"
|
||||
gem "jekyll-sitemap", "~> 1.4"
|
||||
gem "jekyll-seo-tag", "~> 2.8"
|
||||
gem "jekyll-optional-front-matter", "~> 0.3.2"
|
||||
gem "jekyll-readme-index", "~> 0.3.0"
|
||||
end
|
||||
|
||||
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
|
||||
# and associated library.
|
||||
platforms :mingw, :x64_mingw, :mswin, :jruby do
|
||||
gem "tzinfo", ">= 1", "< 3"
|
||||
gem "tzinfo-data"
|
||||
end
|
||||
|
||||
# Performance-booster for watching directories on Windows
|
||||
gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]
|
||||
|
||||
# Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem
|
||||
# do not have a Java counterpart.
|
||||
gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby]
|
||||
14
README.md
14
README.md
@@ -1,11 +1,3 @@
|
||||
---
|
||||
title: "FlyPython - Python Learning Resources"
|
||||
description: "A curated collection of Python learning resources including tutorials, books, courses, and best practices for developers at all levels."
|
||||
layout: default
|
||||
lang: en
|
||||
permalink: /
|
||||
---
|
||||
|
||||
# 🐍 FlyPython
|
||||
|
||||
[python.flypython.com](https://python.flypython.com )
|
||||
@@ -64,19 +56,17 @@ permalink: /
|
||||
|
||||
#### Beginner
|
||||
- 《Python Crash Course: A Hands-On, Project-Based Introduction to Programming for begainners》 (3rd Edition, 2023)
|
||||
- ※※※※※
|
||||
|
||||
- [Amazon](https://www.amazon.com/Python-Crash-Course-Hands-Project-Based/dp/1718502702)
|
||||
|
||||
- 《STARTING OUT WITH PYTHON (4TH EDITION)》
|
||||
- ※※※※※
|
||||
- [Amazon](https://www.amazon.com/Starting-Out-Python-Tony-Gaddis/dp/0134444329)
|
||||
|
||||
- 《Automate the Boring Stuff with Python: Practical Programming for Total Beginners》 (2nd Edition)
|
||||
- ※※※※※
|
||||
- [Free Online](https://automatetheboringstuff.com/) | [Amazon](https://www.amazon.com/Automate-Boring-Stuff-Python-Programming/dp/1593279922)
|
||||
|
||||
- 《Python Cookbook: Recipes for Mastering Python 3》
|
||||
- ※※※※※
|
||||
|
||||
- [Amazon](https://www.amazon.co.uk/Python-Cookbook-David-Beazley/dp/1449340377)
|
||||
|
||||
#### Modern Python (2023-2024)
|
||||
|
||||
@@ -1,11 +1,3 @@
|
||||
---
|
||||
title: "FlyPython - Python 学习资源"
|
||||
description: "精心策划的 Python 学习资源集合,包含教程、书籍、课程和各级别开发者的最佳实践。"
|
||||
layout: default
|
||||
lang: zh-CN
|
||||
permalink: /README_cn.html
|
||||
---
|
||||
|
||||
# 🐍 FlyPython
|
||||
|
||||
https://flypython.com
|
||||
|
||||
22
_config.yml
22
_config.yml
@@ -63,12 +63,28 @@ defaults:
|
||||
type: "posts"
|
||||
values:
|
||||
layout: "post"
|
||||
author: "FlyPython Community"
|
||||
author: "FlyPython"
|
||||
- scope:
|
||||
path: ""
|
||||
type: "pages"
|
||||
values:
|
||||
layout: "page"
|
||||
- scope:
|
||||
path: "README.md"
|
||||
values:
|
||||
layout: "default"
|
||||
title: "FlyPython - Python Learning Resources"
|
||||
description: "A curated collection of Python learning resources including tutorials, books, courses, and best practices for developers at all levels."
|
||||
lang: "en"
|
||||
permalink: "/"
|
||||
- scope:
|
||||
path: "README_cn.md"
|
||||
values:
|
||||
layout: "default"
|
||||
title: "FlyPython - Python 学习资源"
|
||||
description: "精心策划的 Python 学习资源集合,包含教程、书籍、课程和各级别开发者的最佳实践。"
|
||||
lang: "zh-CN"
|
||||
permalink: "/README_cn.html"
|
||||
- scope:
|
||||
path: ""
|
||||
type: "tutorials"
|
||||
@@ -84,8 +100,8 @@ defaults:
|
||||
google_analytics: # UA-XXXXXXXX-X
|
||||
|
||||
# Features
|
||||
show_downloads: true
|
||||
show_github_ribbon: true
|
||||
show_downloads: false
|
||||
show_github_ribbon: false
|
||||
|
||||
# Custom variables
|
||||
github:
|
||||
|
||||
@@ -1,118 +0,0 @@
|
||||
# FlyPython 内容更新总结报告
|
||||
|
||||
## 📅 更新日期
|
||||
2024年12月
|
||||
|
||||
## ✅ 已修复的失效链接
|
||||
|
||||
### 🔴 高优先级修复(21个失效链接)
|
||||
|
||||
#### DataCamp 链接替代
|
||||
- ❌ `http://www.datacamp.com/community/tutorials/python-list-comprehension`
|
||||
- ✅ 替换为:
|
||||
- [Python List Comprehension Tutorial - Real Python](https://realpython.com/list-comprehension-python/)
|
||||
- [Beginner's Guide To List Comprehensions - Zero to Mastery](https://zerotomastery.io/blog/list-comprehension-python/)
|
||||
|
||||
- ❌ `http://www.datacamp.com/community/tutorials/python-excel-tutorial`
|
||||
- ✅ 替换为:
|
||||
- [Python Excel Tutorial: The Definitive Guide - HackerNoon](https://hackernoon.com/python-excel-tutorial-the-definitive-guide-934ee6dd15b0)
|
||||
- [Data Analysis with Python in Excel - Anaconda](https://learning.anaconda.cloud/anaconda-certified-data-analysis-with-python-in-excel)
|
||||
|
||||
- ❌ `https://www.datacamp.com/community/tutorials/finance-python-trading`
|
||||
- ✅ 替换为:
|
||||
- [The 2024 Guide to Using YFinance with Python](https://kritjunsree.medium.com/the-2024-guide-to-using-yfinance-with-python-for-effective-stock-analysis-668a4a26ee3a)
|
||||
- [Quantitative Trading with Python: Analyzing Financial Data](https://medium.com/@deepml1818/quantitative-trading-with-python-analyzing-financial-data-7c829d447e0a)
|
||||
|
||||
#### Udemy/Bit.ly 短链接替代
|
||||
- ❌ `http://bit.ly/2nktytU` (REST API课程)
|
||||
- ❌ `http://bit.ly/2FfVW8G` (算法交易课程)
|
||||
- ❌ `https://www.udemy.com/rest-api-flask-and-python/`
|
||||
- ❌ `https://www.udemy.com/python-for-finance-and-trading-algorithms/`
|
||||
- ✅ 替换为:
|
||||
- [REST APIs with Flask and Python in 2024 - Coursera](https://www.coursera.org/learn/packt-rest-apis-with-flask-and-python-in-2024-i01az)
|
||||
- [REST APIs with Flask and Python - Complete Guide](https://rest-apis-flask.teclado.com/)
|
||||
|
||||
#### 个人博客/失效网站替代
|
||||
- ❌ `http://veekaybee.github.io/2017/09/26/python-packaging`
|
||||
- ✅ 替换为:
|
||||
- [Python Packaging User Guide](https://packaging.python.org/en/latest/tutorials/packaging-projects/)
|
||||
- [Real Python: Python Modules and Packages](https://realpython.com/python-modules-packages/)
|
||||
|
||||
- ❌ `https://lintlyci.github.io/Flake8Rules`
|
||||
- ✅ 替换为:
|
||||
- [Flake8 Error Codes Documentation](https://flake8.pycqa.org/en/latest/user/error-codes.html)
|
||||
|
||||
#### Reddit链接说明
|
||||
- ✅ **保留** Reddit链接 (虽然检测为403,但实际可访问,只是阻止自动化检查)
|
||||
|
||||
## 🆕 新增现代化内容
|
||||
|
||||
### Python for LLM 部分(全新添加)
|
||||
- [Python for AI and Machine Learning](https://realpython.com/learning-paths/machine-learning-python/)
|
||||
- [LangChain Python Documentation](https://python.langchain.com/docs/get_started/introduction/)
|
||||
- [OpenAI Python Library](https://github.com/openai/openai-python)
|
||||
- [Building LLM Applications with Python](https://www.deeplearning.ai/short-courses/)
|
||||
|
||||
### 现代Python书籍推荐
|
||||
#### 英文版新增:
|
||||
- **Modern Python (2023-2024)** 新分类
|
||||
- 《Effective Python: 90 Specific Ways to Write Better Python》 (2nd Edition)
|
||||
- 《Clean Code in Python》
|
||||
- 更新了经典书籍到最新版本
|
||||
|
||||
#### 中文版新增:
|
||||
- **现代Python(2023-2024)** 新分类
|
||||
- 《Python数据科学手册》(第2版)
|
||||
- 《Python机器学习实战》
|
||||
- 《深度学习入门:基于Python的理论与实现》
|
||||
- 《Python高性能编程》
|
||||
- 《架构整洁之道:Python编程》
|
||||
|
||||
### 课程资源扩充
|
||||
#### 中文课程新增:
|
||||
- **进阶课程** 分类
|
||||
- **专业领域** 分类
|
||||
- 中文本土化资源(菜鸟教程、廖雪峰Python教程)
|
||||
|
||||
### 分类结构优化
|
||||
- **Spreasheet** → **Spreadsheet** (修正拼写错误)
|
||||
- **Flake** → **Flask & Code Quality** (更准确的分类)
|
||||
- 添加了更多Flask REST API开发资源
|
||||
|
||||
## 📈 内容质量提升
|
||||
|
||||
### 🎯 2024年现代化
|
||||
- 所有新增资源都是2023-2024年的最新内容
|
||||
- 替代了过时的2017-2018年资源
|
||||
- 添加了现代Python生态工具和最佳实践
|
||||
|
||||
### 🌏 本土化改善
|
||||
- 为中文用户添加了更多中文资源
|
||||
- 保持了英文资源的国际化视野
|
||||
- 提供了免费和付费资源的平衡
|
||||
|
||||
### 🔧 技术栈现代化
|
||||
- 从过时的Udemy课程转向现代平台(Coursera、官方文档)
|
||||
- 添加了容器化、CI/CD等现代开发实践
|
||||
- 包含了AI/ML/LLM等前沿技术
|
||||
|
||||
## 📊 统计数据
|
||||
|
||||
- **修复失效链接**: 21个
|
||||
- **新增链接**: 25个
|
||||
- **更新资源**: 15个
|
||||
- **新增分类**: 4个
|
||||
- **提升覆盖面**: AI/ML、数据科学、Web开发、金融科技
|
||||
|
||||
## 🔄 后续维护建议
|
||||
|
||||
1. **季度链接检查**: 使用 `tools/check_links.py` 脚本定期验证
|
||||
2. **年度内容审核**: 每年更新书籍推荐和课程资源
|
||||
3. **社区反馈收集**: 建立用户反馈机制
|
||||
4. **技术趋势跟踪**: 关注Python生态新发展
|
||||
|
||||
---
|
||||
|
||||
**更新完成时间**: 2024年12月
|
||||
**更新人员**: AI Assistant
|
||||
**下次检查建议**: 2025年3月
|
||||
@@ -1,145 +0,0 @@
|
||||
---
|
||||
title: "Contributing to FlyPython"
|
||||
description: "How to contribute to the FlyPython project"
|
||||
---
|
||||
|
||||
# 🤝 Contributing to FlyPython
|
||||
|
||||
感谢您对 FlyPython 项目的关注!我们欢迎各种形式的贡献。
|
||||
|
||||
## 📋 贡献方式 / Ways to Contribute
|
||||
|
||||
### 🔗 资源推荐 / Resource Recommendations
|
||||
- 推荐优质的Python学习资源
|
||||
- 分享有用的工具和库
|
||||
- 提供最新的教程和课程信息
|
||||
|
||||
### 🐛 问题报告 / Issue Reporting
|
||||
- 报告失效的链接
|
||||
- 指出内容错误或过时信息
|
||||
- 建议改进网站功能
|
||||
|
||||
### 📝 内容改进 / Content Improvement
|
||||
- 改进文档质量
|
||||
- 添加描述和分类
|
||||
- 翻译内容(中英文)
|
||||
|
||||
### 💻 技术贡献 / Technical Contributions
|
||||
- 改进网站设计
|
||||
- 优化性能
|
||||
- 添加新功能
|
||||
|
||||
## 🔄 贡献流程 / Contribution Process
|
||||
|
||||
### 1. Fork 项目
|
||||
```bash
|
||||
# 克隆你的 fork
|
||||
git clone https://github.com/YOUR-USERNAME/python.git
|
||||
cd python
|
||||
```
|
||||
|
||||
### 2. 创建分支
|
||||
```bash
|
||||
# 创建新分支用于你的更改
|
||||
git checkout -b feature/your-feature-name
|
||||
# 或者
|
||||
git checkout -b fix/issue-description
|
||||
```
|
||||
|
||||
### 3. 进行更改
|
||||
- 遵循现有的格式和风格
|
||||
- 确保链接有效
|
||||
- 添加适当的描述
|
||||
|
||||
### 4. 测试更改
|
||||
```bash
|
||||
# 本地测试 Jekyll 网站
|
||||
bundle install
|
||||
bundle exec jekyll serve
|
||||
|
||||
# 检查链接有效性
|
||||
python tools/check_links.py
|
||||
```
|
||||
|
||||
### 5. 提交更改
|
||||
```bash
|
||||
git add .
|
||||
git commit -m "feat: add new Python tutorial resource"
|
||||
# 或者
|
||||
git commit -m "fix: update broken link in finance section"
|
||||
```
|
||||
|
||||
### 6. 推送并创建 Pull Request
|
||||
```bash
|
||||
git push origin your-branch-name
|
||||
```
|
||||
|
||||
然后在 GitHub 上创建 Pull Request。
|
||||
|
||||
## 📝 提交信息规范 / Commit Message Convention
|
||||
|
||||
使用语义化提交信息:
|
||||
|
||||
- `feat:` 添加新功能或资源
|
||||
- `fix:` 修复问题或错误
|
||||
- `docs:` 更新文档
|
||||
- `style:` 格式化或样式更改
|
||||
- `refactor:` 重构代码
|
||||
- `test:` 添加或修改测试
|
||||
- `chore:` 维护任务
|
||||
|
||||
### 示例 / Examples:
|
||||
```
|
||||
feat: add new machine learning tutorial section
|
||||
fix: update broken DataCamp links
|
||||
docs: improve installation instructions
|
||||
style: format README according to style guide
|
||||
```
|
||||
|
||||
## 📚 内容质量标准 / Content Quality Standards
|
||||
|
||||
### 资源推荐标准
|
||||
1. **相关性**: 必须与Python学习相关
|
||||
2. **质量**: 内容准确、实用、最新
|
||||
3. **可访问性**: 链接有效,内容可访问
|
||||
4. **多样性**: 涵盖不同难度级别和应用领域
|
||||
|
||||
### 链接要求
|
||||
- 提供工作的URL
|
||||
- 添加描述说明
|
||||
- 注明语言(中文/英文)
|
||||
- 标注难度级别(如适用)
|
||||
|
||||
### 格式要求
|
||||
- 使用Markdown格式
|
||||
- 遵循现有的结构和风格
|
||||
- 添加适当的emoji和分类标签
|
||||
|
||||
## 🔍 代码审查 / Code Review
|
||||
|
||||
所有贡献都将经过代码审查:
|
||||
|
||||
1. **内容审查**: 确保资源质量和相关性
|
||||
2. **格式检查**: 验证Markdown格式和链接
|
||||
3. **技术审查**: 检查代码质量和性能
|
||||
4. **兼容性测试**: 确保与GitHub Pages兼容
|
||||
|
||||
## 🆘 获取帮助 / Getting Help
|
||||
|
||||
如果您有任何问题:
|
||||
|
||||
1. 查看现有的 [Issues](https://github.com/flypython/python/issues)
|
||||
2. 创建新的 Issue 描述您的问题
|
||||
3. 在 Pull Request 中提问
|
||||
|
||||
## 📄 许可证 / License
|
||||
|
||||
通过贡献到这个项目,您同意您的贡献将在与项目相同的许可证下授权。
|
||||
|
||||
## 🙏 致谢 / Acknowledgments
|
||||
|
||||
感谢所有贡献者使 FlyPython 成为更好的Python学习资源!
|
||||
|
||||
---
|
||||
|
||||
**🚀 Happy Contributing!** 让我们一起让Python学习变得更好!
|
||||
@@ -1,281 +0,0 @@
|
||||
---
|
||||
title: "Deployment Guide"
|
||||
description: "How to deploy FlyPython website"
|
||||
---
|
||||
|
||||
# 🚀 FlyPython 部署指南 / Deployment Guide
|
||||
|
||||
本文档说明如何部署和维护 FlyPython 网站。
|
||||
|
||||
## 🏗️ 架构概览 / Architecture Overview
|
||||
|
||||
```
|
||||
FlyPython Website
|
||||
├── GitHub Repository (Source)
|
||||
├── GitHub Pages (Hosting)
|
||||
├── Jekyll (Static Site Generator)
|
||||
├── Cayman Theme (UI Framework)
|
||||
└── Custom CSS/JS (Enhancements)
|
||||
```
|
||||
|
||||
## 📁 项目结构 / Project Structure
|
||||
|
||||
```
|
||||
python/
|
||||
├── _config.yml # Jekyll 配置
|
||||
├── _layouts/ # 页面布局模板
|
||||
│ └── default.html
|
||||
├── _includes/ # 可重用组件
|
||||
│ └── head-custom.html
|
||||
├── _data/ # 数据文件
|
||||
│ └── navigation.yml
|
||||
├── assets/ # 静态资源
|
||||
│ └── css/
|
||||
│ └── custom.css
|
||||
├── docs/ # 文档目录
|
||||
├── tools/ # 维护工具
|
||||
│ └── check_links.py
|
||||
├── README.md # 英文主页
|
||||
├── README_cn.md # 中文主页
|
||||
├── 404.md # 错误页面
|
||||
├── robots.txt # SEO配置
|
||||
├── CNAME # 域名配置
|
||||
└── Gemfile # Ruby依赖
|
||||
```
|
||||
|
||||
## 🌐 GitHub Pages 部署 / GitHub Pages Deployment
|
||||
|
||||
### 自动部署 / Automatic Deployment
|
||||
|
||||
GitHub Pages 会自动构建和部署:
|
||||
|
||||
1. **推送到主分支** → 自动触发构建
|
||||
2. **Jekyll 处理** → 生成静态文件
|
||||
3. **部署到 GitHub Pages** → 网站更新
|
||||
|
||||
### 部署配置
|
||||
|
||||
```yaml
|
||||
# _config.yml 关键配置
|
||||
url: "https://python.flypython.com"
|
||||
baseurl: ""
|
||||
remote_theme: pages-themes/cayman@v0.2.0
|
||||
plugins:
|
||||
- jekyll-feed
|
||||
- jekyll-sitemap
|
||||
- jekyll-seo-tag
|
||||
```
|
||||
|
||||
### 域名配置
|
||||
|
||||
```
|
||||
# CNAME 文件内容
|
||||
python.flypython.com
|
||||
```
|
||||
|
||||
## 🔧 本地开发 / Local Development
|
||||
|
||||
### 环境要求
|
||||
|
||||
- Ruby 2.7+
|
||||
- Bundler
|
||||
- Jekyll
|
||||
|
||||
### 安装步骤
|
||||
|
||||
```bash
|
||||
# 1. 克隆仓库
|
||||
git clone https://github.com/flypython/python.git
|
||||
cd python
|
||||
|
||||
# 2. 安装依赖
|
||||
bundle install
|
||||
|
||||
# 3. 启动本地服务器
|
||||
bundle exec jekyll serve
|
||||
|
||||
# 4. 访问网站
|
||||
# http://localhost:4000
|
||||
```
|
||||
|
||||
### 开发命令
|
||||
|
||||
```bash
|
||||
# 本地开发服务器
|
||||
bundle exec jekyll serve --watch --drafts
|
||||
|
||||
# 构建静态文件
|
||||
bundle exec jekyll build
|
||||
|
||||
# 检查链接有效性
|
||||
python tools/check_links.py
|
||||
|
||||
# 清理构建文件
|
||||
bundle exec jekyll clean
|
||||
```
|
||||
|
||||
## 📊 性能监控 / Performance Monitoring
|
||||
|
||||
### 构建时间优化
|
||||
|
||||
```yaml
|
||||
# 排除不必要的文件
|
||||
exclude:
|
||||
- tools/
|
||||
- docs/DEPLOYMENT.md
|
||||
- link_audit_report.md
|
||||
- content_update_summary.md
|
||||
```
|
||||
|
||||
### 资源优化
|
||||
|
||||
- **图片压缩**: 使用WebP格式
|
||||
- **CSS压缩**: 启用SASS压缩
|
||||
- **JavaScript最小化**: 使用Jekyll插件
|
||||
|
||||
## 🔍 SEO 配置 / SEO Configuration
|
||||
|
||||
### 关键配置
|
||||
|
||||
```yaml
|
||||
# SEO设置
|
||||
title: FlyPython
|
||||
description: "Python学习资源聚合"
|
||||
lang: zh-CN
|
||||
plugins:
|
||||
- jekyll-seo-tag
|
||||
- jekyll-sitemap
|
||||
```
|
||||
|
||||
### Sitemap 自动生成
|
||||
|
||||
- **sitemap.xml**: 自动生成
|
||||
- **robots.txt**: 手动配置
|
||||
- **Meta标签**: 自动添加
|
||||
|
||||
## 🛡️ 安全性 / Security
|
||||
|
||||
### HTTPS 配置
|
||||
|
||||
- GitHub Pages 自动提供 HTTPS
|
||||
- 强制 HTTPS 重定向已启用
|
||||
|
||||
### 依赖管理
|
||||
|
||||
```bash
|
||||
# 更新依赖
|
||||
bundle update
|
||||
|
||||
# 安全审计
|
||||
bundle audit
|
||||
```
|
||||
|
||||
## 📈 分析和监控 / Analytics & Monitoring
|
||||
|
||||
### Google Analytics(可选)
|
||||
|
||||
```yaml
|
||||
# _config.yml
|
||||
google_analytics: UA-XXXXXXXX-X
|
||||
```
|
||||
|
||||
### 性能指标
|
||||
|
||||
- **页面加载时间**: < 3秒
|
||||
- **首字节时间**: < 1秒
|
||||
- **可用性**: 99.9%
|
||||
|
||||
## 🔄 CI/CD 流程 / CI/CD Pipeline
|
||||
|
||||
### GitHub Actions 工作流
|
||||
|
||||
```yaml
|
||||
# .github/workflows/deploy.yml
|
||||
name: Deploy to GitHub Pages
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Setup Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: 3.0
|
||||
- name: Install dependencies
|
||||
run: bundle install
|
||||
- name: Build site
|
||||
run: bundle exec jekyll build
|
||||
- name: Check links
|
||||
run: python tools/check_links.py
|
||||
```
|
||||
|
||||
## 🚨 故障排除 / Troubleshooting
|
||||
|
||||
### 常见问题
|
||||
|
||||
1. **构建失败**
|
||||
```bash
|
||||
# 检查依赖
|
||||
bundle install
|
||||
bundle exec jekyll build --verbose
|
||||
```
|
||||
|
||||
2. **链接失效**
|
||||
```bash
|
||||
# 运行链接检查
|
||||
python tools/check_links.py
|
||||
```
|
||||
|
||||
3. **样式问题**
|
||||
```bash
|
||||
# 清理缓存
|
||||
bundle exec jekyll clean
|
||||
bundle exec jekyll build
|
||||
```
|
||||
|
||||
### 调试命令
|
||||
|
||||
```bash
|
||||
# 详细构建日志
|
||||
bundle exec jekyll build --verbose
|
||||
|
||||
# 增量构建
|
||||
bundle exec jekyll build --incremental
|
||||
|
||||
# 跟踪模式
|
||||
bundle exec jekyll build --trace
|
||||
```
|
||||
|
||||
## 📅 维护计划 / Maintenance Schedule
|
||||
|
||||
### 定期任务
|
||||
|
||||
- **每周**: 检查链接有效性
|
||||
- **每月**: 更新依赖包
|
||||
- **每季度**: 内容审核和更新
|
||||
- **每年**: 重大版本升级
|
||||
|
||||
### 更新流程
|
||||
|
||||
1. 创建新分支
|
||||
2. 更新内容
|
||||
3. 本地测试
|
||||
4. 提交 Pull Request
|
||||
5. 代码审查
|
||||
6. 合并到主分支
|
||||
7. 自动部署
|
||||
|
||||
---
|
||||
|
||||
## 📞 支持联系 / Support Contact
|
||||
|
||||
如有部署问题,请:
|
||||
|
||||
1. 查看 [GitHub Issues](https://github.com/flypython/python/issues)
|
||||
2. 创建新的 Issue
|
||||
3. 联系维护团队
|
||||
|
||||
**🎯 目标**: 保持网站高可用性和最佳性能!
|
||||
@@ -1,195 +0,0 @@
|
||||
# FlyPython Jekyll 升级总结报告
|
||||
|
||||
## 📅 升级日期
|
||||
2024年12月
|
||||
|
||||
## ✅ 已完成的升级工作
|
||||
|
||||
### 🎨 主题和设计升级
|
||||
|
||||
#### 1. 现代化主题
|
||||
- ❌ 旧主题: `jekyll-theme-minimal` (基础主题)
|
||||
- ✅ 新主题: `pages-themes/cayman@v0.2.0` (现代化主题)
|
||||
- **改进**: 更美观的头部设计、渐变背景、响应式布局
|
||||
|
||||
#### 2. 自定义样式系统
|
||||
- ✅ 创建 `assets/css/custom.css` (350+ 行自定义样式)
|
||||
- ✅ 语言切换按钮 (中英文双语支持)
|
||||
- ✅ 表格式目录 (TOC) 自动生成
|
||||
- ✅ 回到顶部按钮
|
||||
- ✅ 增强的链接悬停效果
|
||||
- ✅ 移动端响应式设计
|
||||
- ✅ 暗色模式支持
|
||||
- ✅ 打印样式优化
|
||||
|
||||
### ⚙️ 技术架构升级
|
||||
|
||||
#### 1. Jekyll 配置优化
|
||||
```yaml
|
||||
# 主要改进
|
||||
title: FlyPython
|
||||
subtitle: Python 学习资源聚合
|
||||
remote_theme: pages-themes/cayman@v0.2.0
|
||||
plugins: [jekyll-feed, jekyll-sitemap, jekyll-seo-tag, ...]
|
||||
```
|
||||
|
||||
#### 2. SEO 优化配置
|
||||
- ✅ 自动生成 sitemap.xml
|
||||
- ✅ SEO 标签自动添加
|
||||
- ✅ 多语言支持 (zh-CN/en-US)
|
||||
- ✅ Open Graph 标签
|
||||
- ✅ Twitter Card 支持
|
||||
- ✅ robots.txt 配置
|
||||
|
||||
#### 3. 页面布局系统
|
||||
- ✅ `_layouts/default.html` - 主布局模板
|
||||
- ✅ `_includes/head-custom.html` - 自定义头部
|
||||
- ✅ `_data/navigation.yml` - 导航配置
|
||||
- ✅ `404.md` - 自定义错误页面
|
||||
|
||||
### 📁 项目结构优化
|
||||
|
||||
#### 新增目录结构
|
||||
```
|
||||
python/
|
||||
├── _layouts/ # 🆕 Jekyll 布局模板
|
||||
├── _includes/ # 🆕 可重用组件
|
||||
├── _data/ # 🆕 配置数据
|
||||
├── assets/ # 🆕 静态资源
|
||||
│ └── css/custom.css
|
||||
├── docs/ # 🆕 项目文档
|
||||
│ ├── CONTRIBUTING.md
|
||||
│ └── DEPLOYMENT.md
|
||||
├── tools/ # 🔄 维护工具 (已存在)
|
||||
├── README.md # 🔄 增强 Front Matter
|
||||
├── README_cn.md # 🔄 增强 Front Matter
|
||||
├── 404.md # 🆕 错误页面
|
||||
├── robots.txt # 🆕 SEO 配置
|
||||
├── .gitignore # 🆕 Git 忽略规则
|
||||
└── Gemfile # 🆕 Ruby 依赖管理
|
||||
```
|
||||
|
||||
### 🌟 用户体验提升
|
||||
|
||||
#### 1. 导航体验
|
||||
- **双语切换**: 🇺🇸 English ↔ 🇨🇳 中文
|
||||
- **智能目录**: 自动生成页面目录导航
|
||||
- **回到顶部**: 长页面滚动辅助
|
||||
|
||||
#### 2. 视觉设计
|
||||
- **渐变头部**: 美观的蓝绿色渐变
|
||||
- **卡片式布局**: 现代化的内容展示
|
||||
- **图标增强**: Emoji 和视觉图标
|
||||
- **字体优化**: Open Sans 字体系统
|
||||
|
||||
#### 3. 移动端优化
|
||||
- **响应式设计**: 完全适配移动设备
|
||||
- **触摸友好**: 大按钮和清晰导航
|
||||
- **快速加载**: 优化资源加载
|
||||
|
||||
### 🔧 开发体验改进
|
||||
|
||||
#### 1. 本地开发环境
|
||||
```bash
|
||||
# 完整的开发环境配置
|
||||
bundle install
|
||||
bundle exec jekyll serve
|
||||
```
|
||||
|
||||
#### 2. 维护工具
|
||||
- ✅ 链接检查工具 (`tools/check_links.py`)
|
||||
- ✅ 构建脚本配置
|
||||
- ✅ 依赖管理 (Gemfile)
|
||||
|
||||
#### 3. 文档体系
|
||||
- ✅ **贡献指南** (`docs/CONTRIBUTING.md`)
|
||||
- ✅ **部署文档** (`docs/DEPLOYMENT.md`)
|
||||
- ✅ **代码规范** 和提交规范
|
||||
|
||||
### 📊 性能优化
|
||||
|
||||
#### 1. 加载速度
|
||||
- **CSS 优化**: 精简自定义样式
|
||||
- **图片优化**: 支持现代图片格式
|
||||
- **缓存策略**: 浏览器缓存配置
|
||||
|
||||
#### 2. SEO 性能
|
||||
- **页面标题**: 自动生成优化标题
|
||||
- **Meta 描述**: 完善的页面描述
|
||||
- **结构化数据**: Jekyll SEO 插件支持
|
||||
|
||||
### 🛡️ 技术稳定性
|
||||
|
||||
#### 1. GitHub Pages 兼容性
|
||||
- ✅ 使用 GitHub Pages 白名单插件
|
||||
- ✅ 主题版本锁定 (`@v0.2.0`)
|
||||
- ✅ 依赖版本管理
|
||||
|
||||
#### 2. 错误处理
|
||||
- ✅ 自定义 404 页面
|
||||
- ✅ 优雅的错误显示
|
||||
- ✅ 用户友好的错误信息
|
||||
|
||||
## 📈 升级效果对比
|
||||
|
||||
### 升级前 (旧版本)
|
||||
- ❌ 基础的 minimal 主题
|
||||
- ❌ 无自定义样式
|
||||
- ❌ 无移动端优化
|
||||
- ❌ 无 SEO 配置
|
||||
- ❌ 无导航系统
|
||||
- ❌ 简单的文件结构
|
||||
|
||||
### 升级后 (新版本)
|
||||
- ✅ 现代化 Cayman 主题
|
||||
- ✅ 350+ 行自定义样式
|
||||
- ✅ 完全响应式设计
|
||||
- ✅ 完整 SEO 优化
|
||||
- ✅ 智能导航和目录
|
||||
- ✅ 专业项目结构
|
||||
|
||||
## 🎯 用户价值提升
|
||||
|
||||
### 1. 学习体验
|
||||
- **更好的可读性**: 优化的字体和行间距
|
||||
- **便捷的导航**: 自动目录和语言切换
|
||||
- **移动友好**: 随时随地学习Python
|
||||
|
||||
### 2. 内容发现
|
||||
- **SEO 优化**: 更容易被搜索引擎发现
|
||||
- **分类清晰**: 良好的信息架构
|
||||
- **链接有效**: 定期维护和更新
|
||||
|
||||
### 3. 社区参与
|
||||
- **贡献友好**: 详细的贡献指南
|
||||
- **开发简单**: 完整的本地开发环境
|
||||
- **维护便捷**: 自动化工具和流程
|
||||
|
||||
## 🔮 未来规划
|
||||
|
||||
### 即将推出
|
||||
1. **CI/CD 流程** - 自动化构建和部署
|
||||
2. **移动端优化** - 进一步提升移动体验
|
||||
3. **SEO 优化** - 更深度的搜索引擎优化
|
||||
4. **分析集成** - 用户行为数据收集
|
||||
|
||||
### 长期目标
|
||||
- **多语言支持**: 扩展更多语言版本
|
||||
- **交互功能**: 搜索、筛选、收藏功能
|
||||
- **API 接口**: 资源数据API服务
|
||||
- **社区功能**: 用户评分和评论系统
|
||||
|
||||
---
|
||||
|
||||
## ✨ 总结
|
||||
|
||||
通过这次全面的Jekyll升级,FlyPython网站从一个基础的资源列表升级为具有现代化设计、优秀用户体验和专业技术架构的Python学习平台。
|
||||
|
||||
**🚀 核心成果:**
|
||||
- 📈 **用户体验提升 200%**
|
||||
- 🎨 **视觉设计现代化**
|
||||
- 📱 **移动端完全适配**
|
||||
- 🔍 **SEO 优化完善**
|
||||
- 🛠️ **开发体验极大改善**
|
||||
|
||||
**下一步**: 继续优化移动端体验和SEO,建立更完善的维护流程!
|
||||
@@ -1,105 +0,0 @@
|
||||
# FlyPython 链接审核报告
|
||||
|
||||
## 📊 总体统计
|
||||
|
||||
- **总链接数**: 113个
|
||||
- **正常链接**: 85个 (75.2%)
|
||||
- **失效链接**: 21个 (18.6%) 🔴
|
||||
- **超时链接**: 1个 (0.9%) ⏱️
|
||||
- **未知状态**: 6个 (5.3%) ❓
|
||||
|
||||
## 🔍 问题分析
|
||||
|
||||
### 1. Reddit链接问题 (403错误)
|
||||
**问题**: 所有Reddit链接都返回403错误
|
||||
**原因**: Reddit对自动化访问有严格限制
|
||||
**影响链接**:
|
||||
- https://www.reddit.com/r/Python/
|
||||
- https://www.reddit.com/r/learnpython/
|
||||
- https://www.reddit.com/r/pythontips/
|
||||
- https://www.reddit.com/r/pythoncoding
|
||||
|
||||
**修复建议**: 这些链接实际上是可访问的,只是阻止了自动化检查。保留这些链接。
|
||||
|
||||
### 2. DataCamp链接问题 (403错误)
|
||||
**问题**: 所有DataCamp教程链接都返回403错误
|
||||
**原因**: DataCamp改变了访问策略,可能需要登录
|
||||
**影响链接**:
|
||||
- Python List Comprehension Tutorial
|
||||
- Python Excel Tutorial
|
||||
- Python For Finance: Algorithmic Trading
|
||||
|
||||
**修复建议**: 寻找替代的免费教程资源
|
||||
|
||||
### 3. Udemy课程链接问题 (403错误)
|
||||
**问题**: Udemy课程链接返回403错误
|
||||
**原因**: 可能是地域限制或课程已下架
|
||||
**影响链接**:
|
||||
- REST API Flask课程
|
||||
- Python财务分析课程
|
||||
|
||||
**修复建议**: 更新为最新的相关课程链接
|
||||
|
||||
### 4. 个人博客/网站失效 (404错误)
|
||||
**问题**: 一些个人博客和项目网站已不存在
|
||||
**影响链接**:
|
||||
- veekaybee.github.io Python打包指南
|
||||
- tselai.com 希腊葡萄酒分析
|
||||
- lintlyci.github.io Flake8规则
|
||||
|
||||
**修复建议**: 寻找相同主题的替代资源
|
||||
|
||||
### 5. 短链接失效
|
||||
**问题**: bit.ly短链接已失效
|
||||
**影响链接**:
|
||||
- bit.ly/2nktytU (REST API课程)
|
||||
- bit.ly/2FfVW8G (算法交易课程)
|
||||
|
||||
**修复建议**: 找到原始链接或更新的课程链接
|
||||
|
||||
## 🔧 具体修复建议
|
||||
|
||||
### 立即修复 (高优先级)
|
||||
|
||||
1. **DataCamp替代资源**:
|
||||
```markdown
|
||||
- Python List Comprehension: https://realpython.com/list-comprehension-python/
|
||||
- Python Excel: https://openpyxl.readthedocs.io/en/stable/tutorial.html
|
||||
- Python Finance: https://pypi.org/project/yfinance/
|
||||
```
|
||||
|
||||
2. **Udemy课程替代**:
|
||||
```markdown
|
||||
- Flask REST API: https://flask-restful.readthedocs.io/en/latest/
|
||||
- Python Finance: https://github.com/wilsonfreitas/awesome-quant
|
||||
```
|
||||
|
||||
3. **博客文章替代**:
|
||||
```markdown
|
||||
- Python Packaging: https://packaging.python.org/tutorials/packaging-projects/
|
||||
- Flake8 Rules: https://flake8.pycqa.org/en/latest/user/error-codes.html
|
||||
```
|
||||
|
||||
### 中等优先级修复
|
||||
|
||||
1. **更新过时内容**: 许多链接指向2017年的文章,建议添加更新的资源
|
||||
2. **添加新兴技术**: 缺少关于现代Python生态的内容(如FastAPI、Poetry等)
|
||||
3. **移除UTM参数**: 清理URL中的跟踪参数
|
||||
|
||||
### 长期优化建议
|
||||
|
||||
1. **定期链接检查**: 建议每季度运行链接检查脚本
|
||||
2. **链接分类管理**: 按主题重新组织链接结构
|
||||
3. **本地化内容**: 为中文README添加更多中文资源
|
||||
4. **现代化更新**: 添加2020年后的新资源和工具
|
||||
|
||||
## 📝 下一步行动
|
||||
|
||||
1. **立即行动**: 修复21个失效链接
|
||||
2. **内容审核**: 评估所有2017-2018年的旧内容
|
||||
3. **新增内容**: 添加Python 3.9+的新特性和工具
|
||||
4. **结构优化**: 改进README的导航和分类
|
||||
|
||||
## 🛠️ 工具推荐
|
||||
|
||||
建议将 `check_links.py` 脚本加入到项目维护工具中,定期运行以确保链接质量。
|
||||
Reference in New Issue
Block a user