Java API 1 <javaapi:api1>
Created
October 30, 2012 04:09
-
-
Save shimizukawa/3978232 to your computer and use it in GitHub Desktop.
Sphinx: Link to outer non-sphinx document by using intersphinx. https://groups.google.com/d/topic/sphinx-users/P_FolrZVoNg/discussion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extensions = ['sphinx.ext.intersphinx'] | |
intersphinx_mapping = { | |
'javaapi': ('http://api.example.com/', 'javaapi.inv'), | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import zlib | |
inventory_header = u'''\ | |
# Sphinx inventory version 2 | |
# Project: javaapi | |
# Version: 2.0 | |
# The remainder of this file is compressed with zlib. | |
'''.encode('utf-8') | |
inventory_payload = u'''\ | |
api1 std:label -1 api.html#api1 API 1 | |
'''.encode('utf-8') | |
# inventory_payload lines spec: | |
# name domainname:type priority uri dispname | |
# | |
# * `name` -- fully qualified name | |
# * `dispname` -- name to display when searching/linking | |
# * `type` -- object type, a key in ``self.object_types`` | |
# * `docname` -- the document where it is to be found | |
# * `anchor` -- the anchor name for the object | |
# * `priority` -- how "important" the object is (determines placement in search results) | |
# | |
# - 1: default priority (placed before full-text matches) | |
# - 0: object is important (placed before default-priority objects) | |
# - 2: object is unimportant (placed after full-text matches) | |
# - -1: object should not show up in search at all | |
# | |
inventory = inventory_header + zlib.compress(inventory_payload) | |
open('javaapi.inv','wb').write(inventory) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="section" id="example-link-to-outer-non-sphinx-by-using-intersphinx"> | |
<h1>Example: Link to outer non-sphinx by using intersphinx<a class="headerlink" href="#example-link-to-outer-non-sphinx-by-using-intersphinx" title="Permalink to this headline">ツカ</a></h1> | |
<p><a class="reference external" href="http://api.example.com/api.html#api1" title="(in javaapi v2.0)"><em class="xref std std-ref">Java API 1</em></a></p> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Example: Link to outer non-sphinx by using intersphinx | |
========================================================================== | |
:ref:`Java API 1 <javaapi:api1>` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment