|
42 | 42 | dyn_include_patterns = []
|
43 | 43 | dyn_exclude_patterns = ["output"]
|
44 | 44 |
|
| 45 | +# Currently, only netlink/specs has a parser for yaml. |
| 46 | +# Prefer using include patterns if available, as it is faster |
| 47 | +if has_include_patterns: |
| 48 | + dyn_include_patterns.append("netlink/specs/*.yaml") |
| 49 | +else: |
| 50 | + dyn_exclude_patterns.append("netlink/*.yaml") |
| 51 | + dyn_exclude_patterns.append("devicetree/bindings/**.yaml") |
| 52 | + dyn_exclude_patterns.append("core-api/kho/bindings/**.yaml") |
| 53 | + |
45 | 54 | # Properly handle include/exclude patterns
|
46 | 55 | # ----------------------------------------
|
47 | 56 |
|
@@ -102,12 +111,12 @@ def have_command(cmd):
|
102 | 111 | "kernel_include",
|
103 | 112 | "kfigure",
|
104 | 113 | "maintainers_include",
|
| 114 | + "parser_yaml", |
105 | 115 | "rstFlatTable",
|
106 | 116 | "sphinx.ext.autosectionlabel",
|
107 | 117 | "sphinx.ext.ifconfig",
|
108 | 118 | "translations",
|
109 | 119 | ]
|
110 |
| - |
111 | 120 | # Since Sphinx version 3, the C function parser is more pedantic with regards
|
112 | 121 | # to type checking. Due to that, having macros at c:function cause problems.
|
113 | 122 | # Those needed to be escaped by using c_id_attributes[] array
|
@@ -204,10 +213,11 @@ def have_command(cmd):
|
204 | 213 | # Add any paths that contain templates here, relative to this directory.
|
205 | 214 | templates_path = ["sphinx/templates"]
|
206 | 215 |
|
207 |
| -# The suffix(es) of source filenames. |
208 |
| -# You can specify multiple suffix as a list of string: |
209 |
| -# source_suffix = ['.rst', '.md'] |
210 |
| -source_suffix = '.rst' |
| 216 | +# The suffixes of source filenames that will be automatically parsed |
| 217 | +source_suffix = { |
| 218 | + ".rst": "restructuredtext", |
| 219 | + ".yaml": "yaml", |
| 220 | +} |
211 | 221 |
|
212 | 222 | # The encoding of source files.
|
213 | 223 | # source_encoding = 'utf-8-sig'
|
|
0 commit comments