backend:
  name: github
  repo: pierretre/edtlab
  branch: main
  site_domain: edtlab.fr
  base_url: https://edtlab.fr
  auth_endpoint: auth

# CMS uploads go to public/ for reliable preview and no build-time hashing
media_folder: "public/media/uploads"
public_folder: "/media/uploads"

publish_mode: editorial_workflow

# Content collections
collections:
  # Main Pages
  - name: "pages"
    label: "Pages"
    label_singular: "Page"
    folder: "src/content/pages"
    nested:
      depth: 10
      subfolders: false
      summary: "{{dirname}}/"
      nested:
        depth: 10
        subfolders: false
        summary: "{{dirname}}/"
    create: false
    delete: false
    extension: "mdx"
    format: "frontmatter"
    summary: "{{title}} [{{lang}}]"
    editor:
      preview: true
    i18n:
      structure: single_file
      locales: [en, fr]
      default_locale: en
    fields:
      - { label: "Title", name: "title", widget: "string", required: true }
      - { label: "URL Slug", name: "href", widget: "string", required: false, hint: "URL path for this page (e.g., 'about', 'contact')" }
      - { label: "Language", name: "lang", widget: "select", options: ["en", "fr"], required: true, default: "en" }
      - { label: "Summary", name: "description", widget: "text", required: false, hint: "Brief description for SEO and previews" }
      - { label: "Enable Table of Contents", name: "toc", widget: "boolean", default: false, required: false }
      - { label: "Body", name: "body", widget: "markdown", required: true }

  # News
  - name: "news"
    label: "News"
    label_singular: "News Article"
    folder: "src/content/news"
    create: true
    summary: "{{fields.title}}-{{fields.type}} ({{fields.tags}}) [{{fields.lang}}]"
    editor:
      preview: true
    format: "frontmatter"
    i18n:
      structure: multiple_files
      locales: [en, fr]
      default_locale: en
    view_filters:
      - label: "English pages"
        field: lang
        pattern: 'en'
      - label: "French pages"
        field: lang
        pattern: 'fr'
    slug: "{{fields.newsType}}-{{fields.date}}-{{fields.title}}-{{fields.lang}}"
    fields:
      - { label: "Title", name: "title", widget: "string", required: true }
      - { label: "Language", name: "lang", widget: "select", options: ["en", "fr"], required: true, default: "en" }
      - { label: "Published Date", name: "date", widget: "datetime",   default: "{{now}}", date_format: "YYYY-MM-DD", required: true }
      - { label: "News Type", name: "newsType", widget: "select", options: ["event", "press-release"], default: "event", required: true }
      - { label: "Location", name: "location", widget: "string", required: false, hint: "For events only" }
      - { label: "Time Label", name: "timeLabel", widget: "string", required: false, hint: "For events only, e.g. 'July 6-8, 2026'" }
      - { label: "External URL", name: "url", widget: "string", required: false, hint: "Link to an external page for this news item, if any" }
      - { label: "Calendar (.ics) Path", name: "icsPath", widget: "file", required: false, hint: "For events only, e.g. /calendar/my-event.ics" }
      - { label: "Redirect To (slug)", name: "redirectTo", widget: "relation", collection: "news", search_fields: ["title"], value_field: "{{slug}}", display_fields: ["title"], required: false, hint: "Use to point this entry to its translation/other-language counterpart" }
      - { label: "Summary", name: "description", widget: "text", required: true, hint : "Brief summary of the news item (2-3 sentences)" }
      - { label: "Photo", name: "photo", widget: "image", required: true, hint: "Cover image filename" }
      - { label: "Tags", name: "tags", widget: "list", required: false, default: [], hint: "List of tags (e.g. PC1) (separated by comma)", allow_add: true }
      - { label: "Body", name: "body", widget: "markdown", required: true }

  # Job Offers
  - name: "job-offers"
    label: "Job Offers"
    label_singular: "Job Offer"
    folder: "src/content/job-offers"
    create: true
    summary: "{{fields.type}} Position: {{fields.title}} ({{fields.tags}})"
    editor:
      preview: true
    format: "frontmatter"
    slug: "{{fields.type}}-{{fields.tags}}-{{fields.title}}"
    fields:
      - { label: "Title", name: "title", widget: "string", required: true }
      - { label: "Type", name: "type", widget: "select", options: ["PhD", "PostDoc", "Engineer", "Intern", "Others"], required: true }
      - { label: "Location", name: "location", widget: "string", required: true, hint: "City, Country" }
      - { label: "Expected Start Date", name: "expectedStartDate", widget: "string", required: true, hint: "e.g., 'Spring 2025', 'September 2024'" }
      - { label: "Published Date", name: "publishedDate", widget: "datetime",   default: "{{now}}", date_format: "YYYY-MM-DD", required: true }
      - { label: "Position Filled", name: "filled", widget: "boolean", default: false, required: true }
      - { label: "Summary", name: "description", widget: "text", required: true, hint: "Brief summary of the position (2-3 sentences). The detailed description goes in the Body section below." }
      - { label: "Requirements", name: "requirements", widget: "list", required: true, min: 1, default: ["Fluency in English and French"], hint: "List of key requirements for the position (separated by comma)", allow_add: true }
      - { label: "Tags", name: "tags", widget: "list", required: false, default: [], hint: "List of tags (e.g. PC1) (separated by comma)", allow_add: true }
      - { label: "Contacts", name: "contacts", widget: "list", required: true, default: [], hint: "List of contact emails (separated by comma)", allow_add: true }
      - { label: "Language", name: "lang", widget: "select", options: ["en", "fr"], required: false }
      - { label: "References", name: "references", widget: "list", required: false, default: [], hint: "e.g. related publications, use cases", allow_add: true }
      - { label: "Partner", name: "partner", widget: "string", required: false, hint: "Partner organization co-hosting this position, if any" }
      - { label: "External URL", name: "externalUrl", widget: "string", required: false, hint: "Link to the full offer if hosted externally" }
      - label: "Body"
        name: "body"
        widget: "markdown"
        required: true
        default: |
          ## Context

          Digital twins are virtual representations of real-world products, systems, or processes, enabling simulation, integration, testing, monitoring, and maintenance. They play a pivotal role in optimizing>
          The Engineering Digital Twin [EDT program](https://edtlab.fr/en/), funded by the France 2030 investment plan, is a national initiative aimed at advancing the scientific and technical foundations of d>

          [add PhD context description]

          ## Thesis Objectives
          This PhD project aims to [concise summary of the main objective in one or two sentences]. Key scientific challenges include:

          - [Challenge 1, e.g., "Designing autonomous agents for real-time interaction with digital twins."]
          - [Challenge 2, e.g., "Integrating heterogeneous models and managing uncertainties."]
          - [Challenge 3, e.g., "Optimizing human-digital twin interactions."]

          The results of this thesis will directly contribute to the Artemis platform, an open-source framework set to become a benchmark in the field.

          ## Work Environment
          The PhD candidate will be co-supervised by [Supervisor’s Name, Institution] and [Co-supervisor’s Name, Institution] within [Team/Lab Name](link to Team/Lab). The candidate will benefit from a stimula>

          ## What You Will Gain from This PhD
          This PhD offers the opportunity to:
          - Develop highly sought-after skills in system modeling, real-time data processing, and collaborative innovation.
          - Collaborate with leading partners (Inria, CEA, CNRS, etc.) and validate your research on real-world industrial use cases.
          - Join a network of PhD candidates within the EDT program, fostering collaboration, peer support, and interdisciplinary exchanges.
          - Contribute to an open-source platform (Artemis) and publish in international conferences and journals.
          - Gain recognition in a rapidly growing field, with career prospects in academic research, industrial R&D, or entrepreneurship.

          Upon completion, you will be positioned as a recognized expert in a key domain for industry and research, with diverse professional opportunities in France and internationally.

          ## References
          - Benoît Combemale, Pascale Vicat-Blanc, Arnaud Blouin, Hind Bril El Haouzi, Jean-Michel Bruel, et al.. Engineering Digital Twins: A Research Roadmap. EDTconf 2025 - 2nd International Conference on E>
          - [Additional references]

  # Publications
  - name: "publications"
    label: "Publications"
    label_singular: "Publication"
    folder: "src/content/publications"
    create: true
    summary: "{{slug}}, {{authors}} - {{year}}"
    format: "frontmatter"
    editor:
      preview: false
    fields:
      - { label: "Title", name: "title", widget: "string", required: true }
      - { label: "Authors", name: "authors", widget: "list", required: true, hint: "List of author names" }
      - { label: "Type", name: "type", widget: "select", options: ["journal", "conference", "book", "report", "white-paper", "preprint", "thesis", "workshop", "slidedeck"], required: true }
      - { label: "Year", name: "year", widget: "number", required: true, value_type: "int", min: 1900, max: 2100 }
      - { label: "Venue", name: "venue", widget: "string", required: false, hint: "Journal name, conference name, etc." }
      - { label: "DOI", name: "doi", widget: "string", required: false, hint: "Digital Object Identifier" }
      - { label: "URL", name: "url", widget: "string", required: false, hint: "Link to publication" }
      - { label: "Origin", name: "origin", widget: "select", options: ["edt", "external"], required: false, default: "external", hint: "Was this publication produced within the EDT program?" }
      - { label: "Tags", name: "tags", widget: "list", required: false, hint: "e.g., PC1, PC2, keywords" }

  # Newsletter
  - name: "newsletter"
    label: "Newsletter"
    folder: "src/content/newsletter"
    create: true
    slug: "{{year}}-{{month}}-{{title}}-{{recipients}}"
    summary: "{{slug}}, {{authors}} - {{year}}"
    format: "frontmatter"
    editor:
      preview: true
    fields:
      - { label: "Title", name: "title", widget: "string" }
      - { label: "Date", name: "date", widget: "datetime" }
      - { label: "Recipients", name: "recipients", widget: "select", options: ["Internal", "External"], required: true, default: "Internal" }

  # Research Studies (ongoing PhDs and postdocs, maintained by the researcher)
  - name: "research-studies"
    label: "Research Studies"
    label_singular: "Research Study"
    folder: "src/content/research-studies"
    create: true
    summary: "{{fields.title}} ({{fields.pc}}) - {{fields.researcher.name}}"
    editor:
      preview: true
    format: "frontmatter"
    fields:
      - { label: "Title", name: "title", widget: "string", required: true }
      - { label: "Language", name: "lang", widget: "select", options: ["en", "fr"], required: false }
      - { label: "Type", name: "type", widget: "select", options: ["PhD", "PostDoc"], required: true, default: "PhD" }
      - label: "Researcher"
        name: "researcher"
        widget: "object"
        fields:
          - { label: "Name", name: "name", widget: "string", required: true }
          - { label: "Email", name: "email", widget: "string", required: false }
      - { label: "PC", name: "pc", widget: "select", options: ["PC1", "PC2", "PC3", "PC4", "PC5"], required: true }
      - { label: "Funding", name: "funding", widget: "select", options: ["EDT", "external"], required: false, hint: "e.g. CIFRE, other external funding" }
      - { label: "Location", name: "location", widget: "string", required: true, hint: "City, Country (e.g., 'Inria Rennes, France') — same format as job offers" }
      - { label: "Host institute / team", name: "host", widget: "string", required: false, hint: "e.g., 'Inria Rennes, diverSE'" }
      - label: "Supervisors"
        name: "supervisors"
        widget: "list"
        min: 1
        fields:
          - { label: "Name", name: "name", widget: "string", required: true }
          - { label: "Organization", name: "org", widget: "string", required: false }
      - { label: "Start Date", name: "startDate", widget: "datetime", date_format: "YYYY-MM-DD", required: true }
      - { label: "Expected End Date", name: "expectedEndDate", widget: "datetime", date_format: "YYYY-MM-DD", required: false }
      - { label: "Status", name: "status", widget: "select", options: ["planned", "ongoing", "completed", "paused", "withdrawn"], required: true, default: "ongoing" }
      - { label: "Summary", name: "description", widget: "text", required: true }
      - label: "Related Use Cases"
        name: "useCases"
        widget: "list"
        required: false
        fields:
          - { label: "Title", name: "title", widget: "string", required: true, hint: "Displayed even if the UC is not yet published" }
          - { label: "Reference (slug)", name: "ref", widget: "relation", collection: "use-cases", search_fields: ["title", "id"], value_field: "{{slug}}", display_fields: ["title"], required: false }
          - { label: "Note", name: "note", widget: "string", required: false, hint: "e.g., 'in preparation'" }
      - { label: "Publications", name: "publications", widget: "relation", collection: "publications", search_fields: ["title"], value_field: "{{slug}}", display_fields: ["title", "year"], multiple: true, required: false }
      - { label: "Tags", name: "tags", widget: "list", required: false, default: [] }
      - { label: "Last Updated", name: "lastUpdated", widget: "datetime", date_format: "YYYY-MM-DD", required: false }
      - { label: "Original Job Offer (slug)", name: "originalJobOffer", widget: "relation", collection: "job-offers", search_fields: ["title"], value_field: "{{slug}}", display_fields: ["title"], required: false }
      - label: "Body"
        name: "body"
        widget: "markdown"
        required: true
        default: |
          ## Avancement

          [Décrire l'avancement de la thèse / des travaux]

          ## News

          [Liens vers les news liées, séminaires, etc.]