]>
Commit | Line | Data |
---|---|---|
1 | # coding: utf-8 | |
2 | # | |
3 | # yt-dlp documentation build configuration file | |
4 | ||
5 | import sys | |
6 | import os | |
7 | ||
8 | # Allows to import yt-dlp | |
9 | sys.path.insert(0, os.path.abspath('..')) | |
10 | from recommonmark.transform import AutoStructify | |
11 | ||
12 | # -- General configuration ------------------------------------------------ | |
13 | ||
14 | # The suffix of source filenames. | |
15 | source_suffix = ['.rst', '.md'] | |
16 | ||
17 | # Add any Sphinx extension module names here, as strings. They can be | |
18 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom | |
19 | # ones. | |
20 | extensions = [ | |
21 | 'sphinx.ext.autodoc', | |
22 | 'recommonmark', | |
23 | ] | |
24 | ||
25 | # Add any paths that contain templates here, relative to this directory. | |
26 | templates_path = ['_templates'] | |
27 | ||
28 | # The master toctree document. | |
29 | master_doc = 'index' | |
30 | ||
31 | # General information about the project. | |
32 | project = u'yt-dlp' | |
33 | copyright = u'UNLICENSE' | |
34 | ||
35 | # The version info for the project you're documenting, acts as replacement for | |
36 | # |version| and |release|, also used in various other places throughout the | |
37 | # built documents. | |
38 | # | |
39 | # The short X.Y version. | |
40 | from yt_dlp.version import __version__ | |
41 | version = __version__ | |
42 | # The full version, including alpha/beta/rc tags. | |
43 | release = version | |
44 | ||
45 | # List of patterns, relative to source directory, that match files and | |
46 | # directories to ignore when looking for source files. | |
47 | exclude_patterns = ['_build'] | |
48 | ||
49 | # The name of the Pygments (syntax highlighting) style to use. | |
50 | pygments_style = 'sphinx' | |
51 | ||
52 | # -- Options for HTML output ---------------------------------------------- | |
53 | ||
54 | # The theme to use for HTML and HTML Help pages. See the documentation for | |
55 | # a list of builtin themes. | |
56 | html_theme = 'default' | |
57 | ||
58 | # Disable highlights | |
59 | highlight_language = 'none' | |
60 | ||
61 | # Add any paths that contain custom static files (such as style sheets) here, | |
62 | # relative to this directory. They are copied after the builtin static files, | |
63 | # so a file named "default.css" will overwrite the builtin "default.css". | |
64 | # html_static_path = ['_static'] | |
65 | ||
66 | ||
67 | def setup(app): | |
68 | app.add_config_value('recommonmark_config', { | |
69 | 'enable_math': False, | |
70 | 'enable_inline_math': False, | |
71 | 'enable_eval_rst': True, | |
72 | 'enable_auto_toc_tree': True, | |
73 | }, True) | |
74 | app.add_transform(AutoStructify) |