# nginx/nginx.org architecture

> Architecture diagram of the GitHub repository nginx/nginx.org, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nginx/nginx.org
- Repository: https://github.com/nginx/nginx.org

## Overview

nginx.org is a multilingual content site and static-site generator. Editors author XML pages and XSLScript templates; generation converts templates to XSLT, then transforms XML with XSLT into static HTML. The repository also contains CSS, DTD schemas, and an API-spec-to-XML converter. The graph reflects capabilities documented in the README and the sampled converter; its excerpts do not establish how that converter is wired into the site build, so no such connection is asserted.

Main entry points: [`xml`](https://github.com/nginx/nginx.org/tree/main/xml) (XML pages), [`tools/xslscript.pl`](https://github.com/nginx/nginx.org/blob/main/tools/xslscript.pl) (XSLScript compiler), [`xslt`](https://github.com/nginx/nginx.org/tree/main/xslt) (XSLT stylesheets), [`xsls`](https://github.com/nginx/nginx.org/tree/main/xsls) (XSLScript templates)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_content["Site content"]
  node_xmlcontent["XML pages"]
  node_englishdocs["English documentation"]
  node_httpdocs["HTTP documentation"]
  node_maildocs["Mail documentation"]
  node_streamdocs["Stream documentation"]
  node_njsdocs["njs documentation"]
  node_translations["Translations"]
  node_schemas["XML schemas"]
end

subgraph group_generation["Site generation"]
  node_xsls["XSLScript templates"]
  node_xslscript["XSLScript compiler<br/>[xslscript.pl]"]
  node_xslt["XSLT stylesheets"]
  node_transform["XSLT transformation"]
  node_html["Static HTML site"]
end

subgraph group_presentation["Presentation and API"]
  node_styles["Site styles"]
  node_apiyaml["API specification<br/>[nginx_api.yaml]"]
  node_apiconverter["API XML renderer<br/>[yaml2xml.py]"]
end

node_editor(("Content editor"))
node_visitor(("Site visitor"))

node_editor -->|"authors"| node_xmlcontent
node_xsls -->|"compiled by"| node_xslscript
node_xslscript -->|"generates"| node_xslt
node_xmlcontent -->|"transformed with"| node_transform
node_xslt -->|"applied by"| node_transform
node_transform -->|"generates"| node_html
node_visitor -->|"views"| node_html

click node_xmlcontent "https://github.com/nginx/nginx.org/tree/main/xml"
click node_englishdocs "https://github.com/nginx/nginx.org/tree/main/xml/en/docs"
click node_httpdocs "https://github.com/nginx/nginx.org/tree/main/xml/en/docs/http"
click node_maildocs "https://github.com/nginx/nginx.org/tree/main/xml/en/docs/mail"
click node_streamdocs "https://github.com/nginx/nginx.org/tree/main/xml/en/docs/stream"
click node_njsdocs "https://github.com/nginx/nginx.org/tree/main/xml/en/docs/njs"
click node_translations "https://github.com/nginx/nginx.org/tree/main/xml/ru"
click node_schemas "https://github.com/nginx/nginx.org/tree/main/dtd"
click node_xsls "https://github.com/nginx/nginx.org/tree/main/xsls"
click node_xslscript "https://github.com/nginx/nginx.org/blob/main/tools/xslscript.pl"
click node_xslt "https://github.com/nginx/nginx.org/tree/main/xslt"
click node_styles "https://github.com/nginx/nginx.org/tree/main/css"
click node_apiyaml "https://github.com/nginx/nginx.org/blob/main/yaml/nginx_api.yaml"
click node_apiconverter "https://github.com/nginx/nginx.org/blob/main/yaml/yaml2xml.py"

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_xmlcontent,node_englishdocs,node_httpdocs,node_maildocs,node_streamdocs,node_njsdocs,node_translations,node_schemas toneBlue
class node_xsls,node_xslscript,node_xslt,node_transform,node_html toneAmber
class node_styles,node_apiyaml,node_apiconverter toneMint
class node_editor,node_visitor toneIndigo
```

## Components

### Site content

- [XML pages](https://github.com/nginx/nginx.org/tree/main/xml): `xml`
- [English documentation](https://github.com/nginx/nginx.org/tree/main/xml/en/docs): `xml/en/docs`
- [HTTP documentation](https://github.com/nginx/nginx.org/tree/main/xml/en/docs/http): `xml/en/docs/http`
- [Mail documentation](https://github.com/nginx/nginx.org/tree/main/xml/en/docs/mail): `xml/en/docs/mail`
- [Stream documentation](https://github.com/nginx/nginx.org/tree/main/xml/en/docs/stream): `xml/en/docs/stream`
- [njs documentation](https://github.com/nginx/nginx.org/tree/main/xml/en/docs/njs): `xml/en/docs/njs`
- [Translations](https://github.com/nginx/nginx.org/tree/main/xml/ru): `xml/ru`
- [XML schemas](https://github.com/nginx/nginx.org/tree/main/dtd): `dtd`

### Site generation

- [XSLScript templates](https://github.com/nginx/nginx.org/tree/main/xsls): `xsls`
- [XSLScript compiler](https://github.com/nginx/nginx.org/blob/main/tools/xslscript.pl): `tools/xslscript.pl`
- [XSLT stylesheets](https://github.com/nginx/nginx.org/tree/main/xslt): `xslt`
- **XSLT transformation**
- **Static HTML site**

### Presentation and API

- [Site styles](https://github.com/nginx/nginx.org/tree/main/css): `css`
- [API specification](https://github.com/nginx/nginx.org/blob/main/yaml/nginx_api.yaml): `yaml/nginx_api.yaml`
- [API XML renderer](https://github.com/nginx/nginx.org/blob/main/yaml/yaml2xml.py): `yaml/yaml2xml.py`

### Other components

- **Content editor**
- **Site visitor**

## Connections

- Content editor → XML pages: authors (evidence: `README.md`)
- XSLScript templates → XSLScript compiler: compiled by (evidence: `README.md`)
- XSLScript compiler → XSLT stylesheets: generates (evidence: `README.md`)
- XML pages → XSLT transformation: transformed with (evidence: `README.md`)
- XSLT stylesheets → XSLT transformation: applied by (evidence: `README.md`)
- XSLT transformation → Static HTML site: generates (evidence: `README.md`)
- Site visitor → Static HTML site: views (evidence: `README.md`)
