在 Sphinx reST 中包含机密信息

发布于 2024-12-16 16:30:44 字数 50 浏览 5 评论 0原文

我在其自己的“copy.rst”文档中有保密文本。如何将其包含在目录树中而不显示出来?

I have the confidentiality text in its own "copy.rst" document. How can I include it without it showing up in the toctree?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

哭了丶谁疼 2024-12-23 16:30:45

使用 :hidden: 选项将 copy.rst 添加到单独的目录树中:

.. toctree::

   doc1.rst 
   doc2.rst

.. toctree::
   :hidden:

   copy.rst   

您也可以什么都不做(只需将 copy.rst 与其他 .rst 文件一起保留)并忽略“copy.rst::警告:文档不包含在任何目录树中”消息。

Add copy.rst to a separate toctree with the :hidden: option:

.. toctree::

   doc1.rst 
   doc2.rst

.. toctree::
   :hidden:

   copy.rst   

You could also do nothing (just keep copy.rst with the other .rst files) and simply ignore the "copy.rst:: WARNING: document isn't included in any toctree" message.

羅雙樹 2024-12-23 16:30:44

正确的方法是

  1. 不要在任何.. toctree:中包含copy.rst。这样,该页面就不会出现在下一个/上一个页面中。

  2. :orphan:写入copy.rst的第一行。这样您就不会看到任何编译器警告。

The correct way would be

  1. Do not include copy.rst in any .. toctree:. This way this page will not come in next/previous.

  2. Write :orphan: to the first line of copy.rst. This way you will not see any compiler warning.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文