Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Unwanted `show_doc` Documentation Automatically Added 3x to Rendered HTML

未关闭
#1,446 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
jupyter, python

调研方向

使用 01_code.ipynb notebook 通过 nbdev_preview 重现该问题,然后检查生成的 _proc/_docs/core.html.md 中重复的 show_doc 条目。将生成的内容与 notebook 进行比较,并运行 nbdev_clean、nbdev_export 和 nbdev_test,以确定重复文档是在导出期间还是渲染期间生成的。

由索引模型根据 Issue 内容生成。

描述

Description

When using nbdev to write a Python package, I've encountered an issue possibly associated with the nbdev_export command:

  • Running nbdev_preview to check the rendered HTML version of my source code for documentation results in the documentation for show_doc being automatically added three times to the very end of the rendered HTML page. The same is true for the published page with source code on GitHub pages
  • This occurs even though the built-in nbdev show_doc function has not been imported or used in the Jupyter notebook containing my source code (named 01_code.ipynb, following the nbdev documentation).
  • The markdown for show_doc appears in the local markdown file _proc/_docs/core.html.md located in my project's root directory and in the published page on GitHub pages:

Current Behavior

The show_doc documentation is automatically added three times to the end of the rendered HTML and markdown files.

Expected Behavior

The rendered HTML and markdown files should only contain documentation for the code actually present in the source notebook.

Attempted Solutions

  • Ran nbdev_clean (no effect on this issue).
  • Re-ran nbdev_export (doesn't fix the issue).
  • All tests run successfully with nbdev_test.
  • Ensured no mixing of import statements with actual code (known to cause issues with nbdev).

Any suggestions to fix this would be greatly appreciated. Thank you!

主要语言
Jupyter Notebook
星标
5.3k
派生
517
平均合并
1 分钟
30 天内合并 PR
3

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

AnswerDotAI/nbdev 的其他 Issue

查看 AnswerDotAI/nbdev 的全部 Issue

相似的 Issue

更多 DevTools Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。