# A product's help site: docs, blog, community, status (an HTTP monitor with a
# keyword, and a worker heartbeat) and legal pages, one site on a subdomain,
# readers signing in through the product's Atlas.
#
# Guide: https://forumulate.com/guides/product-help-site
# Change the lines marked CHANGE, then:
#   npx -y @forumulate/cli@0.21.0 plan --diff
#   npx -y @forumulate/cli@0.21.0 apply --secrets-file ./secrets.json
version: 2
org: yourproduct # CHANGE: your organization's slug (or --org / FORUMULATE_ORG)

spaces:
  - slug: docs
    name: Docs
    type: DOCS
    visibility: PUBLIC
    seo:
      seoTitle: Your Product docs # CHANGE
      description: How to set up and use Your Product, step by step. # CHANGE

  - slug: blog
    name: Blog
    type: BLOG
    visibility: PUBLIC
    seo: { description: News and release notes from the Your Product team. } # CHANGE
    posts: { dir: content/blog }

  - slug: community
    name: Community
    type: FORUM
    visibility: PUBLIC
    seo: { description: Ask questions and share what you built with Your Product. } # CHANGE
    categories:
      - { name: Announcements }
      - { name: Help, description: Questions about Your Product }

  - slug: status
    name: Status
    type: STATUS
    visibility: PUBLIC
    seo: { description: Live status of the Your Product app, API and background jobs. } # CHANGE
    monitors:
      # The app's own health route (below), checked every minute; "ok" must be in the body.
      - { name: App, url: https://app.yourproduct.com/api/health, keyword: '"ok":true' } # CHANGE
      # The background worker pings us after each run; down after 1.5 intervals of silence.
      - { name: Worker, kind: heartbeat, intervalSeconds: 300 }

  - slug: legal
    name: Legal
    type: LEGAL
    visibility: PUBLIC
    seo: { description: Terms, privacy and the other agreements for Your Product. } # CHANGE

pages:
  - { dir: content/docs, space: docs }
  - { dir: content/legal, space: legal }

sites:
  - slug: help
    name: Your Product Help # CHANGE
    subdomain: yourproduct # CHANGE: yourproduct.forumulate.com
    spaces: [docs, blog, community, status, legal]
    config:
      search: pill
      headerLinks:
        - { label: Docs, href: /docs }
        - { label: Community, href: /community }
        - { label: Status, href: /status }
        - { label: Open the app, href: 'https://app.yourproduct.com', style: button } # CHANGE

readerAuth: atlas # readers sign in with their Your Product account
