# jamesdeluk/hugo architecture

> Architecture diagram of the GitHub repository jamesdeluk/hugo, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jamesdeluk/hugo
- Repository: https://github.com/jamesdeluk/hugo

## Overview

##### Main Components

a) Development Environment:
- Source Content Layer (Markdown files in /content)
- Theme/Template Layer (layouts/, assets/, static/)
- Configuration Layer (hugo.yaml, config files)

b) Build System:
- Hugo Static Site Generator
- Asset Pipeline (processing SCSS, images)
- Build Configuration (.hugo_build.lock)

c) Deployment & CI/CD:
- GitHub/GitLab Integration (.github/, .gitlab-ci.yml)
- Netlify Deployment (netlify.toml)
- Automated Workflows (GitHub Actions)

**[Content Management] → [Build Process] → [Deployment & Hosting]**

##### Important Relationships to Highlight

- Content organization (posts, sections, data)
- Theme customization flow
- Multi-language support structure (i18n)
- Asset processing pipeline
- Automated deployment workflow

##### Key Technical Elements

- Hugo template system
- SCSS processing
- Image optimization
- GitHub Actions workflows
- Netlify deployment configuration

##### Specific Implementation Details

How the following directories interact:
- archetypes/ → content/ → layouts/
- assets/ → static/
- data/ → templates

Automation flows:
- GitHub Actions (merge-to-main, pull-request, theme-update)
- Dependabot integration
- Kodiak configuration

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Content
        MD[Content Files]
        AT[Archetypes]
        click MD "https://github.com/jamesdeluk/hugo/tree/main/content/posts"
        click AT "https://github.com/jamesdeluk/hugo/blob/main/archetypes/default.md"
    end

    subgraph Templates
        LY[Layouts]
        PT[Partials]
        click LY "https://github.com/jamesdeluk/hugo/tree/main/layouts"
        click PT "https://github.com/jamesdeluk/hugo/tree/main/layouts/partials"
    end

    subgraph Assets
        ST[Static Files]
        SCSS[SCSS Styles]
        IMG[Images]
        click ST "https://github.com/jamesdeluk/hugo/tree/main/static"
        click SCSS "https://github.com/jamesdeluk/hugo/tree/main/assets/styles"
        click IMG "https://github.com/jamesdeluk/hugo/tree/main/assets/images"
    end

    subgraph Configuration
        HC[Hugo Config]
        SD[Site Data]
        click HC "https://github.com/jamesdeluk/hugo/blob/main/hugo.yaml"
        click SD "https://github.com/jamesdeluk/hugo/blob/main/data/en/site.yaml"
    end

    subgraph "Build System"
        HG[Hugo Generator]
        BL[Build Lock]
        PH[Package Hugo]
        click BL "https://github.com/jamesdeluk/hugo/blob/main/.hugo_build.lock"
        click PH "https://github.com/jamesdeluk/hugo/blob/main/package.hugo.json"
    end

    subgraph "Asset Pipeline"
        OV[SCSS Overrides]
        VAR[SCSS Variables]
        JSC[JS Config]
        click OV "https://github.com/jamesdeluk/hugo/blob/main/assets/styles/_override.scss"
        click VAR "https://github.com/jamesdeluk/hugo/blob/main/assets/styles/variables.scss"
        click JSC "https://github.com/jamesdeluk/hugo/blob/main/assets/jsconfig.json"
    end

    subgraph "Multi-language"
        I18[i18n Files]
        LSD[Language Data]
        click I18 "https://github.com/jamesdeluk/hugo/blob/main/i18n/en.toml"
        click LSD "https://github.com/jamesdeluk/hugo/tree/main/data/en"
    end

    subgraph "CI/CD & Deployment"
        GHA[GitHub Actions]
        GL[GitLab CI]
        NT[Netlify Config]
        DB[Dependabot]
        KD[Kodiak]
        click GHA "https://github.com/jamesdeluk/hugo/tree/main/.github/workflows"
        click GL "https://github.com/jamesdeluk/hugo/blob/main/.gitlab-ci.yml"
        click NT "https://github.com/jamesdeluk/hugo/blob/main/netlify.toml"
        click DB "https://github.com/jamesdeluk/hugo/blob/main/.github/dependabot.yml"
        click KD "https://github.com/jamesdeluk/hugo/blob/main/.github/.kodiak.toml"
    end

    MD --> HG
    AT --> MD
    LY --> HG
    PT --> HG
    ST --> HG
    SCSS --> HG
    IMG --> HG
    HC --> HG
    SD --> HG
    OV --> SCSS
    VAR --> SCSS
    I18 --> HG
    LSD --> HG
    HG --> BL
    HG --> PH
    BL --> GHA
    PH --> GHA
    GHA --> NT
    GL --> NT
    DB --> KD
    KD --> GHA

    classDef content fill:#e1f5fe,stroke:#01579b
    classDef template fill:#e8f5e9,stroke:#1b5e20
    classDef asset fill:#fff3e0,stroke:#e65100
    classDef config fill:#f3e5f5,stroke:#4a148c
    classDef build fill:#fbe9e7,stroke:#bf360c
    classDef pipeline fill:#e0f2f1,stroke:#004d40
    classDef i18n fill:#f1f8e9,stroke:#33691e
    classDef cicd fill:#ede7f6,stroke:#311b92

    class MD,AT content
    class LY,PT template
    class ST,SCSS,IMG asset
    class HC,SD config
    class HG,BL,PH build
    class OV,VAR,JSC pipeline
    class I18,LSD i18n
    class GHA,GL,NT,DB,KD cicd
```
