{"id":15030666,"url":"https://github.com/hopetree/izone","last_synced_at":"2026-10-19T14:36:29.320Z","repository":{"id":27812912,"uuid":"115265222","full_name":"Hopetree/izone","owner":"Hopetree","description":"一个基于Django的博客项目，也可以当做一个文档管理网站使用，自带评论、定时任务等功能，界面简约而不简单","archived":false,"fork":false,"pushed_at":"2026-09-30T01:43:29.000Z","size":7351,"stargazers_count":1230,"open_issues_count":5,"forks_count":381,"subscribers_count":31,"default_branch":"master","last_synced_at":"2026-10-14T12:56:52.988Z","etag":null,"topics":["blog","bootstrap","django","docker","python"],"latest_commit_sha":null,"homepage":"https://tendcode.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Hopetree.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","claude":"CLAUDE.md","gemini":null,"cursor":null,"copilot":null,"dco":null,"cla":null,"disclosure":null}},"created_at":"2017-12-24T13:39:43.000Z","updated_at":"2026-10-10T03:26:18.000Z","dependencies_parsed_at":"2026-09-17T03:28:24.657Z","dependency_job_id":null,"html_url":"https://github.com/Hopetree/izone","commit_stats":{"total_commits":885,"total_committers":4,"mean_commits":221.25,"dds":"0.13446327683615822","last_synced_commit":"c011b482de597004edb34c84da7de4dc5eb9d8b2"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/Hopetree/izone","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hopetree%2Fizone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hopetree%2Fizone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hopetree%2Fizone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hopetree%2Fizone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Hopetree","download_url":"https://codeload.github.com/Hopetree/izone/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hopetree%2Fizone/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":344872684,"owners_count":38358121,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-10-03T21:59:58.778Z","status":"online","status_checked_at":"2026-10-19T02:00:06.414Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blog","bootstrap","django","docker","python"],"created_at":"2024-09-24T20:14:00.369Z","updated_at":"2026-10-19T14:36:29.308Z","avatar_url":"https://github.com/Hopetree.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# izone\n\n一个以 Django 框架搭建的个人博客系统。\n\n线上地址：https://tendcode.com/\n\n## 技术栈\n\n| 层级 | 技术 |\n|------|------|\n| 后端框架 | Django 2.2 + Python 3.9 |\n| 数据库 | MySQL（utf8mb4） |\n| 缓存 / 消息队列 | Redis |\n| 异步任务 | Celery 4.4（Worker + Beat 合并单进程） |\n| 搜索引擎 | MySQL FULLTEXT（n-gram 中文分词） |\n| 前端 | Bootstrap 4 + jQuery |\n| 容器化 | Docker + Gunicorn + Supervisord |\n\n## 页面效果（响应式）\n\n![PC首页](https://github.com/Hopetree/izone/assets/30201215/e221d09b-9921-4707-977d-95c263d282b6)\n\n![PC首页暗色主题](https://github.com/Hopetree/izone/assets/30201215/ca505bfc-e5d0-40a1-b501-946975c03f73)\n\n![PC文章页面](https://github.com/Hopetree/izone/assets/30201215/0c219bbd-6f29-4866-a827-6e98536f689a)\n\n![PC 专题页，按文章归类](https://github.com/Hopetree/izone/assets/30201215/c0a828cc-2201-438b-a983-0c6c04a429c4)\n\n![PC 友情链接页](https://github.com/Hopetree/izone/assets/30201215/033cdd61-75cf-41b4-bb45-9b45948daf3a)\n\n![PC 在线工具](https://github.com/Hopetree/izone/assets/30201215/8336fd89-916b-49e5-94f2-a5a72e990158)\n\n![ipad](https://user-images.githubusercontent.com/30201215/60588800-7e558800-9dca-11e9-8beb-5d2dcf01b869.jpg)\n\n![iphone](https://user-images.githubusercontent.com/30201215/60588832-8e6d6780-9dca-11e9-84fa-f1d71510c81e.jpg)\n\n## 文档索引\n\n| 文档 | 说明 |\n|------|------|\n| [产品需求规格说明书](docs/design/01_PRD_产品需求规格说明书.md) | 产品需求，包含功能列表和非功能需求 |\n| [架构设计文档](docs/design/02_TDD_架构设计文档.md) | 技术选型、模块划分、部署架构 |\n| [数据库设计文档](docs/design/03_ERD_数据库设计文档.md) | 实体定义、关系说明、设计决策 |\n| [API 接口文档](docs/design/04_API_接口文档.md) | 各应用 JSON API 端点 |\n| [Code Review 报告](docs/code-review.md) | 代码审查与问题追踪 |\n| [AGENTS.md](AGENTS.md) | 项目工作指南（架构速览、提交规范、构建约束） |\n\n## 功能\n\n- Django 后台管理系统，方便管理文章、用户及其他动态内容\n- 文章分类、标签、专题（Subject → Topic → Article）层级结构\n- 全文搜索（MySQL FULLTEXT n-gram 中文分词，直接查询实时数据）\n- 文章评论系统（二级回复、微博表情、Markdown）、评论通知\n- 用户认证（Django 用户系统 + OAuth 微博/GitHub 第三方登录）\n- 浏览量统计（爬虫 UA 过滤、按访客 30 分钟去重、每日快照）\n- 友链管理（在线申请、定时自动校链，外呼有并发上限）\n- RSS 订阅、Sitemap 网站地图、百度 SEO 推送\n- RESTful API（条件启用，DRF DefaultRouter；列表接口不返回正文）\n- 在线工具（条件启用）、服务监控、导航网站、流程图、脚本工具分享\n- 响应式设计（PC / iPad / 手机），暗色主题支持\n- Redis 缓存（文章渲染/RSS 正文/站点配置/侧边栏统计/未读计数），Celery 定时任务调度\n\n## 快速开始\n\n### Docker 部署\n\n```bash\n# 构建镜像\ndocker build -t hopetree/izone:lts .\n\n# slim 镜像（国内构建）\ndocker build --build-arg pip_index_url=http://mirrors.aliyun.com/pypi/simple/ \\\n             --build-arg pip_trusted_host=mirrors.aliyun.com \\\n             --build-arg debian_host=mirrors.ustc.edu.cn \\\n             -f Dockerfile-slim -t hopetree/izone:lts .\n\n# 运行（需要预先启动 MySQL 和 Redis）\ndocker run -d \\\n  -e IZONE_MYSQL_HOST=mysql_host \\\n  -e IZONE_MYSQL_PASSWORD=your_password \\\n  -e IZONE_REDIS_HOST=redis_host \\\n  -p 8000:8000 \\\n  hopetree/izone:lts\n```\n\n### 本地开发\n\n```bash\n# 安装依赖\npython -m venv env\nsource env/bin/activate\npip install -r requirements.txt\n\n# 数据库迁移\npython manage.py migrate\n\n# 创建管理员\npython manage.py createsuperuser\n\n# 启动开发服务器\npython manage.py runserver\n\n# 启动 Celery（可选，异步任务需要；Worker 与 Beat 单进程）\ncelery -A izone worker -l info -B --pool=solo\n```\n\n## 环境变量\n\n关键配置通过环境变量注入，完整列表见 [架构设计文档](docs/design/02_TDD_架构设计文档.md)。\n\n| 变量 | 说明 | 默认值 |\n|------|------|--------|\n| `IZONE_DEBUG` | 调试模式 | `True` |\n| `IZONE_MYSQL_HOST` | MySQL 主机 | `127.0.0.1` |\n| `IZONE_MYSQL_PASSWORD` | 数据库密码 | `python` |\n| `IZONE_REDIS_HOST` | Redis 主机 | `127.0.0.1` |\n| `IZONE_TOOL_FLAG` | 启用在线工具 | `True` |\n| `IZONE_API_FLAG` | 启用 REST API | `True` |\n\n## 项目结构\n\n```\nizone/\n├── izone/              # Django 项目配置（settings/urls/wsgi）\n├── apps/               # 所有 Django 应用\n│   ├── blog/           # 核心博客应用\n│   ├── oauth/          # 自定义用户模型 + OAuth 认证\n│   ├── comment/        # 评论与通知系统\n│   ├── easytask/       # Celery 异步任务\n│   ├── api/            # REST API（条件启用）\n│   ├── tool/           # 在线工具（条件启用）\n│   ├── monitor/        # 服务监控\n│   └── ...             # webstack, resume, flow, portinfo, rsshub\n├── templates/          # 共享模板\n├── utils/              # 共享工具（Markdown 扩展等）\n├── docs/design/        # 设计文档\n├── Dockerfile\n└── manage.py\n```\n\n## 许可\n\n[MIT License](LICENSE)\n\n| — | 2026-07-24 | 根据 commit 2ca6b0b 更新：文档索引新增 Code Review 报告，功能列表新增脚本工具分享 |\n| — | 2026-09-05 | 搜索切换为 MySQL FULLTEXT（移除 haystack/Whoosh）；Celery Worker 与 Beat 合并单进程；新增 AGENTS.md |\n| — | 2026-09-11 | 浏览量改为按访客 30 分钟 Redis 去重；补充缓存清单与列表接口不返回正文；友链校链并发上限 |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhopetree%2Fizone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhopetree%2Fizone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhopetree%2Fizone/lists"}