forked from evhub/coconut
-
Notifications
You must be signed in to change notification settings - Fork 0
/
conf.py
83 lines (61 loc) · 2.22 KB
/
conf.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------------------------------------------------
# INFO:
# -----------------------------------------------------------------------------------------------------------------------
"""
Author: Evan Hubinger
License: Apache 2.0
Description: Sphinx configuration file for the Coconut Programming Language.
"""
# -----------------------------------------------------------------------------------------------------------------------
# IMPORTS:
# -----------------------------------------------------------------------------------------------------------------------
from __future__ import print_function, absolute_import, unicode_literals, division
import sys
import os.path
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
from coconut.root import * # NOQA
from coconut.constants import (
version_str_tag,
without_toc,
with_toc,
)
from coconut.util import univ_open
import pydata_sphinx_theme # NOQA
import myst_parser # NOQA
# -----------------------------------------------------------------------------------------------------------------------
# README:
# -----------------------------------------------------------------------------------------------------------------------
with univ_open("README.rst", "r") as readme_file:
readme = readme_file.read()
with univ_open("index.rst", "w") as index_file:
index_file.write(readme.replace(without_toc, with_toc))
# -----------------------------------------------------------------------------------------------------------------------
# DEFINITIONS:
# -----------------------------------------------------------------------------------------------------------------------
from coconut.constants import ( # NOQA
project,
copyright,
author,
highlight_language,
)
version = VERSION
release = version_str_tag
html_theme = "pydata_sphinx_theme"
html_theme_options = {
}
master_doc = "index"
exclude_patterns = ["README.*"]
source_suffix = [".rst", ".md"]
default_role = "code"
extensions = ["myst_parser"]
myst_enable_extensions = [
"smartquotes",
]
myst_heading_anchors = 4
html_sidebars = {
"**": [
"localtoc.html",
],
}