# bhardwajabhi/myblogs architecture

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

- Interactive diagram: https://gitdiagram.com/bhardwajabhi/myblogs
- Repository: https://github.com/bhardwajabhi/myblogs

## Overview

##### Main Components

a. Content Layer:
- Markdown Content Storage (docs/posts directory)
- Assets Storage (docs/assets directory)
- Configuration (mkdocs.yml)

b. Template Layer:
- Theme Overrides (overrides directory)
- Partial Templates (overrides/partials)
- Custom Layouts (404.html, blog.html, main.html)

c. Build/Generation Layer:
- MkDocs Static Site Generator
- Output/Distribution Layer

d. Client-Side Components:
- JavaScript Functionality (extra.js, mathjax.js, view-bigimg.js)
- Styling (extra.css, view-bigimg.css)

##### Specific Elements

a. Content Management:
- Blog Posts Structure (mobile-security section)
- Tags System
- Assets Management

b. Template Components:
- Header Partial
- Navigation Partial
- Post Content Partial
- Tag Cloud
- Comments System (Disqus)

c. Client-Side Features:
- MathJax Integration
- Image Viewing Enhancement
- Custom JavaScript Functionality

**┌─ Content Layer ─────┐    ┌─ Template Layer ──┐    ┌─ Build Process ─┐**
- Markdown Posts    │ -> │ - Main Template   │ -> │ MkDocs          │
- Assets           │    │ - Partials        │    │ Generation      │
- Configuration    │    │ - Overrides       │    └────────────────┘
- ┘    └─────────────────┘           │
- ▼
- ┌─ Output Layer ──┐
- Static Website  │
- ┘

##### Important Notes

- Modular nature of the template system
- How the tag system creates relationships between posts
- Where custom JavaScript and CSS integrate
- Responsive/mobile considerations
- Commenting system integration point

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Content
        MD[Markdown Content]
        AS[Assets]
        CF[Configuration]
    end

    subgraph Templates
        TO[Theme Overrides]
        CL[Custom Layouts]
        PC[Partials Components]
    end

    subgraph ClientSide
        JS[JavaScript Files]
        CSS[CSS Files]
    end

    subgraph BuildProcess
        MK[MkDocs Generator]
        OUT[Static Website Output]
    end

    %% Content Layer Details
    MD --> |Content Flow| TO
    AS --> |Asset Processing| TO
    CF --> |Config| MK

    %% Template Processing
    TO --> |Template Processing| MK
    CL --> |Layout Processing| MK
    PC --> |Component Integration| MK

    %% Client-Side Integration
    JS --> |Enhancement| OUT
    CSS --> |Styling| OUT

    %% Build Process
    MK --> OUT

    %% Component Details
    MD --- MDC[Posts & Pages]
    AS --- ASC[Images & Resources]
    TO --- TOC[Layout Overrides]
    PC --- PCC[Site Components]
    JS --- JSC[Functionality]
    CSS --- CSSC[Styling]

    %% Click Events
    click MD "https://github.com/bhardwajAbhi/MyBlogs/tree/main/docs/posts/"
    click AS "https://github.com/bhardwajAbhi/MyBlogs/tree/main/docs/assets/"
    click CF "https://github.com/bhardwajAbhi/MyBlogs/blob/main/mkdocs.yml"
    click TO "https://github.com/bhardwajAbhi/MyBlogs/tree/main/overrides/"
    click CL "https://github.com/bhardwajAbhi/MyBlogs/blob/main/overrides/main.html"
    click PC "https://github.com/bhardwajAbhi/MyBlogs/tree/main/overrides/partials/"
    click JS "https://github.com/bhardwajAbhi/MyBlogs/blob/main/docs/assets/extra.js"
    click CSS "https://github.com/bhardwajAbhi/MyBlogs/blob/main/docs/assets/extra.css"

    %% Styling
    classDef content fill:#e1f5fe,stroke:#01579b
    classDef template fill:#e8f5e9,stroke:#1b5e20
    classDef clientside fill:#fff3e0,stroke:#e65100
    classDef build fill:#f3e5f5,stroke:#4a148c

    class MD,MDC,AS,ASC,CF content
    class TO,TOC,CL,PC,PCC template
    class JS,JSC,CSS,CSSC clientside
    class MK,OUT build

    %% Legend
    subgraph Legend
        L1[Content Components]:::content
        L2[Template Components]:::template
        L3[Client-Side Components]:::clientside
        L4[Build Components]:::build
    end
```
