簡體   English   中英

為獅身人面像組織.rst文件嗎?

[英]Organise .rst files for sphinx?

我正在整理一些使用Sphinx的用戶指南。 但是,有許多.rst文件,當它們與index.rst一起位於主文件夾中時,要跟蹤它們已經變得非常困難。

我想像這樣將它們整理到文件夾中。 但是隨后, make html命令導致警告,提示它找不到藏在文件夾中的所有那些.rst文件。

如何組織.rst文件?

index.rst
  Docs
     new_starter.rst
     subject_guides.rst
  New starter
     first_week.rst
     second_week.rst
  Subject guides
     stress.rst
     aerodynamics.rst
     data_science.rst

Sphinx文檔部分TOC Tree中提到了這一點。

index.rst ,使用toctree指令:

Project Awesome
===============

Welcome to the Project Awesome docs.

.. toctree::
   :glob:
   :maxdepth: 2

   docs/*
   new_starter/*
   subject_guides/*

上面使用了“ globbing”,但是您可以使用文件名而不是glob顯式地對文件進行排序。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM