site_name: Pika
site_description: Pika Python AMQP 0-9-1 Client Library
site_url: https://pika.github.io/pika/
repo_name: pika/pika
repo_url: https://github.com/pika/pika

docs_dir: docs
site_dir: site

# `mike` reads this when it deploys, so the published build is strict too.
strict: true

# Snippets pull README.md and CONTRIBUTING.md from the repo root; MkDocs only
# watches docs_dir by default, so add the project root for live reload on those.
watch:
  - .

theme:
  name: material
  custom_dir: overrides

  # Added modern visuals
  favicon: assets/pika.jpg
  logo: assets/pika.jpg
  icon:
    repo: fontawesome/brands/github

  palette:
    - media: "(prefers-color-scheme)"
      toggle:
        icon: material/lightbulb-auto
        name: Switch to light mode
    - media: "(prefers-color-scheme: light)"
      scheme: default
      primary: teal
      accent: amber
      toggle:
        icon: material/lightbulb
        name: Switch to dark mode
    - media: "(prefers-color-scheme: dark)"
      scheme: slate
      primary: teal
      accent: amber
      toggle:
        icon: material/lightbulb-outline
        name: Switch to system preference

  features:
    - content.code.copy
    - content.code.annotate
    - content.footnote.tooltips
    - content.tabs.link
    - content.tooltips
    - navigation.footer
    - navigation.indexes
    - navigation.instant
    - navigation.instant.prefetch
    - navigation.instant.progress
    - navigation.path
    # removed navigation.sections for cleaner FastAPI-style nav
    - navigation.tabs
    - navigation.tabs.sticky
    - navigation.top
    - navigation.tracking
    - search.highlight
    - search.share
    - search.suggest
    - toc.follow

plugins:
  # Declared so `canonical_version` can be set; see RELEASE.md.
  - mike:
      canonical_version: latest
  - search
  - mkdocstrings:
      handlers:
        python:
          options:
            docstring_style: sphinx
            docstring_section_style: spacy
            show_source: true
            show_root_full_path: false
            show_bases: true
            show_signature_annotations: true
            separate_signature: true
            show_root_heading: true
            show_symbol_type_heading: true
            show_symbol_type_toc: true
            signature_crossrefs: true

markdown_extensions:
  - admonition
  - footnotes
  - toc:
      permalink: true
  - pymdownx.highlight:
      line_spans: __span
      linenums_style: pymdownx-inline
  - pymdownx.snippets:
      # Repo root so index/contributing can include README.md and CONTRIBUTING.md
      base_path: ["."]
  - pymdownx.superfences

extra_css:
  - css/mkdocstrings.css

extra:
  version:
    provider: mike
    # Versions carrying this alias are current, so they skip the banner.
    default: latest
  social:
    - icon: fontawesome/brands/github
      link: https://github.com/pika/pika

nav:
  - Home: index.md
  - Introduction: intro.md
  - API Reference:
      - Overview: modules/index.md
      - Connection Adapters:
          - Overview: modules/adapters/index.md
          - Blocking: modules/adapters/blocking.md
          - Select: modules/adapters/select.md
          - Asyncio: modules/adapters/asyncio.md
          - Tornado: modules/adapters/tornado.md
          - Twisted: modules/adapters/twisted.md
          - Gevent: modules/adapters/gevent.md
          - Thread-Safe: modules/adapters/thread_safe.md
      - Channel: modules/channel.md
      - Connection: modules/connection.md
      - Credentials: modules/credentials.md
      - DeliveryMode: modules/delivery_mode.md
      - Exceptions: modules/exceptions.md
      - Parameters: modules/parameters.md
      - Specification: modules/spec.md
  - Examples:
      - Overview: examples.md
      - URLParameters: examples/using_urlparameters.md
      - Connecting Asynchronously: examples/connecting_async.md
      - Blocking Basic Get: examples/blocking_basic_get.md
      - Blocking Consume: examples/blocking_consume.md
      - Blocking Consume With Multiple Hosts: examples/blocking_consume_recover_multiple_hosts.md
      - Blocking Consumer Generator: examples/blocking_consumer_generator.md
      - Publishing: examples/comparing_publishing_sync_async.md
      - Delivery Confirmations: examples/blocking_delivery_confirmations.md
      - Mandatory Publishing: examples/blocking_publish_mandatory.md
      - Asynchronous Consumer: examples/asynchronous_consumer_example.md
      - Asynchronous Publisher: examples/asynchronous_publisher_example.md
      - Asyncio Consumer: examples/asyncio_consumer.md
      - Twisted Consumer: examples/twisted_example.md
      - Tornado Consumer: examples/tornado_consumer.md
      - TLS Mutual Authentication: examples/tls_mutual_authentication.md
      - TLS Server Authentication: examples/tls_server_authentication.md
      - Thread-Safe Consumer: examples/threaded_consumer.md
      - Thread-Safe Publisher: examples/threaded_publisher.md
      - Thread-Safe Publisher Confirms: examples/publisher_confirms_threaded.md
      - Thread-Safe Long-Running Publisher: examples/long_running_publisher_threaded.md
      - Heartbeat and Blocked Timeouts: examples/heartbeat_and_blocked_timeouts.md
      - Direct Reply-To: examples/direct_reply_to.md
  - Contributing: contributing.md
  - Misc:
      - FAQ: faq.md
      - Changelog: changelog.md
      - History: history.md
      - Contributors: contributors.md