# salehtz/my-website architecture

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

- Interactive diagram: https://gitdiagram.com/salehtz/my-website
- Repository: https://github.com/salehtz/my-website

## Overview

##### Major Components
- Content Repository – This includes the “content” directory (with pages, posts, categories, tags, and multilingual folders), which holds the raw markdown files.
- Assets & Static Files – The “assets” folder (containing CSS, images, and media like music) and the “static” folder (with redirects, browserconfig, manifest, etc.) provide styling and non-processed files.
- Configuration & Internationalization – Files like “hugo.toml” for overall configuration and the “i18n” directory for language-specific translations.
- Themes – The “themes” directory (specifically “LoveIt”) that defines the presentation layer and template system for Hugo.
- Generated Resources – The “resources” folder that holds preprocessed/generated styles, images, and other assets.
- Build & Deployment System – The “.github/workflows/hugo.yaml” indicates a CI/CD pipeline (using GitHub Actions) that automates the site generation process.
- Public Output – The “public” directory contains all the generated output (HTML, XML, and assets) ready for deployment to GitHub Pages.

##### Relationships and Data Flows
- Content, assets, and static files are combined by Hugo using the configuration file (hugo.toml) and the selected theme to produce the website.
- The multilingual structure of “content” and “i18n” is combined during the build to generate language-specific folders in the “public” output (e.g., “fa”, “en”, “zh-cn”, etc.).
- GitHub Actions (triggered by pushes/commits) leverages the “hugo.yaml” workflow to run the Hugo build process.
- The final generated site (in the “public” folder) is deployed – likely to GitHub Pages as indicated by the README link.

##### Architectural Patterns and Technologies
- Static Site Generation – The entire site is built as a static website using Hugo.
- Separation of Concerns – The project neatly separates content (in “content”), styling and images (in “assets” and “static”), configuration (hugo.toml and i18n files), and presentation (themes).
- CI/CD Integration – Use of GitHub Actions to automatically build and (presumably) deploy the site.
- Multi-Language Support – Organizing multilingual content is a key feature.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Source Files"
        CR["Content Repository"]:::source
        subgraph "Assets & Static Files"
            A["Assets"]:::source
            S["Static Files"]:::source
        end
        subgraph "Configuration & Internationalization"
            CT["hugo.toml"]:::source
            I18n["i18n"]:::source
        end
        T["Theme - LoveIt"]:::source
        GR["Generated Resources"]:::source
    end

    BP["Build & Deployment System (GitHub Actions)"]:::build
    HP["Hugo Static Site Generator"]:::process
    PO["Public Output"]:::output
    DP["Deployment (GitHub Pages)"]:::output

    CR --> HP
    A --> HP
    S --> HP
    CT --> HP
    I18n --> HP
    T --> HP
    GR --> HP
    BP --> HP
    HP --> PO
    PO --> DP

    click CR "https://github.com/salehtz/my-website/tree/main/content"
    click A "https://github.com/salehtz/my-website/tree/main/assets"
    click S "https://github.com/salehtz/my-website/tree/main/static"
    click CT "https://github.com/salehtz/my-website/blob/main/hugo.toml"
    click I18n "https://github.com/salehtz/my-website/tree/main/i18n"
    click T "https://github.com/salehtz/my-website/tree/main/themes/LoveIt"
    click GR "https://github.com/salehtz/my-website/tree/main/resources"
    click BP "https://github.com/salehtz/my-website/blob/main/.github/workflows/hugo.yaml"
    click PO "https://github.com/salehtz/my-website/tree/main/public"

    classDef source fill:#ffccff,stroke:#993399,stroke-width:2px;
    classDef build fill:#ffffcc,stroke:#999900,stroke-width:2px;
    classDef process fill:#ccffff,stroke:#009999,stroke-width:2px;
    classDef output fill:#ccffcc,stroke:#339933,stroke-width:2px;
```
