# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = "{{ project }}"
copyright = "{{ year }}, {{ author }}"
author = "{{ author }}"
release = "{{ release }}"

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = [
  {%- if markdown %}
  # Enables support for Markdown
  # https://www.sphinx-doc.org/en/master/usage/markdown.html
  "myst_parser",
  {%- endif %}
  # Enable support for Talon
  "talondoc.sphinx",
]

{%- if markdown %}
# -- Options for MyST --------------------------------------------------------
# https://myst-parser.readthedocs.io/en/latest/

myst_enable_extensions = [
    # Enables colon fence directives
    # https://myst-parser.readthedocs.io/en/latest/syntax/optional.html#syntax-colon-fence
    "colon_fence",
    # Enables definition lists
    # https://myst-parser.readthedocs.io/en/latest/syntax/optional.html#definition-lists
    "deflist",
]

{%- endif %}
# -- Options for TalonDoc ----------------------------------------------------
# https://wen.works/talondoc/

talon_packages = {
  'path': '{{ package_path }}',
  'name': '{{ package_name }}',
  {%- if include %}
  'include': {{ include | string }},
  {%- endif %}
  {%- if exclude %}
  'exclude': {{ exclude | string }},
  {%- endif %}
  {%- if trigger %}
  'trigger': {{ trigger | string }},
  {%- endif %}
}

# def talon_docstring_hook(sort: str, name: str) -> Optional[str]:
#     return None
#

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = "alabaster"
html_static_path: list[str] = []
