Skip to content

docs: introduce a multi-file codeviewer component for docs #1237

@danielhe4rt

Description

@danielhe4rt

Problem

The Bruin documentation currently lacks a built-in way to present multi-file code examples interactively. Tutorials and guides that span multiple files (e.g., pipeline definitions, YAML + SQL + Python assets) require readers to scroll through long snippets or open multiple tabs, which interrupts learning flow and context.

Proposed Solution

Implement a new CodeViewer Vue 3 component to display file trees and their code contents directly within Bruin’s VitePress documentation. The component will serve as a core utility for documentation pages showcasing multi-file examples, like:

2025-10-17.23-47-32.mp4

This component should support two data-feeding modes:

  • Filesystem-based feed — automatically reads files from a designated /examples folder to render file structure and contents.
  • Programmatic feed — accepts an array of objects (e.g. [{ name, type, path, content, language, children }]) for inline embedding in Markdown or MDX.

Let me know your thoughts on it. If the idea gets approved, I can submit a draft so we can look closer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions