| .. | ||
| documentation | ||
| partials | ||
| README.md | ||
| setup.sh | ||
Site-Info Documentation Templates
This directory contains the Tera templates used by the site-info system to generate documentation from code analysis.
Structure
site-info/
├── documentation/ # Main page templates
│ ├── base.tera # Base layout template
│ ├── summary.tera # Summary pages with metrics
│ ├── reference.tera # Detailed reference docs
│ ├── automation.tera # Automation guide
│ └── top_level.tera # Top-level overview
├── partials/ # Reusable components
│ ├── route_table.tera # Route information table
│ ├── component_card.tera # Component display card
│ ├── source_link.tera # Source reference links
│ ├── metrics_summary.tera # Statistics summary
│ └── nav_breadcrumbs.tera # Navigation breadcrumbs
├── i18n/ # Language-specific templates
│ ├── en/ # English templates
│ └── es/ # Spanish templates
└── README.md # This file
Configuration
Templates are configured in config/site-info.toml:
[templates]
engine = "tera"
templates_path = "site/templates/site-info"
default_language = "en"
supported_languages = ["en", "es"]
Internationalization
Labels and text are loaded from FTL files in:
site/content/i18n/site-info/en/templates.ftl(English)site/content/i18n/site-info/es/templates.ftl(Spanish)
Template Context
Templates receive a DocumentationContext with:
doc.routes- API route informationdoc.components- Component definitionsdoc.pages- Page route configurationsi18n.labels- Localized text labelssummary- Statistical informationmetadata- Generation metadatatheme- Display configuration
Custom Filters
Available Tera filters:
anchor- Generate kebab-case anchorssource_link- Format source reference linkspluralize- Handle singular/plural formsmethod_color- HTTP method color coding
Custom Functions
Available Tera functions:
toc(items)- Generate table of contentsformat_number(number)- Format numbers with commas
Environment Variables
SITE_TEMPLATES_PATH- Base templates directory (default: "site/templates")SITE_I18N_PATH- I18n content directory (default: "site/content")SITE_CONFIG_PATH- Configuration directory (default: "config")
Usage
Templates are automatically loaded by the site-info build system. To customize:
- Edit templates in this directory
- Update FTL files for text changes
- Modify
config/site-info.tomlfor settings - Rebuild the project to regenerate documentation