# Base MkDocs Configuration Template
# Generated by d361 MkDocs Export System
# this_file: external/int_folders/d361/src/d361/mkdocs/templates/mkdocs_base.yml.j2

# Basic site configuration
site_name: {{ site_name | default('Document360 Export') }}
{% if site_url %}site_url: {{ site_url }}{% endif %}
{% if site_author %}site_author: {{ site_author }}{% endif %}
{% if site_description %}site_description: {{ site_description }}{% endif %}
{% if repo_url %}repo_url: {{ repo_url }}{% endif %}
{% if repo_name %}repo_name: {{ repo_name }}{% endif %}

# Build directories
docs_dir: {{ docs_dir | default('docs') }}
site_dir: {{ site_dir | default('site') }}

# Theme configuration
theme:
  name: {{ theme_name | default('mkdocs') }}
  {% if theme_name == 'readthedocs' %}
  highlightjs: true
  hljs_languages:
    - yaml
    - python
    - javascript
    - bash
  {% endif %}

# Navigation
{% if navigation %}
nav:
{% for item in navigation %}
  {{ item | indent(2, true) }}
{% endfor %}
{% endif %}

# Markdown extensions
markdown_extensions:
  - toc:
      permalink: true
      toc_depth: {{ toc_depth | default(3) }}
  - admonition
  - codehilite:
      guess_lang: false
  - def_list
  - footnotes
  - meta
  - tables
  {% if enable_task_lists | default(false) %}- pymdownx.tasklist:
      custom_checkbox: true{% endif %}
  {% if enable_superfences | default(false) %}- pymdownx.superfences{% endif %}

# Plugins
plugins:
  - search:
      lang: {{ search_lang | default(['en']) }}
      separator: '[\s\-\.]+'
  {% if enable_autorefs | default(false) %}- autorefs{% endif %}
  {% if enable_section_index | default(false) %}- section-index{% endif %}
  {% if enable_redirects and redirects %}- redirects:
      redirect_maps:
        {% for old_path, new_path in redirects.items() %}
        {{ old_path }}: {{ new_path }}
        {% endfor %}{% endif %}

# Extra configuration
extra:
  generator: 'd361 MkDocs Export System'
  export_date: '{{ export_date }}'
  {% if social %}
  social:
    {% for item in social %}
    - icon: {{ item.icon }}
      link: {{ item.link }}
      {% if item.name %}name: {{ item.name }}{% endif %}
    {% endfor %}
  {% endif %}

# Copyright
{% if copyright %}copyright: {{ copyright }}{% endif %}

# Additional CSS/JS
{% if extra_css %}
extra_css:
  {% for css in extra_css %}
  - {{ css }}
  {% endfor %}
{% endif %}

{% if extra_javascript %}
extra_javascript:
  {% for js in extra_javascript %}
  - {{ js }}
  {% endfor %}
{% endif %}

# Development server configuration
dev_addr: {{ dev_addr | default('127.0.0.1:8000') }}
use_directory_urls: {{ use_directory_urls | default(true) | lower }}
strict: {{ strict_mode | default(false) | lower }}

# Build configuration
{% if edit_uri %}edit_uri: {{ edit_uri }}{% endif %}
{% if google_analytics %}
google_analytics:
  - {{ google_analytics }}
  - auto
{% endif %}