Page constructor

Page constructor (hereinafter PC) is a library of the Gravity UI family for rendering web pages based on data presented in YAML format.
When creating pages, component-based approach is used: a page is built using a set of ready-made blocks that can be placed in any order. Each block has a certain type and set of input data parameters.
For the format of input data and list of available blocks, see the documentation. The PC storybook has a convenient sandbox, in which you can first try out all the blocks and assemble the page, and only then copy the finished config to your documentation.

Examples of page design using PC [1] [2] [3]

Structure

The standard PC page configuration structure is stored in .yaml format and looks like:

blocks:
  - type: 'header-block'
    width: 's'
    offset: 'default'
    title: 'Diplodoc'
    resetPaddings: true
    verticalOffset: 'l'
    description: 'A platform with open-source code for creating technical documentation based on the concept of Docs as Code. A simple and convenient document management solution for large and small teams.'
    background:
      image:
        mobile: 'https://storage.yandexcloud.net/diplodoc-www-assets/pages/index-diplodoc/ddos-index-cover-mini.png'
        desktop: '../../_images/cover.png'
      color: '#C6FE4D'
      fullWidth: false
    buttons:
      - text: 'Quickstart'
        theme: 'dark'
        size: 'promo'
        url: '/quickstart'
      - text: 'GitHub'
        theme: 'outlined'
        size: 'promo'
        url: 'https://github.com/diplodoc-platform'

A description of the fields for each block can be found in documentation.