-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
372 additions
and
6 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
import pytest | ||
from rest_framework.test import APIClient | ||
|
||
pytest_plugins = 'sphinx.testing.fixtures' | ||
|
||
@pytest.fixture | ||
def api_client(): | ||
return APIClient() |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
extensions = [ | ||
"readthedocs_ext.readthedocs", | ||
'sphinx.ext.autosectionlabel', | ||
] | ||
project = "Test" | ||
master_doc = "index" | ||
exclude_patterns = ["out"] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
Glossary | ||
======== | ||
|
||
.. glossary:: | ||
|
||
builder | ||
A class (inheriting from :class:`~sphinx.builders.Builder`) that takes | ||
parsed documents and performs an action on them. Normally, builders | ||
translate the documents to an output format, but it is also possible to | ||
use builders that e.g. check for broken links in the documentation, or | ||
build coverage information. | ||
|
||
See :doc:`/usage` for an overview over Sphinx's built-in | ||
builders. | ||
|
||
configuration directory | ||
The directory containing :file:`conf.py`. By default, this is the same as | ||
the :term:`builder`, but can be set differently with the **-c** | ||
command-line option. | ||
|
||
directive | ||
A reStructuredText markup element that allows marking a block of content | ||
with special meaning. Directives are supplied not only by docutils, but | ||
Sphinx and custom extensions can add their own. The basic directive | ||
syntax looks like this: | ||
|
||
.. sourcecode:: rst | ||
|
||
.. directivename:: argument ... | ||
:option: value | ||
|
||
Content of the directive. | ||
|
||
See :ref:`index:Another title` for more information. | ||
|
||
environment | ||
A structure where information about all documents under the root is saved, | ||
and used for cross-referencing. The environment is pickled after the | ||
parsing stage, so that successive runs only need to read and parse new and | ||
changed documents. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
Title | ||
===== | ||
|
||
`Read the Docs`_ hosts documentation for the open source community. | ||
|
||
.. _Read the Docs: https://readthedocs.org | ||
|
||
The main documentation for the site is organized into a couple sections: | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
|
||
/usage | ||
/glossary | ||
|
||
Subtitle | ||
-------- | ||
|
||
See :term:`builder` for more information. | ||
|
||
Sub-sub title | ||
````````````` | ||
|
||
Here is my content. | ||
|
||
- One | ||
- Two | ||
- Three | ||
|
||
Another title | ||
------------- | ||
|
||
.. code-block:: python | ||
print("Hello world!") |
34 changes: 34 additions & 0 deletions
34
readthedocs/embed/tests/data/sphinx/source/out/glossary-glossary.html
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<div class="section" id="glossary"> | ||
<h1>Glossary<a class="headerlink" href="http://project.readthedocs.io/en/latest/index.html#glossary" title="Permalink to this headline">¶</a></h1> | ||
<dl class="glossary"> | ||
<dt id="term-builder">builder<a class="headerlink" href="http://project.readthedocs.io/en/latest/index.html#term-builder" title="Permalink to this term">¶</a></dt><dd><p>A class (inheriting from <code class="xref py py-class docutils literal notranslate"><span class="pre">Builder</span></code>) that takes | ||
parsed documents and performs an action on them. Normally, builders | ||
translate the documents to an output format, but it is also possible to | ||
use builders that e.g. check for broken links in the documentation, or | ||
build coverage information.</p> | ||
<p>See <a class="reference internal" href="http://project.readthedocs.io/en/latest/usage.html"><span class="doc">Usage</span></a> for an overview over Sphinx’s built-in | ||
builders.</p> | ||
</dd> | ||
<dt id="term-configuration-directory">configuration directory<a class="headerlink" href="http://project.readthedocs.io/en/latest/index.html#term-configuration-directory" title="Permalink to this term">¶</a></dt><dd><p>The directory containing <code class="file docutils literal notranslate"><span class="pre">conf.py</span></code>. By default, this is the same as | ||
the <a class="reference internal" href="http://project.readthedocs.io/en/latest/index.html#term-builder"><span class="xref std std-term">builder</span></a>, but can be set differently with the <strong>-c</strong> | ||
command-line option.</p> | ||
</dd> | ||
<dt id="term-directive">directive<a class="headerlink" href="http://project.readthedocs.io/en/latest/index.html#term-directive" title="Permalink to this term">¶</a></dt><dd><p>A reStructuredText markup element that allows marking a block of content | ||
with special meaning. Directives are supplied not only by docutils, but | ||
Sphinx and custom extensions can add their own. The basic directive | ||
syntax looks like this:</p> | ||
<div class="highlight-rst notranslate"><div class="highlight"><pre><span></span><span class="p">..</span> <span class="ow">directivename</span><span class="p">::</span> argument ... | ||
<span class="nc">:option:</span> value | ||
|
||
Content of the directive. | ||
</pre></div> | ||
</div> | ||
<p>See <span class="xref std std-ref">index:Another title</span> for more information.</p> | ||
</dd> | ||
<dt id="term-environment">environment<a class="headerlink" href="http://project.readthedocs.io/en/latest/index.html#term-environment" title="Permalink to this term">¶</a></dt><dd><p>A structure where information about all documents under the root is saved, | ||
and used for cross-referencing. The environment is pickled after the | ||
parsing stage, so that successive runs only need to read and parse new and | ||
changed documents.</p> | ||
</dd> | ||
</dl> | ||
</div> |
8 changes: 8 additions & 0 deletions
8
readthedocs/embed/tests/data/sphinx/source/out/glossary-term-builder.html
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<dd><p>A class (inheriting from <code class="xref py py-class docutils literal notranslate"><span class="pre">Builder</span></code>) that takes | ||
parsed documents and performs an action on them. Normally, builders | ||
translate the documents to an output format, but it is also possible to | ||
use builders that e.g. check for broken links in the documentation, or | ||
build coverage information.</p> | ||
<p>See <a class="reference internal" href="http://project.readthedocs.io/en/latest/usage.html"><span class="doc">Usage</span></a> for an overview over Sphinx’s built-in | ||
builders.</p> | ||
</dd> |
4 changes: 4 additions & 0 deletions
4
readthedocs/embed/tests/data/sphinx/source/out/glossary-term-configuration-directory.html
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<dd><p>The directory containing <code class="file docutils literal notranslate"><span class="pre">conf.py</span></code>. By default, this is the same as | ||
the <a class="reference internal" href="http://project.readthedocs.io/en/latest/index.html#term-builder"><span class="xref std std-term">builder</span></a>, but can be set differently with the <strong>-c</strong> | ||
command-line option.</p> | ||
</dd> |
12 changes: 12 additions & 0 deletions
12
readthedocs/embed/tests/data/sphinx/source/out/glossary-term-directive.html
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<dd><p>A reStructuredText markup element that allows marking a block of content | ||
with special meaning. Directives are supplied not only by docutils, but | ||
Sphinx and custom extensions can add their own. The basic directive | ||
syntax looks like this:</p> | ||
<div class="highlight-rst notranslate"><div class="highlight"><pre><span></span><span class="p">..</span> <span class="ow">directivename</span><span class="p">::</span> argument ... | ||
<span class="nc">:option:</span> value | ||
|
||
Content of the directive. | ||
</pre></div> | ||
</div> | ||
<p>See <span class="xref std std-ref">index:Another title</span> for more information.</p> | ||
</dd> |
5 changes: 5 additions & 0 deletions
5
readthedocs/embed/tests/data/sphinx/source/out/glossary-term-environment.html
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<dd><p>A structure where information about all documents under the root is saved, | ||
and used for cross-referencing. The environment is pickled after the | ||
parsing stage, so that successive runs only need to read and parse new and | ||
changed documents.</p> | ||
</dd> |
6 changes: 6 additions & 0 deletions
6
readthedocs/embed/tests/data/sphinx/source/out/index-another-title.html
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<div class="section" id="another-title"> | ||
<h2>Another title<a class="headerlink" href="http://project.readthedocs.io/en/latest/index.html#another-title" title="Permalink to this headline">¶</a></h2> | ||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="nb">print</span><span class="p">(</span><span class="s2">"Hello world!"</span><span class="p">)</span> | ||
</pre></div> | ||
</div> | ||
</div> |
9 changes: 9 additions & 0 deletions
9
readthedocs/embed/tests/data/sphinx/source/out/index-sub-sub-title.html
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<div class="section" id="sub-sub-title"> | ||
<h3>Sub-sub title<a class="headerlink" href="http://project.readthedocs.io/en/latest/index.html#sub-sub-title" title="Permalink to this headline">¶</a></h3> | ||
<p>Here is my content.</p> | ||
<ul class="simple"> | ||
<li><p>One</p></li> | ||
<li><p>Two</p></li> | ||
<li><p>Three</p></li> | ||
</ul> | ||
</div> |
13 changes: 13 additions & 0 deletions
13
readthedocs/embed/tests/data/sphinx/source/out/index-subtitle.html
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<div class="section" id="subtitle"> | ||
<h2>Subtitle<a class="headerlink" href="http://project.readthedocs.io/en/latest/index.html#subtitle" title="Permalink to this headline">¶</a></h2> | ||
<p>See <a class="reference internal" href="http://project.readthedocs.io/en/latest/glossary.html#term-builder"><span class="xref std std-term">builder</span></a> for more information.</p> | ||
<div class="section" id="sub-sub-title"> | ||
<h3>Sub-sub title<a class="headerlink" href="http://project.readthedocs.io/en/latest/index.html#sub-sub-title" title="Permalink to this headline">¶</a></h3> | ||
<p>Here is my content.</p> | ||
<ul class="simple"> | ||
<li><p>One</p></li> | ||
<li><p>Two</p></li> | ||
<li><p>Three</p></li> | ||
</ul> | ||
</div> | ||
</div> |
30 changes: 30 additions & 0 deletions
30
readthedocs/embed/tests/data/sphinx/source/out/index-title.html
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<div class="section" id="title"> | ||
<h1>Title<a class="headerlink" href="http://project.readthedocs.io/en/latest/index.html#title" title="Permalink to this headline">¶</a></h1> | ||
<p><a class="reference external" href="https://readthedocs.org">Read the Docs</a> hosts documentation for the open source community.</p> | ||
<p>The main documentation for the site is organized into a couple sections:</p> | ||
<div class="toctree-wrapper compound"> | ||
<ul> | ||
<li class="toctree-l1"><a class="reference internal" href="http://project.readthedocs.io/en/latest/usage.html">Usage</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="http://project.readthedocs.io/en/latest/glossary.html">Glossary</a></li> | ||
</ul> | ||
</div> | ||
<div class="section" id="subtitle"> | ||
<h2>Subtitle<a class="headerlink" href="http://project.readthedocs.io/en/latest/index.html#subtitle" title="Permalink to this headline">¶</a></h2> | ||
<p>See <a class="reference internal" href="http://project.readthedocs.io/en/latest/glossary.html#term-builder"><span class="xref std std-term">builder</span></a> for more information.</p> | ||
<div class="section" id="sub-sub-title"> | ||
<h3>Sub-sub title<a class="headerlink" href="http://project.readthedocs.io/en/latest/index.html#sub-sub-title" title="Permalink to this headline">¶</a></h3> | ||
<p>Here is my content.</p> | ||
<ul class="simple"> | ||
<li><p>One</p></li> | ||
<li><p>Two</p></li> | ||
<li><p>Three</p></li> | ||
</ul> | ||
</div> | ||
</div> | ||
<div class="section" id="another-title"> | ||
<h2>Another title<a class="headerlink" href="http://project.readthedocs.io/en/latest/index.html#another-title" title="Permalink to this headline">¶</a></h2> | ||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="nb">print</span><span class="p">(</span><span class="s2">"Hello world!"</span><span class="p">)</span> | ||
</pre></div> | ||
</div> | ||
</div> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Usage | ||
===== | ||
|
||
Here are some usage examples. |
Oops, something went wrong.