# For a list of configuration options, see https://nanoc.ws/doc/reference/config/
string_pattern_type: glob
text_extensions: [
  'adoc',
  'asciidoc',
  'atom',
  'coffee',
  'css',
  'erb',
  'haml',
  'handlebars',
  'hb',
  'htm',
  'html',
  'js',
  'less',
  'markdown',
  'md',
  'ms',
  'mustache',
  'php',
  'rb',
  'rdoc',
  'sass',
  'scss',
  'slim',
  'txt',
  'xhtml',
  'xml']
output_dir: public
index_filenames: ['index.html']
enable_output_diff: false
breadcrumbs: false
debug: false

domain: docs.gitlab.com
base_url: https://docs.gitlab.com

prune:
  auto_prune: true
  exclude: ['.git', '.hg', 'frontend', 'assets']

data_sources:
  -
    type: filesystem
    items_root: /
    layouts_root: /
    encoding: utf-8
    identifier_type: full
  -  # Documentation from https://gitlab.com/gitlab-org/gitlab
    type: filesystem
    items_root: /ee/
    content_dir: ../gitlab/doc
    layouts_dir: null
    encoding: utf-8
    identifier_type: full
  -  # Documentation from https://gitlab.com/gitlab-org/gitlab-runner
    type: filesystem
    items_root: /runner/
    content_dir: ../gitlab-runner/docs
    layouts_dir: null
    encoding: utf-8
    identifier_type: full
  -  # Documentation from https://gitlab.com/gitlab-org/omnibus-gitlab
    type: filesystem
    items_root: /omnibus/
    content_dir: ../omnibus-gitlab/doc
    layouts_dir: null
    encoding: utf-8
    identifier_type: full
  -  # Documentation from https://gitlab.com/gitlab-org/charts/gitlab
    type: filesystem
    items_root: /charts/
    content_dir: ../charts-gitlab/doc
    layouts_dir: null
    encoding: utf-8
    identifier_type: full
  -  # Documentation from git@gitlab.com:gitlab-org/cloud-native/gitlab-operator
    type: filesystem
    items_root: /operator/
    content_dir: ../gitlab-operator/doc
    layouts_dir: null
    encoding: utf-8
    identifier_type: full

products:
  ee:
    slug: 'ee'
    repo: 'https://gitlab.com/gitlab-org/gitlab.git'
    project_dir: '../gitlab'
    content_dir: '../gitlab/doc'
    default_branch: 'master'
  runner:
    slug: 'runner'
    repo: 'https://gitlab.com/gitlab-org/gitlab-runner.git'
    project_dir: '../gitlab-runner'
    content_dir: '../gitlab-runner/docs'
    default_branch: 'main'
  omnibus:
    slug: 'omnibus'
    repo: 'https://gitlab.com/gitlab-org/omnibus-gitlab.git'
    project_dir: '../omnibus-gitlab'
    content_dir: '../omnibus-gitlab/doc'
    default_branch: 'master'
  charts:
    slug: 'charts'
    repo: 'https://gitlab.com/gitlab-org/charts/gitlab.git'
    project_dir: '../charts-gitlab'
    content_dir: '../charts-gitlab/doc'
    default_branch: 'master'
  operator:
    slug: 'operator'
    repo: 'https://gitlab.com/gitlab-org/cloud-native/gitlab-operator.git'
    project_dir: '../gitlab-operator'
    content_dir: '../gitlab-operator/doc'
    default_branch: 'master'

checks:
  internal_links:
    exclude:
      # Exclude major.minor versions that are used under /archives
      - '^/\d{1,2}\.\d{1,2}/'
      # The versions dropdown for the archives is incorrect. Remove this
      # when fixed.
      - '\/archives.html'

  external_links:
    exclude:
      # Valid links incorrectly reported as broken.
      - 'https:\/\/gitlab.com\/api\/v4\/.*'
      - 'https:\/\/www\.linkedin\.com\/company\/gitlab-com'
      - 'https:\/\/auth0\.com\/auth\/login'
      - 'https:\/\/gitlab-org\.gitlab\.io\/gitlab-svgs'
      - 'https:\/\/gitlab-org\.gitlab\.io\/growth\/product-intelligence\/metric-dictionary'
      - 'https:\/\/dl\.acm\.org\/citation\.cfm\?id=361591'
      - 'https:\/\/pgp\.mit\.edu\/pks\/lookup\?op=vindex\&search=.*'
      - 'https:\/\/www\.amazon\.com\/.*'
      - 'https:\/\/contributors\.gitlab\.com\/'
      - 'https:\/\/downloads\.raspberrypi\.org\/raspbian\/images\/'
      - 'https:\/\/wiki\.jenkins\.io\/display\/JENKINS\/'
      - 'https:\/\/twitter\.com\/gitlab'
      - 'https:\/\/www\.facebook\.com\/gitlab'
      - 'https:\/\/www\.mend\.io\/gitlab\/.*'
      - 'https:\/\/support\.discord\.com.*'
      - 'https:\/\/www\.hostgator\.com\/help\/.*'
      - 'https:\/\/help\.dreamhost\.com\/hc\/.*'
      - 'https:\/\/www\.bluehost\.com\/help\/.*'
      - 'https:\/\/linux\.die\.net\/.*'
      - 'https:\/\/docs\.google\.com\/.*'
      # Redirected links to ignore.
      - 'https:\/\/www\.jaegertracing\.io\/docs\/latest\/'
      - 'https:\/\/bit.ly\/.*'
      # Don't check links matching the following patterns.
      - 'https?:\/\/\w*\.example\.com.*'
      - 'https?:\/\/localhost.*'
      - 'https?:\/\/127.0.0.1.*'
      - 'http?:\/\/gdk.test.*'
      # Don't check gitlab.com links. Cloudflare thinks the link test is a DOS attack.
      # The temporary solution is to exclude them from link testing.
      - 'https:\/\/gitlab.com.*'
      # Some sites rate limit requests, causing 429 errors.
      # The temporary solution is to exclude them from link testing.
      - 'https:\/\/github.com\/.*'
      - 'https:\/\/www.youtube.com\/.*'
      - 'https:\/\/youtu.be\/.*'
      # Some links require authentication
      - 'https:\/\/dashboards.gitlab.com\/.*'
      - 'https:\/\/ops\.gitlab\.net\/.*'
      - 'https:\/\/start.1password.com\/.*'
      # Redirected link we don't want to update to platform/locale specific link
      # See https://gitlab.com/gitlab-org/gitlab/-/issues/368300#note_1047352091
      - 'https:\/\/support.gitlab.com'
      # Other internal links
      - 'http:\/\/internal-handbook.gitlab.io\/.*'
      - 'https:\/\/log.gitlab.net'
      - 'https:\/\/new-sentry.gitlab.net\/.*'
      - 'https:\/\/sentry.gitlab.net\/.*'
      - 'https:\/\/*\.staging.gitlab.com\/.*'
