Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

conf.py 2.9 KB

You have to be logged in to leave a comment. Sign In
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
  1. """
  2. An opinionated sphinx setup for academic or scientific reports in Sphinx.
  3. Sphinx Documentation: https://www.sphinx-doc.org/en/master/usage/configuration.html
  4. """
  5. import re
  6. from datetime import datetime
  7. from dynaconf import settings
  8. # -- Project Information ------
  9. # Project or Documentation Title
  10. project = settings.get("project_title", "My Project")
  11. project_slug = re.sub("([^a-zA-Z0-9])+", "-", project).lower()
  12. # TODO: Handle Multiple Authors
  13. author = settings.get("author", "")
  14. # Academic Work should not be copy righted
  15. copyright = settings.get("copyright", "") or f"{datetime.today().year}, {author}"
  16. # -- Document Settings ------
  17. # Index Document (excluding suffix)
  18. master_doc = "index"
  19. # Files to ignore
  20. exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
  21. # Parsers for source file extensions
  22. source_suffix = {
  23. '.rst': 'restructuredtext',
  24. '.md': 'markdown',
  25. }
  26. # Template Paths
  27. templates_path = ["templates"]
  28. # -- Extensions -----
  29. extensions = [
  30. # Autodoc
  31. "sphinx.ext.autodoc",
  32. # TODOs for WIP Docs
  33. "sphinx.ext.todo",
  34. # Render LaTeX for HTML outputs
  35. "sphinx.ext.mathjax",
  36. # Configuration-driven Content
  37. "sphinx.ext.ifconfig",
  38. # Add Code Documentation if there is associated code
  39. "sphinx.ext.viewcode",
  40. # Embed Jupyter Notebooks
  41. "nbsphinx",
  42. # PlantUML driven Diagrams
  43. "sphinx.ext.graphviz",
  44. "sphinxcontrib.plantuml",
  45. # Citations and Reference Management
  46. "sphinxcontrib.bibtex",
  47. # Markdown Support
  48. "recommonmark",
  49. ]
  50. # TODO: Add in other extensions in the toml file
  51. # Pseudo-code:
  52. extensions.extend(filter(lambda ext: ext not in extensions, settings.get("extensions")))
  53. # -- Figure and Caption Settings -----
  54. # See: https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-numfig
  55. numfig = True
  56. # -- LaTeX Settings -----
  57. # See: https://www.sphinx-doc.org/en/master/latex.html
  58. # See: https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-latex_documents
  59. _targetname = f"{project_slug}.tex"
  60. latex_documents = [
  61. (master_doc, _targetname, project, author, "howto")
  62. ]
  63. latex_logo = settings.get("logo", None)
  64. if settings.get("printed", False):
  65. latex_show_pagerefs = True
  66. latex_show_urls = "footnote"
  67. _latex_preamble = r"""
  68. \usepackage{booktabs}
  69. % See: https://sphinxcontrib-bibtex.readthedocs.io/en/latest/usage.html
  70. % make phantomsection empty inside figures
  71. \usepackage{etoolbox}
  72. \AtBeginEnvironment{figure}{\renewcommand{\phantomsection}{}}
  73. """
  74. # See: https://www.sphinx-doc.org/en/master/latex.html#the-latex-elements-configuration-setting
  75. latex_elements = {
  76. "figure_align": "H",
  77. "preamble": _latex_preamble,
  78. }
  79. # -- HTML Settings -----
  80. html_theme = "haiku"
  81. html_static_path = ["static"]
  82. html_theme_options = {
  83. # Disable showing the sidebar. Defaults to 'false'
  84. "nosidebar": True,
  85. "relbarbgcolor": "black"
  86. }
  87. # -- TODOS Settings -----
  88. todo_include_todos = True
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...