backend:
  name: git-gateway
  branch: main

media_folder: public/img/upload
public_folder: /img/upload

logo_url: /img/admin_logo.png

collections:
  - name: "artikler"
    label: "Artikler"
    label_singular: "artikkel"
    folder: "src/pages/artikler"
    create: true
    preview: false
    summary: "{{year}}-{{month}}-{{day}}: {{title}}"
    slug: "{{year}}-{{month}}-{{day}}-{{slug}}"
    fields:
      - {
          name: "layout",
          widget: "hidden",
          default: "../../layouts/ArticleLayout.astro",
        }
      - { label: "Tittel", name: "title", widget: "string" }
      - { label: "Bilde", name: "featuredimage", widget: image }
      - {
          label: "Ingress",
          name: "description",
          widget: "text",
          pattern: [".{50,160}", "Må være mellom 50 og 160 tegn"],
        }
      - { label: "Innhold", name: "body", widget: "markdown" }
      - { label: "Publisert dato", name: "date", widget: "datetime" }
      - {
          label: "Synlig i antall dager på forsiden",
          name: "expireInDays",
          widget: "number",
          default: 60,
          valueType: "int",
          min: 0,
          max: 365,
        }
      - { label: "Tagger", name: "tags", widget: "list" }

  - name: "pages"
    label: "Sider"
    files:
      - file: "src/pages/index.mdx"
        label: "Forsiden"
        name: "forside"
        delete: false
        fields:
          - {
              name: "layout",
              widget: "hidden",
              default: "../layouts/FrontpageLayout.astro",
            }
          - { label: "slagord", name: "slagord", widget: "string" }
          - { label: "featuredImage", name: "featuredImage", widget: image }
          - { label: Beskrivelse, name: description, widget: string }
          - {
              label: "Arrangementer tekst",
              name: "eventText",
              widget: "string",
            }
          - {
              label: "Speider er spennende bilde",
              name: "largeImage",
              widget: "image",
            }
          - { label: "Flokken tekst", name: "flokkenText", widget: "string" }
          - { label: "Troppen tekst", name: "troppenText", widget: "string" }
          - { label: "Rover tekst", name: "roverText", widget: "string" }
      - file: "src/pages/info.md"
        label: "Informasjon"
        name: "info"
        delete: false
        fields:
          - {
              name: "layout",
              widget: "hidden",
              default: "../layouts/MarkdownPageLayout.astro",
            }
          - { label: Tittel, name: "title", widget: "string" }
          - { label: Bilde, name: image, widget: image }
          - { label: Beskrivelse, name: description, widget: string }
          - { label: "Innhold", name: "body", widget: "markdown" }

      - file: "src/pages/bli-speider.md"
        label: "Bli speider"
        name: "bli-speider"
        delete: false
        fields:
          - {
              name: "layout",
              widget: "hidden",
              default: "../layouts/MarkdownPageLayout.astro",
            }
          - { label: Tittel, name: "title", widget: "string" }
          - { label: Bilde, name: image, widget: image }
          - { label: Beskrivelse, name: description, widget: string }
          - { label: "Innhold", name: "body", widget: "markdown" }
      - file: "src/pages/program.md"
        label: "Program"
        name: "program"
        delete: false
        fields:
          - {
              name: "layout",
              widget: "hidden",
              default: "../layouts/MarkdownPageLayout.astro",
            }
          - { label: Tittel, name: "title", widget: "string" }
          - { label: Bilde, name: image, widget: image }
          - { label: Beskrivelse, name: description, widget: string }
          - { label: "Innhold", name: "body", widget: "markdown" }
      - file: "src/pages/wiki.md"
        label: "Speider Wiki forside"
        name: "wiki"
        delete: false
        fields:
          - {
              name: "layout",
              widget: "hidden",
              default: "../layouts/WikiPageLayout.astro",
            }
          - { label: "Tittel", name: "title", widget: "string" }
          - { label: "Bilde", name: "image", widget: image }
          - { label: Beskrivelse, name: description, widget: string }
          - { label: "Innhold", name: "body", widget: "markdown" }

  - name: "wiki"
    label: "Wiki undersider"
    label_singular: "wiki side"
    folder: "src/pages/wiki"
    create: true
    preview: false
    slug: "{{slug}}"
    fields:
      - {
          name: "layout",
          widget: "hidden",
          default: "../../layouts/WikiPageLayout.astro",
        }
      - { label: "Tittel", name: "title", widget: "string" }
      - { label: Beskrivelse, name: description, widget: string }
      - { label: "Innhold", name: "body", widget: "markdown" }
      - { label: "Publisert dato", name: "createdDate", widget: "datetime" }
      - { label: "Oppdatert dato", name: "updatedDate", widget: "datetime" }
      - { label: "Tagger", name: "tags", widget: "list" }
