# afonsoneto/personal-website architecture

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

- Interactive diagram: https://gitdiagram.com/afonsoneto/personal-website
- Repository: https://github.com/afonsoneto/personal-website

## Overview

##### Main Components
- Jekyll Engine: At the core of the project is the Jekyll static site generator that reads the content, interprets the layouts/templates, and builds the final HTML.
- Content Files: These include markdown files such as index.md and online_cv.md, which contain the main content of the website.
- Layouts & Templates: The _layouts directory (with files like default.html, page.html, and post.html) and the _includes directory (with partials such as head.html, sidebar.html) form the structural and reusable components of the site pages.
- Internationalization (i18n): The _i18n directory holds language files (e.g., en.yml and pt-BR.yml), which allow for multi-language support.
- Assets: The assets folder contains styling (CSS/SCSS in assets/css/override.scss), images, and documentation (such as the resume files) which are used to style and populate the site.
- Continuous Integration (CI): The .circleci folder contains configuration for CI/CD pipelines (e.g., .circleci/config.yml), which are used to automate tests and deployment.
- Dependencies & Configuration: Files such as Gemfile, Gemfile.lock, and _config.yml reveal dependencies (Ruby Gems for Jekyll) and general site configuration.

##### Relationships and Interactions
- The Jekyll engine is central: it processes content files (markdown documents), combines them with layouts and includes, and leverages internationalization files to generate the final static HTML.
- Assets are referenced by the layouts and content files to render the styling, images, and documents.
- The CI/CD pipeline (from the .circleci config) automates the build process: whenever content or template changes are pushed to the repository, CircleCI triggers a build using the Gemfile dependencies and Jekyll commands.
- The project configuration (_config.yml) tells Jekyll about site-specific settings and parameters (such as baseURL, plugins, etc.).

##### Architectural Patterns and Technologies
- Static Site Generation: The architecture is centered on static site generation, meaning that all rendering happens at build time (there’s no dynamic backend).
- Separation of Concerns: The project is neatly segmented between content (markdown files), presentation (layouts and includes), styling/assets, and build/deployment pipelines.
- Internationalization: Built-in support for multiple languages via configuration (provided by the _i18n directory).
- CI/CD Automation: Integration with CircleCI ensures that deployments are automated and consistent.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Subgraph for Content Files
    subgraph "Content Files"
        content1["index.md"]:::content
        content2["online_cv.md"]:::content
    end

    %% Subgraph for Layouts
    subgraph "Layouts"
        layout1["default.html"]:::layout
        layout2["page.html"]:::layout
        layout3["post.html"]:::layout
    end

    %% Subgraph for Templates/Includes
    subgraph "Templates/Includes"
        inc1["head.html"]:::include
        inc2["sidebar.html"]:::include
    end

    %% Subgraph for Internationalization
    subgraph "Internationalization"
        i18n1["en.yml"]:::i18n
        i18n2["pt-BR.yml"]:::i18n
    end

    %% Subgraph for Assets
    subgraph "Assets"
        assets1["override.scss"]:::asset
        assets2["resume.docx"]:::asset
        assets3["resume.pdf"]:::asset
        assets4["images"]:::asset
    end

    %% Subgraph for Configuration & Dependencies
    subgraph "Configuration"
        config1["Config"]:::config
        config2["Gemfile"]:::config
        config3["Gemfile.lock"]:::config
    end

    %% Central Jekyll Engine Node
    jekyll["Jekyll Engine"]:::engine

    %% CI/CD Pipeline Node
    ci["CI/CD Pipeline"]:::ci

    %% Relationships - Feeding into Jekyll Engine
    content1 -->|"feeds"| jekyll
    content2 -->|"feeds"| jekyll

    layout1 -->|"template"| jekyll
    layout2 -->|"template"| jekyll
    layout3 -->|"template"| jekyll

    inc1 -->|"partial"| jekyll
    inc2 -->|"partial"| jekyll

    i18n1 -->|"i18n"| jekyll
    i18n2 -->|"i18n"| jekyll

    config1 -->|"config"| jekyll
    config2 -->|"dependency"| jekyll
    config3 -->|"dependency"| jekyll

    assets1 -->|"asset"| jekyll
    assets2 -->|"asset"| jekyll
    assets3 -->|"asset"| jekyll
    assets4 -->|"asset"| jekyll

    ci -->|"triggers"| jekyll

    %% Click Events
    click content1 "https://github.com/afonsoneto/personal-website/blob/master/index.md"
    click content2 "https://github.com/afonsoneto/personal-website/blob/master/online_cv.md"
    click layout1 "https://github.com/afonsoneto/personal-website/blob/master/_layouts/default.html"
    click layout2 "https://github.com/afonsoneto/personal-website/blob/master/_layouts/page.html"
    click layout3 "https://github.com/afonsoneto/personal-website/blob/master/_layouts/post.html"
    click inc1 "https://github.com/afonsoneto/personal-website/blob/master/_includes/head.html"
    click inc2 "https://github.com/afonsoneto/personal-website/blob/master/_includes/sidebar.html"
    click i18n1 "https://github.com/afonsoneto/personal-website/blob/master/_i18n/en.yml"
    click i18n2 "https://github.com/afonsoneto/personal-website/blob/master/_i18n/pt-BR.yml"
    click assets1 "https://github.com/afonsoneto/personal-website/blob/master/assets/css/override.scss"
    click assets2 "https://github.com/afonsoneto/personal-website/blob/master/assets/docs/resume.docx"
    click assets3 "https://github.com/afonsoneto/personal-website/blob/master/assets/docs/resume.pdf"
    click assets4 "https://github.com/afonsoneto/personal-website/tree/master/assets/images"
    click config1 "https://github.com/afonsoneto/personal-website/blob/master/_config.yml"
    click config2 "https://github.com/afonsoneto/personal-website/tree/master/Gemfile"
    click config3 "https://github.com/afonsoneto/personal-website/blob/master/Gemfile.lock"
    click ci "https://github.com/afonsoneto/personal-website/blob/master/.circleci/config.yml"

    %% Styles
    classDef content fill:#AEDFF7,stroke:#333,stroke-width:2px;
    classDef layout fill:#F9C0C0,stroke:#333,stroke-width:2px;
    classDef include fill:#FFDEAD,stroke:#333,stroke-width:2px;
    classDef i18n fill:#CFF0CA,stroke:#333,stroke-width:2px;
    classDef asset fill:#CFF,stroke:#333,stroke-width:2px;
    classDef config fill:#FFE4B5,stroke:#333,stroke-width:2px;
    classDef engine fill:#FFD700,stroke:#333,stroke-width:2px;
    classDef ci fill:#DDA0DD,stroke:#333,stroke-width:2px;
```
