# yaml-language-server: $schema=https://squidfunk.github.io/mkdocs-material/schema.json
---
# The name of the documentation site.
site_name: Control Center Docs

# The description of what Control Center essentially is.
site_description: Training, exam & booking management system for VATSIM regions

# The copyright footer at the bottom.
copyright: Copyright © 2023 VATSIM Scandinavia contributors

# Fail on warnings.
strict: true

# The project is configured to exist in a single folder to avoid
# cross-contamination with the source files in PHP.
docs_dir: .

# The site is built in a folder above to avoid it being copied into itself.
site_dir: ../docs_site

theme:
  name: 'material'
  custom_dir: '_theme'
  palette:
    - media: "(prefers-color-scheme: light)"
      scheme: default
      primary: custom
      accent: cyan
      toggle:
        icon: material/lightbulb-outline
        name: "Switch to dark mode"
    - media: "(prefers-color-scheme: dark)"
      scheme: slate
      primary: custom
      accent: cyan
      toggle:
        icon: material/lightbulb
        name: "Switch to light mode"
  features:
    # provide edit links for docs
    - content.action.edit
    # show custom tabs for instructions
    - content.tabs.link
    # add annotations to code
    - content.code.annotate
    # clipboard access for code
    - content.code.copy
    # use fancy material tooltips in lieu of browser default
    - content.tooltips
    # get rid of annotations we don't care to see
    - announce.dismiss
    # tabs at the top from level 1 navigation
    - navigation.tabs
    # footer at the bottom
    - navigation.footer
    # use XHR for page browsing
    - navigation.instant
    # add sections to the vertical left navigation menu
    - navigation.sections
  logo: '_assets/logo.png'
  favicon: '_assets/favicon.ico'

# The name of the GitHub repository.
repo_name: vatsim-scandinavia/controlcenter

# The URL to the GitHub repository.
repo_url: https://github.com/vatsim-scandinavia/controlcenter

# Where do we publish the docs to?
site_url: https://docs.vatsim-scandinavia.org/controlcenter/

# The URL we'll append to the repo_url to give edit links.
edit_uri: edit/main/docs/

# Additional information used by mkdocs-material.
extra:
  version:
    provider: mike
  social:
    - icon: fontawesome/solid/house
      link: https://www.vatsim-scandinavia.org
    - icon: fontawesome/brands/github
      link: https://github.com/vatsim-scandinavia
    - icon: fontawesome/brands/discord
      # TODO: Insert actual link to the server?
      link: "#"
extra_css:
  - stylesheets/extra.css
# The navigation configuration. While this can be automatically discovered,
# we get greater control by manually creating the structure.
nav:
  - Home:
      - Home: index.md
      - Why use Control Center: why.md
  - Getting started:
      - getting-started.md
      - Installation: installation.md
      - Configuration:
          - Initial configuration: configuration/index.md
          - System configuration: configuration/system.md
      - Setup:
          - Define the division: setup/division.md
          - Changing the logo: setup/logo.md
          - Changing the colours & borders: setup/theme.md
          - Creating a custom image: setup/custom.md
          - Custom OAuth authentication: setup/authentication.md
  - Usage:
      - concepts/index.md
      - Members:
          - Training: concepts/training.md
          - Bookings: concepts/booking.md
          - Buddies: concepts/buddies.md
      - Mentors:
          - Tasks: concepts/tasks.md
      - Division:
          # - Exams: concepts/exams.md
          - Mentoring: concepts/mentors.md
          - Ratings: concepts/ratings.md
  - Reference:
      - Contribute: contribute.md
      - API: api.md
      - Background jobs: background-jobs.md
      - Upgrading: upgrade.md
  - Integrations:
      # Insert discord.md and others here
      - Handover: integrations/handover.md
      - VATEUD Core: integrations/vateud.md
      - VATSIM: integrations/vatsim.md
      - VATSIM Connect: integrations/vatsim-connect.md

# Perform additional validation for the documentation content.
# https://www.mkdocs.org/user-guide/configuration/#validation
validation:
  omitted_files: warn
  absolute_links: warn
  unrecognized_links: warn

markdown_extensions:
  - toc:
      permalink: true
      title: Page contents
  - admonition
  - pymdownx.details
  - pymdownx.tilde
  - pymdownx.superfences
  - pymdownx.highlight:
      pygments_lang_class: true
  - pymdownx.tasklist:
      custom_checkbox: true
  - pymdownx.snippets:
      check_paths: true
      base_path:
        - _includes
      auto_append:
        - abbreviations.md
  - pymdownx.extra
  - pymdownx.emoji:
      emoji_index: !!python/name:material.extensions.emoji.twemoji
      emoji_generator: !!python/name:material.extensions.emoji.to_svg
  - pymdownx.tabbed:
      alternate_style: true

plugins:
  # Generate multiple versions of docs
  - mike:
      alias_type: symlink
      canonical_version: latest
  - search
  # Exclude files that aren't part of the site
  - exclude:
      glob:
        - _includes/*
        - _theme/*
        - __pycache__/*
  # Show creation and revision date on each page
  - git-revision-date-localized:
      enabled: !ENV ["CI", false]
      enable_creation_date: true
      exclude:
        - index.md
  # Show people who've contributed on each page
  - git-committers:
      enabled: !ENV ["CI", false]
      repository: Vatsim-Scandinavia/controlcenter
      branch: main
      token: !ENV ["CONTRIBUTORS_TOKEN"]
