# drone/docs architecture

> Architecture diagram of the GitHub repository drone/docs, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/drone/docs
- Repository: https://github.com/drone/docs

## Overview

##### Main Components Identification

a) Content Management Layer
- Content (Markdown files)
- Templates (Hugo themes)
- Static assets

b) Build System
- Hugo static site generator
- Build pipeline (Drone CI)

c) Deployment Layer
- Web server
- CDN (implied for docs.drone.io)

**[Content Layer]**

- Content Files (*.md)
- Theme Templates
- Static Assets

- ↓ (Hugo Build Process)

**[Build Layer]**

- Hugo Generator
- Drone CI Pipeline

- ↓ (Deployment)

**[Serving Layer]**

- Web Server
- CDN

##### Component Details

a) Content Components (Blue rectangles)
- Markdown content files
- Theme files
- Static assets
- Configuration files (config.yaml)

b) Build Components (Green rectangles)
- Hugo build process
- Drone CI pipeline
- Build artifacts

c) Deployment Components (Orange rectangles)
- Web server
- CDN distribution

##### Flow Indicators

- Content processing flow
- Build pipeline steps
- Deployment paths
- User access paths

##### Additional Elements

Include:
- Version control integration (GitHub)
- Local development flow
- Production deployment flow

##### Specific Implementation Details

Highlight:
- Hugo's role in generating static content
- Theme customization path
- Content organization structure
- Build and deployment automation

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Content
        MD[Markdown Content]
        TH[Theme Templates]
        SA[Static Assets]
        
        subgraph ContentStructure
            API[API Documentation]:::content
            PD[Pipeline Documentation]:::content
            SD[Server Documentation]:::content
            RD[Runner Documentation]:::content
        end
        
        subgraph ThemeComponents
            TL[Theme Layouts]:::theme
            TA[Theme Assets]:::theme
            TS[Theme Styles]:::theme
            
            subgraph ThemeCustomization
                SS[SASS Styles]:::theme
                PT[Page Templates]:::theme
                PRT[Partial Templates]:::theme
            end
        end
    end
    
    subgraph BuildSystem
        HC[Hugo Configuration]:::build
        BP[Build Pipeline]:::build
        HSG[Hugo Static Generator]:::process
    end
    
    subgraph Deployment
        WS[Web Server]:::deploy
        CDN[Content Delivery Network]:::deploy
    end
    
    MD --> HSG
    TH --> HSG
    SA --> HSG
    
    API --> HSG
    PD --> HSG
    SD --> HSG
    RD --> HSG
    
    TL --> HSG
    TA --> HSG
    TS --> HSG
    
    SS --> HSG
    PT --> HSG
    PRT --> HSG
    
    HSG --> BP
    HC --> HSG
    
    BP --> WS
    WS --> CDN
    
    %% Styles
    classDef content fill:#e1f5fe,stroke:#01579b
    classDef theme fill:#e8f5e9,stroke:#1b5e20
    classDef build fill:#fff3e0,stroke:#e65100
    classDef process fill:#f3e5f5,stroke:#4a148c
    classDef deploy fill:#fbe9e7,stroke:#bf360c
    
    %% Click events
    click MD "https://github.com/drone/docs/tree/master/content/"
    click TH "https://github.com/drone/docs/tree/master/themes/default/"
    click SA "https://github.com/drone/docs/tree/master/static/"
    click API "https://github.com/drone/docs/tree/master/content/api/"
    click PD "https://github.com/drone/docs/tree/master/content/pipeline/"
    click SD "https://github.com/drone/docs/tree/master/content/server/"
    click RD "https://github.com/drone/docs/tree/master/content/runner/"
    click TL "https://github.com/drone/docs/tree/master/themes/default/layouts/"
    click TA "https://github.com/drone/docs/tree/master/themes/default/assets/"
    click TS "https://github.com/drone/docs/tree/master/themes/default/styles/"
    click SS "https://github.com/drone/docs/tree/master/themes/default/assets/sass/"
    click PT "https://github.com/drone/docs/tree/master/themes/default/layouts/_default/"
    click PRT "https://github.com/drone/docs/tree/master/themes/default/layouts/partials/"
    click HC "https://github.com/drone/docs/blob/master/config.yaml"
    click BP "https://github.com/drone/docs/blob/master/.drone.yml"
```
