Commit 2d997077 authored by Cynthia "Arty" Ng's avatar Cynthia "Arty" Ng 💬
Browse files

Replace frontmatter aliases with redirects and fix Vale rule

parent a5608696
Loading
Loading
Loading
Loading
+23 −4
Original line number Diff line number Diff line
---
# Error: handbook.Aliases
#
# Checks whether there is an alias in frontmatter.
# Aliases should be moved to layouts/index.redirects instead.
#
# For a list of all options, see https://vale.sh/docs/topics/styles/
extends: existence
---
extends: script
message: "Do not use aliases in frontmatter. Use a redirect instead. See the link for more information."
link: https://handbook.gitlab.com/docs/frontmatter/#aliases
level: error
scope: raw
tokens:
  - '^aliases:'
script: |
  text := import("text")
  matches := []
  frontmatterDelimiterCount := 0
  frontmatter := ""

  for line in text.split(scope, "\n") {
    if frontmatterDelimiterCount == 1 {
      frontmatter += line
    }
    if frontmatterDelimiterCount == 2 {
      break
    }
    if text.re_match("^---", line) {
      frontmatterDelimiterCount++
    }
  }

  if text.re_match("aliases:", frontmatter) {
    matches = append(matches, { begin: 1, end: 1 })
  }
+0 −2
Original line number Diff line number Diff line
@@ -9,8 +9,6 @@ approvers: [ "@sranasinghe", "@luciezhao" ]
owning-stage: "~devops::tenant scale"
participating-stages: ["~devops::data stores", "~devops::systems"]
toc_hide: true
aliases:
  - /handbook/engineering/architecture/design-documents/cells/migration/
---

{{< engineering/design-document-header >}}
+0 −2
Original line number Diff line number Diff line
---
title: "Engineering IC Leadership"
aliases:
  - /handbook/engineering/ic-leadership/
---

## Engineering IC Leadership at GitLab: going beyond Senior level
+0 −2
Original line number Diff line number Diff line
---
title: "Tech Lead at GitLab"
aliases:
  - /handbook/engineering/ic-leadership/tech-lead/
---

## Tech Lead at GitLab
+0 −2
Original line number Diff line number Diff line
---
title: "Engineering Management"
aliases:
  - /handbook/engineering/management/
---

## How Engineering Management Works at GitLab
Loading