|
14 | 14 | # serve to show the default. |
15 | 15 |
|
16 | 16 | import datetime |
17 | | -import sys |
18 | 17 | import os |
19 | 18 | import shlex |
| 19 | +import sys |
| 20 | + |
20 | 21 | import django |
| 22 | +from sphinx.ext.apidoc import main |
| 23 | + |
| 24 | +from rest_framework_json_api import VERSION |
21 | 25 |
|
22 | 26 | # If extensions (or modules to document with autodoc) are in another directory, |
23 | 27 | # add these directories to sys.path here. If the directory is relative to the |
|
27 | 31 | django.setup() |
28 | 32 |
|
29 | 33 | # Auto-generate API documentation. |
30 | | -from sphinx.ext.apidoc import main |
31 | | -main(['-o', 'apidoc', '-f', '-e', '-T', '-M', '../rest_framework_json_api']) |
| 34 | +main(['-o', '_build/apidoc', '-f', '-e', '-T', '-M', '../rest_framework_json_api']) |
32 | 35 |
|
33 | 36 | # -- General configuration ------------------------------------------------ |
34 | 37 |
|
|
38 | 41 | # Add any Sphinx extension module names here, as strings. They can be |
39 | 42 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
40 | 43 | # ones. |
41 | | -extensions = ['sphinx.ext.autodoc'] |
| 44 | +extensions = ['sphinx.ext.autodoc', 'recommonmark'] |
42 | 45 | autodoc_member_order = 'bysource' |
43 | 46 | autodoc_inherit_docstrings = False |
44 | 47 |
|
45 | 48 | # Add any paths that contain templates here, relative to this directory. |
46 | 49 | templates_path = ['_templates'] |
47 | 50 |
|
48 | | -from recommonmark.parser import CommonMarkParser |
49 | | -source_parsers = { |
50 | | - '.md': CommonMarkParser, |
51 | | -} |
52 | 51 | # The suffix(es) of source filenames. |
53 | 52 | # You can specify multiple suffix as a list of string: |
54 | 53 | # source_suffix = ['.rst', '.md'] |
|
71 | 70 | # built documents. |
72 | 71 | # |
73 | 72 | # The short X.Y version. |
74 | | -from rest_framework_json_api import VERSION |
75 | 73 | version = VERSION |
76 | 74 | # The full version, including alpha/beta/rc tags. |
77 | 75 | release = VERSION |
|
91 | 89 |
|
92 | 90 | # List of patterns, relative to source directory, that match files and |
93 | 91 | # directories to ignore when looking for source files. |
94 | | -exclude_patterns = ['_build'] |
| 92 | +exclude_patterns = ['_build', 'pull_request_template.md'] |
95 | 93 |
|
96 | 94 | # The reST default role (used for this markup: `text`) to use for all |
97 | 95 | # documents. |
|
0 commit comments