| Author: | Manuel Holtgrewe <manuel.holtgrewe@fu-berlin.de> |
|---|
.. module:: seqansphinx.seqanlinks :synopsis: Create links to SeqAn documentation.
.. module:: seqansphinx.includefrags :synopsis: Allow inclusion of code snippets.
This code is released under an MIT License. See the LICENSE file for full text.
Clone the sphinx-contrib repository:
$ hg clone https://bitbucket.org/birkenfeld/sphinx-contrib/
Change into the traclinks directory:
$ cd sphinx-contrib/traclinks
Install the module:
$ python setup.py install
Enabling the extension in Sphinx_
To enable the use of this extension in your Sphinx project, you will need
to add it to the list of extensions in the conf.py file in your Sphinx
project.
For example
extensions = ['seqansphinx.doxlinks',
'seqansphinx.includefrags']
You will need to set the following config value in your Sphinx project's
conf.py file:
``doxlinks_base_url`` <string>:
The base url of the built API documentation.
-
includefrags_base_url<string>: - The path to where to include fragments from.
You can use this just like the .. include:: directive.
.. includefrags: path/to/file.cpp :fragment: frag-name
Fragments can be separated as follows:
int main() {
//![frag-name]
int x = 2 * 3;
//![frag-name]
//![next-fragment]
return 0;
//![next-fragment]
}
In your restructuredText markup, you can create links to the dox entities using markup of the following format:
:dox:`EntityName optional caption`
where EntityName is a valid dox entity.