有狮身人面的报告断链 [英] have sphinx report broken links

查看:110
本文介绍了有狮身人面的报告断链的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在构建html文档时,如何强制sphinx在不存在的链接上报告或创建错误?

When building html documentation, how do you force sphinx to report, or create an error, on links that don't exist?

具体来说,我有属性和我的Python项目中已经被删除或重命名的方法,很难找到所有与sphinx生成的html输出的死链接。

Specifically, I have properties and methods within my Python project that have been removed or renamed, and it is hard to find all the dead links with the sphinx generated html output.

我觉得我是盯着这里的答案:
http://sphinx-doc.org/glossary.html,如开头段落所述。

I feel like I'm staring at the answer here: http://sphinx-doc.org/glossary.html, as descriped in the opening paragraph.

我显然不了解某些东西。

I'm obviously not understanding something.

推荐答案

设置 nitpicky 配置变量为 True (您也可以使用 - n选项

Set the nitpicky configuration variable to True (you can also use the -n option when running sphinx-build).

在nitpicky模式下,函数(如:func:`myfunc` ),类或其他无法找到的对象将生成一条警告消息。

In nitpicky mode, a cross-reference to a function (such as :func:`myfunc`), class, or other object that cannot be found will generate a warning message.

这篇关于有狮身人面的报告断链的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆