Skip to content

Implement feature flags list page

Port generate_feature_flags from build_site.rake.

This script creates the content for this page: https://docs.gitlab.com/ee/user/feature_flags.html

For a Hugo version, we'd probably need to do something like:

  1. Extract the feature flags from gitlab, like we do in Ruby here: https://gitlab.com/gitlab-org/gitlab-docs/-/blob/main/lib/tasks/build_site.rake#L67

  2. Combine all of these individual YAML files into a single YAML file.

    • The Nanoc one looks like this after its built: https://gitlab.com/-/snippets/3739917.
    • We can ignore this file in Git and Yamllint since it's machine-generated.
    • To work this in with our existing build process, it'd probably work well to do this just like we did for building the breadcrumbs.json file in !177 (merged):
      • Add a new file (and test file) in cmd/gldocs/tasks, like build_feature_flags.go
      • Call whatever function it provides from cmd/build.go
  3. Create a Hugo template to turn that YAML into a table.

It might make sense to just read the individual YAML files directly from the Hugo template (so, skipping step 2, or having the script just move the YAML files into data/ for Hugo). I'm not sure why it was necessary to combine them all into a single YAML file.

Edited by Hiru Fernando