# hash-dogs/hexo-blog architecture

> Architecture diagram of the GitHub repository hash-dogs/hexo-blog, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/hash-dogs/hexo-blog
- Repository: https://github.com/hash-dogs/hexo-blog

## Overview

This repository is a Hexo-powered blog site with the AnZhiYu theme, browser-side site features, and a separate IndexNow submission utility. The visible visitor workflow is interacting with rendered pages—searching, reading, and using theme features—with optional remote services supplying search, summaries, comments, and holiday data. The excerpts show browser behavior and the IndexNow utility, but not the content tree, templates, or most Hexo event wiring, so those links are intentionally limited.

Main entry points: [`package.json`](https://github.com/hash-dogs/hexo-blog/blob/main/package.json) (Hexo site generator), [`source/js/countdown.js`](https://github.com/hash-dogs/hexo-blog/blob/main/source/js/countdown.js) (Time countdown), [`tools/indexnow.js`](https://github.com/hash-dogs/hexo-blog/blob/main/tools/indexnow.js) (IndexNow submitter), [`themes/anzhiyu/source/js/main.js`](https://github.com/hash-dogs/hexo-blog/blob/main/themes/anzhiyu/source/js/main.js) (Page interactions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_site["Site rendering"]
  node_hexo["Hexo site generator<br/>[package.json]"]
  node_themehooks["Theme hooks"]
  node_themehelpers["Theme helpers"]
  node_tagrenderers["Content tag renderers"]
end

subgraph group_browser["Browser experience"]
  node_browsermain["Page interactions<br/>[main.js]"]
  node_utilities["Browser utilities<br/>[utils.js]"]
  node_localsearch["Local search<br/>[local-search.js]"]
  node_algoliasearch["Algolia search<br/>[algolia.js]"]
  node_abstract["AI abstracts<br/>[ai_abstract.js]"]
  node_barrage["Comment barrage<br/>[comment_barrage.js]"]
  node_contextmenu["Context menu"]
  node_translation["Chinese translation<br/>[tw_cn.js]"]
  node_countdown["Time countdown<br/>[countdown.js]"]
  node_serviceworker["Service worker rules<br/>[sw-rules.js]"]
end

subgraph group_integrations["External integrations"]
  node_searchdata["Local search data"]
  node_algolia["Algolia service"]
  node_summaryapi["Summary API"]
  node_commentservice["Twikoo comments"]
  node_holidayapi["Holiday API"]
  node_searchengines["IndexNow engines"]
  node_localstorage[("Browser cache")]
end

subgraph group_indexing["Search indexing"]
  node_sitemap["Generated sitemap"]
  node_indexnowtool["IndexNow submitter<br/>[indexnow.js]"]
end

node_visitor(("Visitor"))

node_visitor -->|"uses pages"| node_browsermain
node_hexo -->|"loads theme hooks"| node_themehooks
node_hexo -->|"uses helpers"| node_themehelpers
node_hexo -->|"renders tags"| node_tagrenderers
node_visitor -->|"searches locally"| node_localsearch
node_localsearch -->|"fetches index"| node_searchdata
node_visitor -->|"searches remotely"| node_algoliasearch
node_algoliasearch -.->|"queries"| node_algolia
node_abstract -.->|"requests summary"| node_summaryapi
node_barrage -.->|"fetches comments"| node_commentservice
node_countdown -.->|"fetches holidays"| node_holidayapi
node_countdown -->|"caches holidays"| node_localstorage
node_translation -->|"reads preference"| node_localstorage
node_browsermain -->|"uses utilities"| node_utilities
node_serviceworker -->|"caches requests"| node_visitor
node_indexnowtool -->|"reads URLs"| node_sitemap
node_indexnowtool -.->|"submits URLs"| node_searchengines

click node_hexo "https://github.com/hash-dogs/hexo-blog/blob/main/package.json"
click node_themehooks "https://github.com/hash-dogs/hexo-blog/tree/main/themes/anzhiyu/scripts/events"
click node_themehelpers "https://github.com/hash-dogs/hexo-blog/tree/main/themes/anzhiyu/scripts/helpers"
click node_tagrenderers "https://github.com/hash-dogs/hexo-blog/tree/main/themes/anzhiyu/scripts/tag"
click node_browsermain "https://github.com/hash-dogs/hexo-blog/blob/main/themes/anzhiyu/source/js/main.js"
click node_utilities "https://github.com/hash-dogs/hexo-blog/blob/main/themes/anzhiyu/source/js/utils.js"
click node_localsearch "https://github.com/hash-dogs/hexo-blog/blob/main/themes/anzhiyu/source/js/search/local-search.js"
click node_algoliasearch "https://github.com/hash-dogs/hexo-blog/blob/main/themes/anzhiyu/source/js/search/algolia.js"
click node_abstract "https://github.com/hash-dogs/hexo-blog/blob/main/themes/anzhiyu/source/js/anzhiyu/ai_abstract.js"
click node_barrage "https://github.com/hash-dogs/hexo-blog/blob/main/themes/anzhiyu/source/js/anzhiyu/comment_barrage.js"
click node_contextmenu "https://github.com/hash-dogs/hexo-blog/blob/main/themes/anzhiyu/source/js/anzhiyu/right_click_menu.js"
click node_translation "https://github.com/hash-dogs/hexo-blog/blob/main/themes/anzhiyu/source/js/tw_cn.js"
click node_countdown "https://github.com/hash-dogs/hexo-blog/blob/main/source/js/countdown.js"
click node_serviceworker "https://github.com/hash-dogs/hexo-blog/blob/main/themes/anzhiyu/sw-rules.js"
click node_indexnowtool "https://github.com/hash-dogs/hexo-blog/blob/main/tools/indexnow.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_hexo,node_themehooks,node_themehelpers,node_tagrenderers toneBlue
class node_browsermain,node_utilities,node_localsearch,node_algoliasearch,node_abstract,node_barrage,node_contextmenu,node_translation,node_countdown,node_serviceworker toneAmber
class node_searchdata,node_algolia,node_summaryapi,node_commentservice,node_holidayapi,node_searchengines,node_localstorage toneMint
class node_sitemap,node_indexnowtool toneRose
class node_visitor toneIndigo
```

## Components

### Site rendering

- [Hexo site generator](https://github.com/hash-dogs/hexo-blog/blob/main/package.json): `package.json`
- [Theme hooks](https://github.com/hash-dogs/hexo-blog/tree/main/themes/anzhiyu/scripts/events): `themes/anzhiyu/scripts/events`
- [Theme helpers](https://github.com/hash-dogs/hexo-blog/tree/main/themes/anzhiyu/scripts/helpers): `themes/anzhiyu/scripts/helpers`
- [Content tag renderers](https://github.com/hash-dogs/hexo-blog/tree/main/themes/anzhiyu/scripts/tag): `themes/anzhiyu/scripts/tag`

### Browser experience

- [Page interactions](https://github.com/hash-dogs/hexo-blog/blob/main/themes/anzhiyu/source/js/main.js): `themes/anzhiyu/source/js/main.js`
- [Browser utilities](https://github.com/hash-dogs/hexo-blog/blob/main/themes/anzhiyu/source/js/utils.js): `themes/anzhiyu/source/js/utils.js`
- [Local search](https://github.com/hash-dogs/hexo-blog/blob/main/themes/anzhiyu/source/js/search/local-search.js): `themes/anzhiyu/source/js/search/local-search.js`
- [Algolia search](https://github.com/hash-dogs/hexo-blog/blob/main/themes/anzhiyu/source/js/search/algolia.js): `themes/anzhiyu/source/js/search/algolia.js`
- [AI abstracts](https://github.com/hash-dogs/hexo-blog/blob/main/themes/anzhiyu/source/js/anzhiyu/ai_abstract.js): `themes/anzhiyu/source/js/anzhiyu/ai_abstract.js`
- [Comment barrage](https://github.com/hash-dogs/hexo-blog/blob/main/themes/anzhiyu/source/js/anzhiyu/comment_barrage.js): `themes/anzhiyu/source/js/anzhiyu/comment_barrage.js`
- [Context menu](https://github.com/hash-dogs/hexo-blog/blob/main/themes/anzhiyu/source/js/anzhiyu/right_click_menu.js): `themes/anzhiyu/source/js/anzhiyu/right_click_menu.js`
- [Chinese translation](https://github.com/hash-dogs/hexo-blog/blob/main/themes/anzhiyu/source/js/tw_cn.js): `themes/anzhiyu/source/js/tw_cn.js`
- [Time countdown](https://github.com/hash-dogs/hexo-blog/blob/main/source/js/countdown.js): `source/js/countdown.js`
- [Service worker rules](https://github.com/hash-dogs/hexo-blog/blob/main/themes/anzhiyu/sw-rules.js): `themes/anzhiyu/sw-rules.js`

### External integrations

- **Local search data**
- **Algolia service**
- **Summary API**
- **Twikoo comments**
- **Holiday API**
- **IndexNow engines**
- **Browser cache**

### Search indexing

- **Generated sitemap**
- [IndexNow submitter](https://github.com/hash-dogs/hexo-blog/blob/main/tools/indexnow.js): `tools/indexnow.js`

### Other components

- **Visitor**

## Connections

- Visitor → Page interactions: uses pages
- Hexo site generator → Theme hooks: loads theme hooks
- Hexo site generator → Theme helpers: uses helpers
- Hexo site generator → Content tag renderers: renders tags
- Visitor → Local search: searches locally
- Local search → Local search data: fetches index
- Visitor → Algolia search: searches remotely
- Algolia search → Algolia service: queries
- AI abstracts → Summary API: requests summary
- Comment barrage → Twikoo comments: fetches comments
- Time countdown → Holiday API: fetches holidays
- Time countdown → Browser cache: caches holidays
- Chinese translation → Browser cache: reads preference
- Page interactions → Browser utilities: uses utilities
- Service worker rules → Visitor: caches requests
- IndexNow submitter → Generated sitemap: reads URLs
- IndexNow submitter → IndexNow engines: submits URLs
