Introduce a configuration file for the Static Site Editor

Problem to solve

To accommodate various static site generators and project customization it is important for the Static Site Editor (SSE) to have a proper understanding of the environment that the project is configured in. While we will default to using sensible defaults there is a strong need to be able to customize these defaults to allow maximum compatibility with projects. Configuration can also be used to modify the default behavior of the SSE.

  1. As a Software Developer, I want to override the SSE's default configuration, so I can ensure it works correctly with my project structure.
  2. As a Software Developer, I want to override the SSE's default configuration, so I can customize the behavior of the SSE.

Intended users

Personas are described at https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/

User experience goal

The user should be able to create/edit a .gitlab/static-site-editor.yml file to override the SSE default settings.

Proposal

Introduce a configuration file that is read when the SSE URL (/-/sse/) is requested. We should parse, validate, and transform the configuration file entries in the backend and pass it the the SSE component on the frontend.

The backend will only be concerned with the parsing, validation and transformation of the configuration entries.

Further details

Refer to the R&D issue, #217019 (closed), where @vyaklushin put together a proposal for the configuration file.

Documentation

We should document all default configuration values.

Availability & Testing

What does success look like, and how can we measure that?

Is this a cross-stage feature?

We might want to introduce a validation linter similar to (.gitlab-ci.yml) for the SSE configuration file in the future.

Edited by Jean du Plessis