# lumeland/theme-simple-blog architecture

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

- Interactive diagram: https://gitdiagram.com/lumeland/theme-simple-blog
- Repository: https://github.com/lumeland/theme-simple-blog

## Overview

##### Project type and purpose
- This is a static site “theme” for Lume, a Deno‑based site generator.
- Purpose: Provide templates, styles, scripts, and configuration for a simple blog supporting tags, authors, feeds, sitemap, SEO, and instant search.

##### File structure
- Top‑level entry points:
- _config.ts – site configuration and plugin import
- mod.ts – theme module export
- plugins.ts – definitions of blog‑specific plugins (feeds, tags, search)
- deno.json, .github/workflows/build_demo.yml – build/test automation
- src/ folder: contains all the theme’s source assets:
- _includes/ – shared CSS, layouts (.vto), templates for pages and posts
- _data/ – site‑wide metadata (i18n, title, description)
- pages/, posts/ – Markdown content to be transformed
- js/, styles.css – client assets (instant search logic, styling)
- archive.page.js, archive_result.page.js, index.vto – page generation scripts and root template
- Build scripts and CI config tie the Deno CLI to the Lume init/build commands.

##### Key architecture insights from the README
- Built as a “theme” module–importable or clonable–plugging into Lume’s plugin pipeline.
- Uses Deno’s remote imports for easy versioning.
- Posts and pages are loaded, rendered through VTO templates, then emitted as static HTML + assets.
- Additional features (feeds, sitemap, search) are realized as build‑time plugins.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Source Files
    subgraph "Source Files"
        CFG["_config.ts"]:::code
        THEME["mod.ts"]:::code
        PLUGINS["plugins.ts"]:::code
        DENOCFG["deno.json"]:::code
        CI[".github/workflows/build_demo.yml"]:::code
        DATAYAML["src/_data.yml"]:::data
        DATAI18N["src/_data/i18n.yml"]:::data
        LAYOUT_BASE["base.vto"]:::code
        LAYOUT_PAGE["page.vto"]:::code
        LAYOUT_POST["post.vto"]:::code
        LAYOUT_ARCHIVE["archive.vto"]:::code
        LAYOUT_ARCHIVE_RES["archive_result.vto"]:::code
        TEMPLATE_VTO["src/_includes/templates/*.vto"]:::code
        CSS_COMMENTS["comments.css"]:::code
        CSS_NAVBAR["navbar.css"]:::code
        CSS_PAGE["page.css"]:::code
        CSS_POSTLIST["post-list.css"]:::code
        CSS_POST["post.css"]:::code
        STYLES["src/styles.css"]:::code
        JSMAIN["src/js/main.js"]:::code
        ARCHIVE_SCRIPT["src/archive.page.js"]:::code
        ARCHIVE_RES_SCRIPT["src/archive_result.page.js"]:::code
        INDEX_VTO["src/index.vto"]:::code
        CONTACT_MD["src/pages/contact.md"]:::data
        NOTFOUND_MD["src/404.md"]:::data
        PAGES_MD["src/pages/*.md"]:::data
        POSTSDATA["src/posts/_data.yml"]:::data
        FIRSTPOST_MD["src/posts/firstpost.md"]:::data
        INSTR_MD["src/posts/instructions.md"]:::data
        CMS["_cms.ts"]:::code
    end

    %% Build Pipeline
    subgraph "Build Pipeline"
        CLI["Developer / CLI"]:::external
        CORE["Lume Core"]:::stage
        LOADCFG{"Load _config.ts"}:::stage
        REGTHEME{"Import Theme Module"}:::stage
        REGPLUG{"Invoke plugins.ts"}:::stage
        LOADCONT{"Read content & data"}:::stage
        TEMPLATE{"Template Engine (VTO)"}:::stage
        ASSETS{"Process CSS & JS"}:::stage
        PLUGINHOOK{"Run Plugin Hooks"}:::stage
        EMIT{"Emit static site files"}:::stage
    end

    %% Output Artifacts
    subgraph "Output Artifacts"
        HTML[".html files"]:::out
        FEEDS["feeds.xml/json"]:::out
        SITEMAP["sitemap.xml"]:::out
        SEARCHIDX["search_index.json"]:::out
        ASSET_OUT["static assets (CSS/JS)"]:::out
    end

    %% Connections
    CLI -->|trigger build| CORE
    CORE -->|load config| LOADCFG
    LOADCFG --> CFG
    LOADCFG --> DATAYAML
    LOADCFG --> DATAI18N

    CORE -->|import theme| REGTHEME
    REGTHEME --> THEME
    REGTHEME --> CMS
    REGTHEME --> PLUGINS

    CORE -->|register plugins| REGPLUG
    REGPLUG --> PLUGINS

    CORE -->|ingest content| LOADCONT
    LOADCONT --> PAGES_MD
    LOADCONT --> CONTACT_MD
    LOADCONT --> NOTFOUND_MD
    LOADCONT --> POSTSDATA
    LOADCONT --> FIRSTPOST_MD
    LOADCONT --> INSTR_MD
    LOADCONT --> DATAYAML
    LOADCONT --> DATAI18N

    CORE -->|render templates| TEMPLATE
    TEMPLATE --> LAYOUT_BASE
    TEMPLATE --> LAYOUT_PAGE
    TEMPLATE --> LAYOUT_POST
    TEMPLATE --> LAYOUT_ARCHIVE
    TEMPLATE --> LAYOUT_ARCHIVE_RES
    TEMPLATE --> TEMPLATE_VTO

    CORE -->|process assets| ASSETS
    ASSETS --> CSS_COMMENTS
    ASSETS --> CSS_NAVBAR
    ASSETS --> CSS_PAGE
    ASSETS --> CSS_POSTLIST
    ASSETS --> CSS_POST
    ASSETS --> STYLES
    ASSETS --> JSMAIN
    ASSETS --> ARCHIVE_SCRIPT
    ASSETS --> ARCHIVE_RES_SCRIPT
    ASSETS --> INDEX_VTO

    CORE -->|execute plugin hooks| PLUGINHOOK
    PLUGINHOOK --> FEEDS
    PLUGINHOOK --> SITEMAP
    PLUGINHOOK --> SEARCHIDX

    CORE -->|write output| EMIT
    EMIT --> HTML
    EMIT --> ASSET_OUT
    EMIT --> FEEDS
    EMIT --> SITEMAP
    EMIT --> SEARCHIDX

    %% Click Events
    click THEME "https://github.com/lumeland/theme-simple-blog/blob/main/mod.ts"
    click CFG "https://github.com/lumeland/theme-simple-blog/blob/main/_config.ts"
    click PLUGINS "https://github.com/lumeland/theme-simple-blog/blob/main/plugins.ts"
    click DENOCFG "https://github.com/lumeland/theme-simple-blog/blob/main/deno.json"
    click CI "https://github.com/lumeland/theme-simple-blog/blob/main/.github/workflows/build_demo.yml"
    click DATAYAML "https://github.com/lumeland/theme-simple-blog/blob/main/src/_data.yml"
    click DATAI18N "https://github.com/lumeland/theme-simple-blog/blob/main/src/_data/i18n.yml"
    click LAYOUT_BASE "https://github.com/lumeland/theme-simple-blog/blob/main/src/_includes/layouts/base.vto"
    click LAYOUT_PAGE "https://github.com/lumeland/theme-simple-blog/blob/main/src/_includes/layouts/page.vto"
    click LAYOUT_POST "https://github.com/lumeland/theme-simple-blog/blob/main/src/_includes/layouts/post.vto"
    click LAYOUT_ARCHIVE "https://github.com/lumeland/theme-simple-blog/blob/main/src/_includes/layouts/archive.vto"
    click LAYOUT_ARCHIVE_RES "https://github.com/lumeland/theme-simple-blog/blob/main/src/_includes/layouts/archive_result.vto"
    click TEMPLATE_VTO "https://github.com/lumeland/theme-simple-blog/tree/main/src/_includes/templates/"
    click CSS_COMMENTS "https://github.com/lumeland/theme-simple-blog/blob/main/src/_includes/css/comments.css"
    click CSS_NAVBAR "https://github.com/lumeland/theme-simple-blog/blob/main/src/_includes/css/navbar.css"
    click CSS_PAGE "https://github.com/lumeland/theme-simple-blog/blob/main/src/_includes/css/page.css"
    click CSS_POSTLIST "https://github.com/lumeland/theme-simple-blog/blob/main/src/_includes/css/post-list.css"
    click CSS_POST "https://github.com/lumeland/theme-simple-blog/blob/main/src/_includes/css/post.css"
    click STYLES "https://github.com/lumeland/theme-simple-blog/blob/main/src/styles.css"
    click JSMAIN "https://github.com/lumeland/theme-simple-blog/blob/main/src/js/main.js"
    click ARCHIVE_SCRIPT "https://github.com/lumeland/theme-simple-blog/blob/main/src/archive.page.js"
    click ARCHIVE_RES_SCRIPT "https://github.com/lumeland/theme-simple-blog/blob/main/src/archive_result.page.js"
    click INDEX_VTO "https://github.com/lumeland/theme-simple-blog/blob/main/src/index.vto"
    click CONTACT_MD "https://github.com/lumeland/theme-simple-blog/blob/main/src/pages/contact.md"
    click NOTFOUND_MD "https://github.com/lumeland/theme-simple-blog/blob/main/src/404.md"
    click POSTSDATA "https://github.com/lumeland/theme-simple-blog/blob/main/src/posts/_data.yml"
    click FIRSTPOST_MD "https://github.com/lumeland/theme-simple-blog/blob/main/src/posts/firstpost.md"
    click INSTR_MD "https://github.com/lumeland/theme-simple-blog/blob/main/src/posts/instructions.md"
    click CMS "https://github.com/lumeland/theme-simple-blog/blob/main/_cms.ts"

    %% Styles
    classDef code fill:#ddeeff,stroke:#222,stroke-width:1px;
    classDef data fill:#ddffdd,stroke:#222,stroke-width:1px;
    classDef out fill:#ffdddd,stroke:#222,stroke-width:1px;
    classDef stage fill:#f0ddff,stroke:#222,stroke-width:1px;
    classDef external fill:#eeeeee,stroke:#222,stroke-width:1px;
```
