斯芬克斯解释索引指令

时间:2017-05-27 14:42:06

标签: python-sphinx restructuredtext

有人可以解释如何在sphinx中使用index指令吗?我仔细阅读了文档,但无法弄清楚如何使用它。似乎没有产生任何输出。我找不到关于.. index::的任何其他解释,基本上是索引页面本身。

例如,我有一个这样的文件:

Gods and Goddesses Review
-------------------------

.. _persephone:

Persephone
==========

-  Daughter of Demeter and :ref:`zeus`
-  Married Hades, her uncle
-  She is the cause of winter
-  Representative figure in renaissance artwork

.. _saturn:
.. _cronus:

Saturn/Cronus
=============

-  First ruling titan
-  Father of :ref:`jupiter`
-  Son of Uranus/Caelo and Gaia/Terra
-  He Mutilated his father
-  Married his sister Rhea/Ops.
-  Swallowed all of his children
-  Overthrown by Zeus

.. _venus:
.. _aphrodite:

Venus/Aphrodite
===============

-  Goddess of love, beauty, pleasure and fertility.
-  Symbol: Dove, swan, rose, mirror
-  Born from Uranus's chopped off genital
-  Is forced to marry Hephaestus/Vulcan
-  Has many love affairs with others

.. _mars:
.. _ares:

Mars/Ares
=========

-  Son of :ref:`juno` (he has no father)
-  God of war and agriculture
-  He was caught when he had a affair with Venus
-  Symbol: Wolf, woodpecker, spear and shield

.. _juno:
.. _hera:

Juno/Hera
=========

- Goddess of marriage, women, childbirth, family, and stars
- Wife of :ref:`jupiter`
- Daught of :ref:`saturn` and Rhea
- One of the few Olympians to remain loyal to her husband
- Always tries to revenge on her husbands disloyalty to her

.. _neptune:
.. _poseidon:

Neptune/Poseidon
================

- God of ocean
- Weapon: a trident
- Second son of :ref:`saturn` and Rhea
- He was saved by his mother and therefore not devoured by his father

.. _jupiter:
.. _zeus:

Jupiter/Zeus
============

- Married to his sister :ref:`juno`

.. index::
    pair: zeus; jupiter
    pair: neptune; poseidon
    pair: juno; hera
    pair: mars; ares

指令.. index::在渲染的html页面上没有产生任何输出。当我进入索引页面时,没有任何链接有效(链接没有指向任何东西。)所以我很困惑何时以及如何使用.. index::指令

0 个答案:

没有答案