0

私のドキュメント構造は次のようになります。

├── common
│   └── shared.rst
├── foo
│   └── foo.rst
├── index.rst
└── zoo
    └── zoo.rst

生成された構造は次のようになります。

├── common
│   └── shared.html (breadcrumbs: home -> zoo -> shared)
├── foo
│   └── foo.html
├── index.html
└── zoo
    └── zoo.html

foo と Zoo の両方の toctree は次のようになります。

.. toctree::
    :includehidden:

    ../common/shared

2 つの異なる shared.html ファイルをコンパイルして、1 つはパンくずリストのようbreadcrumbs: home -> zoo -> sharedに、もう1 つはbreadcrumbs: home -> foo -> shared. これはスフィンクスで可能ですか?

参考までに、これはブレッドクラム生成用の私のテンプレート コードです。

<section>
  <ul class="breadcrumbs">
    <li><a href="{{ pathto(master_doc) }}">Home</a></li>
    {% for doc in parents %}
      <li><a href="{{ doc.link|e }}">{{ doc.title }}</a></li>
    {% endfor %}
    {% if title != 'LaunchKey Documentation' %}
      <li><a href="#" class="active">{{ title }}</a></li>
    {% endif %}
  </ul>
</section>
4

1 に答える 1

0

shared.rst最終的に両方/fooにa を入れて/zoo、共有コピーを使用するためにインクルードを使用しました。

.. include:: ../common/shared.rst
于 2015-12-17T19:23:38.613 に答える