跳到内容
当前位置:首页>电子书资讯>【AI应用】免费搭建你的电子书网站(附源码)

【AI应用】免费搭建你的电子书网站(附源码)

  • 2026-11-14 23:50:34
【AI应用】免费搭建你的电子书网站(附源码)

电子书网站由AI实现,Claude Code+DeepSeek-V4-Pro。技术栈Python+MkDocs,主题Read the Docs,静态托管GitHub Pages。具有中文搜索功能。

源码

https://github.com/dongfanger/ebook-mkdocs

配置

├── docs/                 # 内容目录(mkdocs 默认,按分类/子分类组织)│   ├── 简介.md            # 首页│   └── _static/          # 静态资源(extra.css / lunr.zh.js / favicon.ico)├── scripts/│   ├── gen_nav.py        # 扫描 docs 生成 mkdocs.yml│   └── post_build.py     # 构建后 hook(中文搜索 + favicon)├── serve.py              # 本地预览入口├── deploy.py             # 部署入口└── requirements.txt

网站配置文件是scripts/gen_nav.py。 MkDocs原生配置文件其实是mkdocs.yml,但为了生成导航,mkdocs.yml由gen_nav.py动态创建,所以在gen_nav.py配置。

完整代码:https://github.com/dongfanger/ebook-mkdocs/blob/main/scripts/gen_nav.py

代码片段说明:

ROOT = Path(__file__).resolve().parent.parent  # 项目根目录SRC = ROOT / "docs"# 不参与导航的内容目录SKIP_DIRS = {"_static", "_images", "assets", ".git", "__pycache__"}# 一级目录顺序(留空 = 按目录名自动扫描排序;想固定顺序就填,如 ["分类A", "分类B"])TOP_ORDER = []# 各一级目录下的二级目录顺序(留空 = 自动扫描;如 {"分类A": ["子分类1", "子分类2"]})SUB_ORDER = {}...defbuild_nav():    lines = ["nav:"]# 首页: 优先 简介.md,回退 index.md(兼容旧命名)    home = "简介.md"if (SRC / "简介.md").exists() else"index.md"    lines.append(f"  - 简介: {home}")# 根目录下其余 .md(如 关于本书.md)作为顶层导航项,按文件名排序for md in sorted(SRC.glob("*.md")):if md.name == home:continue        lines.append(f"  - {md.stem}: {md.name}")# 一级目录按硬编码顺序,兜底补上未列到的目录for top in list_subdirs(SRC, TOP_ORDER):        top_path = SRC / top        lines.append(f"  - {top}:")for sub in list_subdirs(top_path, SUB_ORDER.get(top, [])):            lines.append(f"      - {sub}:")            emit_md_lines(lines, top_path / sub, indent="        ")return"\n".join(lines)HEADER = """site_name: My Docssite_description: 基于 mkdocs 的技术电子书theme:  name: readthedocsplugins:  - search:      lang: zhmarkdown_extensions:  - admonition  - codehilite  - attr_list# 扁平 URL(/xxx.html 而非 /xxx/)use_directory_urls: false# 自定义样式:blockquote 引用块(主题默认无样式)extra_css:  - _static/css/extra.css# 中文搜索:构建后用纯 JS 分词器覆盖默认 lunr.zh.js(修复 nodejieba 依赖导致的搜索失效)hooks:  - scripts/post_build.py"""...

Markdown读取目录,默认为docs:

SRC = ROOT / "docs"

一级目录,可为空,配置后指定顺序:

# 一级目录顺序(留空 = 按目录名自动扫描排序;想固定顺序就填,如 ["分类A", "分类B"])TOP_ORDER = []

二级目录,可为空,配置后指定顺序:

# 各一级目录下的二级目录顺序(留空 = 自动扫描;如 {"分类A": ["子分类1", "子分类2"]})SUB_ORDER = {}

首页默认简介.md,可自定义:

# 首页: 优先 简介.md,回退 index.md(兼容旧命名)home = "简介.md"if (SRC / "简介.md").exists() else"index.md"lines.append(f"  - 简介: {home}")

网站信息和主题:

HEADER = """site_name: My Docssite_description: 基于 mkdocs 的技术电子书theme:  name: readthedocs

更多主题

MkDocs预置主题:https://www.mkdocs.org/user-guide/choosing-your-theme/

自定义主题:https://www.mkdocs.org/user-guide/customizing-your-theme/

还有其他更多配置可在gen_nav.py的HEADER里添加:

  • locale: zh_CN(中文本地化)
  • navigation_depth(导航深度)
  • sticky_navigation(侧边栏跟随滚动)

文章

文章用Markdown编写,保存到docs目录,文件名建议以六位数字加短横线如000001-开头,保证顺序。

推荐使用PyCharm配合Markdown Image Kit插件管理图片资源,复制图片粘贴到md中,自动转存为assets/相对路径:

预览

执行serve.py:

INFO    -  Building documentation...INFO    -  Cleaning site directoryINFO    -  Building documentation to directory: /var/folders/xs/g_0461kx28n2xk7whfkrsnw00000gp/T/mkdocs_38bvc8cgINFO    -  Documentation built in 0.10 secondsINFO    -  [13:10:59] Watching paths for changes: 'docs', 'mkdocs.yml'INFO    -  [13:10:59] Serving on http://127.0.0.1:8000/

访问http://127.0.0.1:8000/效果如下:

发布

GitHub新建仓库,以github.io作为后缀,并设置GitHub Pages:

克隆yourname.github.io到本地,建议选择SSH。

和ebook-mkdocs平级:

├── ebook-mkdocs├── yourname.github.io

修改deploy.py的目录:

# ⚠️ 改成你自己的 GitHub Pages 仓库名(与本项目平级,已 clone 且配好推送)TARGET = ROOT.parent / "yourname.github.io"

执行deploy.py,它会生成site静态文件夹,复制到yourname.github.io推送GitHub仓库。

访问https://yourname.github.io,即可在线查看电子书。搭建电子书网站全程免费。

搜索

MkDocs默认使用Lunr.js做搜索,但Lunr不支持中文分词。AI解决了这个问题:在docs/_static/目录下放入lunr.zh.js(中文分词插件),然后在构建钩子post_build.py中将其注入到搜索配置中,这样搜索就能支持中文了。

结语

到这里,从零搭建一个免费电子书网站的全流程就介绍完了。回顾下核心步骤:

  • 克隆源码:拿到项目模版,安装依赖
  • 编写文章:用Markdown写内容,按规范命名保证顺序
  • 本地预览:serve.py一键启动预览
  • 发布上线:deploy.py一键推送到Github Pages

核心思路是:用脚本自动化配置文件生成,让你专注内容创作。MkDocs负责静态站点生成,Github Pages负责免费托管。整套源码由AI辅助生成,也解决了中文搜索等问题。

如果你在实践过程中遇到问题,或者想交流搭建心得,欢迎加入技术群或私信联系我。也欢迎给GitHub仓库点个Star,你的支持是我持续创作的动力。

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-11-15 08:22:16 HTTP/1.1 GET : http://g.15386.cn/a/476147.html
  2. 运行时间 : 0.049128s [ 吞吐率:20.35req/s ] 内存消耗:4,528.35kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=de46e253643c28040fd47ff571443b2c
  1. /www/wwwroot/g.15386.cn/public/index.php ( 0.79 KB )
  2. /www/wwwroot/g.15386.cn/vendor/autoload.php ( 0.17 KB )
  3. /www/wwwroot/g.15386.cn/vendor/composer/autoload_real.php ( 2.49 KB )
  4. /www/wwwroot/g.15386.cn/vendor/composer/platform_check.php ( 0.90 KB )
  5. /www/wwwroot/g.15386.cn/vendor/composer/ClassLoader.php ( 14.03 KB )
  6. /www/wwwroot/g.15386.cn/vendor/composer/autoload_static.php ( 4.90 KB )
  7. /www/wwwroot/g.15386.cn/vendor/topthink/think-helper/src/helper.php ( 8.34 KB )
  8. /www/wwwroot/g.15386.cn/vendor/topthink/think-validate/src/helper.php ( 2.19 KB )
  9. /www/wwwroot/g.15386.cn/vendor/topthink/think-orm/src/helper.php ( 1.47 KB )
  10. /www/wwwroot/g.15386.cn/vendor/topthink/think-orm/stubs/load_stubs.php ( 0.16 KB )
  11. /www/wwwroot/g.15386.cn/vendor/topthink/framework/src/think/Exception.php ( 1.69 KB )
  12. /www/wwwroot/g.15386.cn/vendor/topthink/think-container/src/Facade.php ( 2.71 KB )
  13. /www/wwwroot/g.15386.cn/vendor/symfony/deprecation-contracts/function.php ( 0.99 KB )
  14. /www/wwwroot/g.15386.cn/vendor/symfony/polyfill-mbstring/bootstrap.php ( 8.26 KB )
  15. /www/wwwroot/g.15386.cn/vendor/symfony/polyfill-mbstring/bootstrap80.php ( 9.78 KB )
  16. /www/wwwroot/g.15386.cn/vendor/symfony/var-dumper/Resources/functions/dump.php ( 1.49 KB )
  17. /www/wwwroot/g.15386.cn/vendor/topthink/think-dumper/src/helper.php ( 0.18 KB )
  18. /www/wwwroot/g.15386.cn/vendor/symfony/var-dumper/VarDumper.php ( 4.30 KB )
  19. /www/wwwroot/g.15386.cn/vendor/topthink/framework/src/think/App.php ( 15.30 KB )
  20. /www/wwwroot/g.15386.cn/vendor/topthink/think-container/src/Container.php ( 15.76 KB )
  21. /www/wwwroot/g.15386.cn/vendor/psr/container/src/ContainerInterface.php ( 1.02 KB )
  22. /www/wwwroot/g.15386.cn/app/provider.php ( 0.19 KB )
  23. /www/wwwroot/g.15386.cn/vendor/topthink/framework/src/think/Http.php ( 6.04 KB )
  24. /www/wwwroot/g.15386.cn/vendor/topthink/think-helper/src/helper/Str.php ( 7.29 KB )
  25. /www/wwwroot/g.15386.cn/vendor/topthink/framework/src/think/Env.php ( 4.68 KB )
  26. /www/wwwroot/g.15386.cn/app/common.php ( 0.03 KB )
  27. /www/wwwroot/g.15386.cn/vendor/topthink/framework/src/helper.php ( 18.78 KB )
  28. /www/wwwroot/g.15386.cn/vendor/topthink/framework/src/think/Config.php ( 5.54 KB )
  29. /www/wwwroot/g.15386.cn/config/app.php ( 0.95 KB )
  30. /www/wwwroot/g.15386.cn/config/cache.php ( 0.78 KB )
  31. /www/wwwroot/g.15386.cn/config/console.php ( 0.23 KB )
  32. /www/wwwroot/g.15386.cn/config/cookie.php ( 0.56 KB )
  33. /www/wwwroot/g.15386.cn/config/database.php ( 2.48 KB )
  34. /www/wwwroot/g.15386.cn/vendor/topthink/framework/src/think/facade/Env.php ( 1.67 KB )
  35. /www/wwwroot/g.15386.cn/config/filesystem.php ( 0.61 KB )
  36. /www/wwwroot/g.15386.cn/config/lang.php ( 0.91 KB )
  37. /www/wwwroot/g.15386.cn/config/log.php ( 1.35 KB )
  38. /www/wwwroot/g.15386.cn/config/middleware.php ( 0.19 KB )
  39. /www/wwwroot/g.15386.cn/config/route.php ( 1.89 KB )
  40. /www/wwwroot/g.15386.cn/config/session.php ( 0.57 KB )
  41. /www/wwwroot/g.15386.cn/config/trace.php ( 0.34 KB )
  42. /www/wwwroot/g.15386.cn/config/view.php ( 0.82 KB )
  43. /www/wwwroot/g.15386.cn/app/event.php ( 0.25 KB )
  44. /www/wwwroot/g.15386.cn/vendor/topthink/framework/src/think/Event.php ( 7.67 KB )
  45. /www/wwwroot/g.15386.cn/app/service.php ( 0.13 KB )
  46. /www/wwwroot/g.15386.cn/app/AppService.php ( 0.26 KB )
  47. /www/wwwroot/g.15386.cn/vendor/topthink/framework/src/think/Service.php ( 1.64 KB )
  48. /www/wwwroot/g.15386.cn/vendor/topthink/framework/src/think/Lang.php ( 7.35 KB )
  49. /www/wwwroot/g.15386.cn/vendor/topthink/framework/src/lang/zh-cn.php ( 13.70 KB )
  50. /www/wwwroot/g.15386.cn/vendor/topthink/framework/src/think/initializer/Error.php ( 3.31 KB )
  51. /www/wwwroot/g.15386.cn/vendor/topthink/framework/src/think/initializer/RegisterService.php ( 1.33 KB )
  52. /www/wwwroot/g.15386.cn/vendor/services.php ( 0.14 KB )
  53. /www/wwwroot/g.15386.cn/vendor/topthink/framework/src/think/service/PaginatorService.php ( 1.52 KB )
  54. /www/wwwroot/g.15386.cn/vendor/topthink/framework/src/think/service/ValidateService.php ( 0.99 KB )
  55. /www/wwwroot/g.15386.cn/vendor/topthink/framework/src/think/service/ModelService.php ( 2.04 KB )
  56. /www/wwwroot/g.15386.cn/vendor/topthink/think-trace/src/Service.php ( 0.77 KB )
  57. /www/wwwroot/g.15386.cn/vendor/topthink/framework/src/think/Middleware.php ( 6.72 KB )
  58. /www/wwwroot/g.15386.cn/vendor/topthink/framework/src/think/initializer/BootService.php ( 0.77 KB )
  59. /www/wwwroot/g.15386.cn/vendor/topthink/think-orm/src/Paginator.php ( 11.86 KB )
  60. /www/wwwroot/g.15386.cn/vendor/topthink/think-validate/src/Validate.php ( 63.20 KB )
  61. /www/wwwroot/g.15386.cn/vendor/topthink/think-orm/src/Model.php ( 23.55 KB )
  62. /www/wwwroot/g.15386.cn/vendor/topthink/think-orm/src/model/concern/Attribute.php ( 21.05 KB )
  63. /www/wwwroot/g.15386.cn/vendor/topthink/think-orm/src/model/concern/AutoWriteData.php ( 4.21 KB )
  64. /www/wwwroot/g.15386.cn/vendor/topthink/think-orm/src/model/concern/Conversion.php ( 6.44 KB )
  65. /www/wwwroot/g.15386.cn/vendor/topthink/think-orm/src/model/concern/DbConnect.php ( 5.16 KB )
  66. /www/wwwroot/g.15386.cn/vendor/topthink/think-orm/src/model/concern/ModelEvent.php ( 2.33 KB )
  67. /www/wwwroot/g.15386.cn/vendor/topthink/think-orm/src/model/concern/RelationShip.php ( 28.29 KB )
  68. /www/wwwroot/g.15386.cn/vendor/topthink/think-helper/src/contract/Arrayable.php ( 0.09 KB )
  69. /www/wwwroot/g.15386.cn/vendor/topthink/think-helper/src/contract/Jsonable.php ( 0.13 KB )
  70. /www/wwwroot/g.15386.cn/vendor/topthink/think-orm/src/model/contract/Modelable.php ( 0.09 KB )
  71. /www/wwwroot/g.15386.cn/vendor/topthink/framework/src/think/Db.php ( 2.88 KB )
  72. /www/wwwroot/g.15386.cn/vendor/topthink/think-orm/src/DbManager.php ( 8.52 KB )
  73. /www/wwwroot/g.15386.cn/vendor/topthink/framework/src/think/Log.php ( 6.28 KB )
  74. /www/wwwroot/g.15386.cn/vendor/topthink/framework/src/think/Manager.php ( 3.92 KB )
  75. /www/wwwroot/g.15386.cn/vendor/psr/log/src/LoggerTrait.php ( 2.69 KB )
  76. /www/wwwroot/g.15386.cn/vendor/psr/log/src/LoggerInterface.php ( 2.71 KB )
  77. /www/wwwroot/g.15386.cn/vendor/topthink/framework/src/think/Cache.php ( 4.92 KB )
  78. /www/wwwroot/g.15386.cn/vendor/psr/simple-cache/src/CacheInterface.php ( 4.71 KB )
  79. /www/wwwroot/g.15386.cn/vendor/topthink/think-helper/src/helper/Arr.php ( 16.63 KB )
  80. /www/wwwroot/g.15386.cn/vendor/topthink/framework/src/think/cache/driver/File.php ( 7.84 KB )
  81. /www/wwwroot/g.15386.cn/vendor/topthink/framework/src/think/cache/Driver.php ( 9.03 KB )
  82. /www/wwwroot/g.15386.cn/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php ( 1.99 KB )
  83. /www/wwwroot/g.15386.cn/app/Request.php ( 0.09 KB )
  84. /www/wwwroot/g.15386.cn/vendor/topthink/framework/src/think/Request.php ( 55.78 KB )
  85. /www/wwwroot/g.15386.cn/app/middleware.php ( 0.25 KB )
  86. /www/wwwroot/g.15386.cn/vendor/topthink/framework/src/think/Pipeline.php ( 2.61 KB )
  87. /www/wwwroot/g.15386.cn/vendor/topthink/think-trace/src/TraceDebug.php ( 3.40 KB )
  88. /www/wwwroot/g.15386.cn/vendor/topthink/framework/src/think/middleware/SessionInit.php ( 1.94 KB )
  89. /www/wwwroot/g.15386.cn/vendor/topthink/framework/src/think/Session.php ( 1.80 KB )
  90. /www/wwwroot/g.15386.cn/vendor/topthink/framework/src/think/session/driver/File.php ( 6.27 KB )
  91. /www/wwwroot/g.15386.cn/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php ( 0.87 KB )
  92. /www/wwwroot/g.15386.cn/vendor/topthink/framework/src/think/session/Store.php ( 7.12 KB )
  93. /www/wwwroot/g.15386.cn/vendor/topthink/framework/src/think/Route.php ( 23.73 KB )
  94. /www/wwwroot/g.15386.cn/vendor/topthink/framework/src/think/route/RuleName.php ( 5.75 KB )
  95. /www/wwwroot/g.15386.cn/vendor/topthink/framework/src/think/route/Domain.php ( 2.53 KB )
  96. /www/wwwroot/g.15386.cn/vendor/topthink/framework/src/think/route/RuleGroup.php ( 22.43 KB )
  97. /www/wwwroot/g.15386.cn/vendor/topthink/framework/src/think/route/Rule.php ( 26.95 KB )
  98. /www/wwwroot/g.15386.cn/vendor/topthink/framework/src/think/route/RuleItem.php ( 9.78 KB )
  99. /www/wwwroot/g.15386.cn/route/app.php ( 1.72 KB )
  100. /www/wwwroot/g.15386.cn/vendor/topthink/framework/src/think/facade/Route.php ( 4.70 KB )
  101. /www/wwwroot/g.15386.cn/vendor/topthink/framework/src/think/route/dispatch/Controller.php ( 4.74 KB )
  102. /www/wwwroot/g.15386.cn/vendor/topthink/framework/src/think/route/Dispatch.php ( 10.44 KB )
  103. /www/wwwroot/g.15386.cn/app/controller/Index.php ( 4.81 KB )
  104. /www/wwwroot/g.15386.cn/app/BaseController.php ( 2.05 KB )
  105. /www/wwwroot/g.15386.cn/vendor/topthink/think-orm/src/facade/Db.php ( 0.93 KB )
  106. /www/wwwroot/g.15386.cn/vendor/topthink/think-orm/src/db/connector/Mysql.php ( 5.44 KB )
  107. /www/wwwroot/g.15386.cn/vendor/topthink/think-orm/src/db/PDOConnection.php ( 52.47 KB )
  108. /www/wwwroot/g.15386.cn/vendor/topthink/think-orm/src/db/Connection.php ( 8.39 KB )
  109. /www/wwwroot/g.15386.cn/vendor/topthink/think-orm/src/db/ConnectionInterface.php ( 4.57 KB )
  110. /www/wwwroot/g.15386.cn/vendor/topthink/think-orm/src/db/builder/Mysql.php ( 16.58 KB )
  111. /www/wwwroot/g.15386.cn/vendor/topthink/think-orm/src/db/Builder.php ( 24.06 KB )
  112. /www/wwwroot/g.15386.cn/vendor/topthink/think-orm/src/db/BaseBuilder.php ( 27.50 KB )
  113. /www/wwwroot/g.15386.cn/vendor/topthink/think-orm/src/db/Query.php ( 15.71 KB )
  114. /www/wwwroot/g.15386.cn/vendor/topthink/think-orm/src/db/BaseQuery.php ( 45.13 KB )
  115. /www/wwwroot/g.15386.cn/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php ( 7.43 KB )
  116. /www/wwwroot/g.15386.cn/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php ( 3.26 KB )
  117. /www/wwwroot/g.15386.cn/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php ( 20.07 KB )
  118. /www/wwwroot/g.15386.cn/vendor/topthink/think-orm/src/db/concern/ParamsBind.php ( 3.66 KB )
  119. /www/wwwroot/g.15386.cn/vendor/topthink/think-orm/src/db/concern/ResultOperation.php ( 7.01 KB )
  120. /www/wwwroot/g.15386.cn/vendor/topthink/think-orm/src/db/concern/WhereQuery.php ( 19.37 KB )
  121. /www/wwwroot/g.15386.cn/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php ( 7.11 KB )
  122. /www/wwwroot/g.15386.cn/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php ( 2.63 KB )
  123. /www/wwwroot/g.15386.cn/vendor/topthink/think-orm/src/db/concern/Transaction.php ( 2.77 KB )
  124. /www/wwwroot/g.15386.cn/vendor/topthink/framework/src/think/log/driver/File.php ( 5.96 KB )
  125. /www/wwwroot/g.15386.cn/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php ( 0.86 KB )
  126. /www/wwwroot/g.15386.cn/vendor/topthink/framework/src/think/log/Channel.php ( 3.89 KB )
  127. /www/wwwroot/g.15386.cn/vendor/topthink/framework/src/think/event/LogRecord.php ( 1.02 KB )
  128. /www/wwwroot/g.15386.cn/vendor/topthink/think-helper/src/Collection.php ( 16.47 KB )
  129. /www/wwwroot/g.15386.cn/vendor/topthink/framework/src/think/facade/View.php ( 1.70 KB )
  130. /www/wwwroot/g.15386.cn/vendor/topthink/framework/src/think/View.php ( 4.39 KB )
  131. /www/wwwroot/g.15386.cn/vendor/topthink/framework/src/think/Response.php ( 8.81 KB )
  132. /www/wwwroot/g.15386.cn/vendor/topthink/framework/src/think/response/View.php ( 3.29 KB )
  133. /www/wwwroot/g.15386.cn/vendor/topthink/framework/src/think/Cookie.php ( 6.06 KB )
  134. /www/wwwroot/g.15386.cn/vendor/topthink/think-view/src/Think.php ( 8.38 KB )
  135. /www/wwwroot/g.15386.cn/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php ( 1.60 KB )
  136. /www/wwwroot/g.15386.cn/vendor/topthink/think-template/src/Template.php ( 46.61 KB )
  137. /www/wwwroot/g.15386.cn/vendor/topthink/think-template/src/template/driver/File.php ( 2.41 KB )
  138. /www/wwwroot/g.15386.cn/vendor/topthink/think-template/src/template/contract/DriverInterface.php ( 0.86 KB )
  139. /www/wwwroot/g.15386.cn/runtime/temp/fd050d5bc34eb608e84a078b5af10b7a.php ( 8.21 KB )
  140. /www/wwwroot/g.15386.cn/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
  1. CONNECT:[ UseTime:0.000614s ] mysql:host=172.18.0.4;port=3306;dbname=g_15386;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.001096s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000425s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000412s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000599s ]
  6. SELECT * FROM `set` [ RunTime:0.000361s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000706s ]
  8. SELECT * FROM `article` WHERE `id` = 476147 LIMIT 1 [ RunTime:0.000457s ]
  9. UPDATE `article` SET `lasttime` = 1794702136 WHERE `id` = 476147 [ RunTime:0.001816s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.000352s ]
  11. SELECT * FROM `article` WHERE `id` < 476147 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.000425s ]
  12. SELECT * FROM `article` WHERE `id` > 476147 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.000414s ]
  13. SELECT * FROM `article` WHERE `id` < 476147 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.000423s ]
  14. SELECT * FROM `article` WHERE `id` < 476147 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.000947s ]
  15. SELECT * FROM `article` WHERE `id` < 476147 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.000807s ]
0.050356s