AI Skill Hub 强烈推荐:静态网站生成器 是一款优质的Agent工作流。AI 综合评分 8.0 分,在同类工具中表现稳健。如果你正在寻找可靠的Agent工作流解决方案,这是一个值得深入了解的选择。
安全高效的静态网站生成工具,支持无障碍访问
静态网站生成器 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
安全高效的静态网站生成工具,支持无障碍访问
静态网站生成器 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
# 方式一:cargo install(推荐) cargo install static-site-generator # 方式二:从源码编译 git clone https://github.com/sebastienrousseau/static-site-generator cd static-site-generator cargo build --release # 二进制在 ./target/release/static-site-generator
# 查看帮助 static-site-generator --help # 基本运行 static-site-generator [options] <input> # 详细使用说明请查阅文档 # https://github.com/sebastienrousseau/static-site-generator
# static-site-generator 配置说明 # 查看配置选项 static-site-generator --config-example > config.yml # 常见配置项 # output_dir: ./output # log_level: info # workers: 4 # 环境变量(覆盖配置文件) export STATIC_SITE_GENERATOR_CONFIG="/path/to/config.yml"
<p align="center"> <img src="https://cloudcdn.pro/static-site-generator/images/logos/static-site-generator.svg" alt="SSG logo" width="128" /> </p>
<p align="center"> <strong>AI-augmented, accessibility-first static site generator built in Rust.</strong> </p>
<p align="center"> <a href="https://github.com/sebastienrousseau/static-site-generator/actions"><img src="https://img.shields.io/github/actions/workflow/status/sebastienrousseau/static-site-generator/ci.yml?style=for-the-badge&logo=github" alt="Build" /></a> <a href="https://crates.io/crates/ssg"><img src="https://img.shields.io/crates/v/ssg.svg?style=for-the-badge&color=fc8d62&logo=rust" alt="Crates.io" /></a> <a href="https://docs.rs/ssg"><img src="https://img.shields.io/badge/docs.rs-ssg-66c2a5?style=for-the-badge&labelColor=555555&logo=docs.rs" alt="Docs.rs" /></a> <a href="https://codecov.io/gh/sebastienrousseau/static-site-generator"><img src="https://img.shields.io/codecov/c/github/sebastienrousseau/static-site-generator?style=for-the-badge&logo=codecov" alt="Coverage" /></a> <a href="https://lib.rs/crates/ssg"><img src="https://img.shields.io/badge/lib.rs-v0.0.59-orange.svg?style=for-the-badge" alt="lib.rs" /></a> <a href="#license"><img src="https://img.shields.io/badge/license-MIT%20OR%20Apache--2.0-blue.svg?style=for-the-badge" alt="License: MIT OR Apache-2.0" /></a> <a href="#minimum-supported-rust-version"><img src="https://img.shields.io/badge/MSRV-1.88.0-dea584.svg?style=for-the-badge&logo=rust" alt="MSRV 1.88.0" /></a> <a href="https://scorecard.dev/viewer/?uri=github.com/sebastienrousseau/static-site-generator"><img src="https://img.shields.io/ossf-scorecard/github.com/sebastienrousseau/static-site-generator?style=for-the-badge&label=openssf%20scorecard" alt="OpenSSF Scorecard" /></a> <a href="https://www.bestpractices.dev/projects/14540"><img src="https://img.shields.io/cii/level/14540?style=for-the-badge&label=OpenSSF%20Best%20Practices&logo=openssf" alt="OpenSSF Best Practices" /></a> </p>
---
SSG generates static websites from Markdown content, YAML frontmatter, and MiniJinja templates. It compiles everything into production-ready HTML with built-in SEO metadata, WCAG 2.2 AA accessibility compliance (including the new 2.5.8, 2.4.13, 3.2.6 criteria where automatable), multilingual readability scoring, and feed generation. The 32-plugin pipeline handles the rest.
accessibility-report.json + wcag-compliance.json) and gated in CI by axe-core. Build-failure on a11y violations is opt-in via the STRICT_A11Y env var (implemented in v0.0.40)#![forbid(unsafe_code)] across the entire codebase---
| **Performance** | Parallel file operations with Rayon, fused single-pass HTML transforms, content-addressed caching (FNV-1a), dependency graph for incremental rebuilds, bounded-memory batch compilation for 100K+ pages, --jobs N thread control, --max-memory MB budget |
| **AI Pipeline** | Agentic LLM pipeline (--ai-fix): audit content readability, diagnose failing files, generate fixes via local LLM (Ollama), verify improvement, produce JSON report. Dry-run mode (--ai-fix-dry-run). Auto-generate alt text, meta descriptions, and JSON-LD via LLM |
| **Readability** | Multilingual scoring: Flesch-Kincaid (EN), Kandel-Moles (FR), Wiener Sachtextformel (DE), Gulpease (IT), LIX (SV/NO/DA), Fernandez Huerta (ES). BCP 47 language detection from frontmatter. CI readability gate |
| **Content** | Markdown with GFM extensions (tables, strikethrough, task lists), YAML/TOML/JSON frontmatter, typed content schemas with compile-time validation, shortcodes (youtube, gist, figure, admonition), compile-time word count + estimated reading time injected into .meta.json sidecars |
| **SEO** | Meta description, Open Graph (title, description, type, url, image, locale), auto-generated OG social cards (SVG), Twitter Cards, canonical URLs, robots.txt, sitemaps with per-page lastmod, first-class topic-cluster taxonomy (hub + pillar indexes), related-post discovery via Jaccard tag/category overlap |
| **Structured Data** | JSON-LD Article/WebPage with datePublished, dateModified, author, image, inLanguage, BreadcrumbList |
| **Syndication** | RSS 2.0 with enclosures and categories, Atom 1.0, Google News sitemap |
| **Accessibility** | WCAG 2.2 AA validation on every build (1.1.1, 1.3.1, 2.3.1, 2.4.4, 2.4.13, 2.5.8, 3.1.1, 3.2.6), axe-core Playwright CI, decorative image detection, heading hierarchy, ARIA landmarks; emits wcag-compliance.json matrix ([WCAG 2.2 + EAA guide](docs/guide/wcag-compliance.md)) |
| **i18n** | Hreflang injection, x-default support, per-locale sitemaps, language switcher HTML. Translated slugs — pages pair across locales by a translation_key front-matter field rather than by identical path, so /about/ and /fr/a-propos/ are reciprocal alternates; pages without a key keep pairing by path. The default locale may serve from the site root (/about/ alongside /fr/a-propos/), matching Hugo, Astro and Next.js ([i18n guide](docs/guide/i18n.md)) |
| **Images** | Responsive <picture> with WebP sources, srcset at 320/640/1024/1440, lazy loading, CLS prevention, optional cdn_prefix for serving local image assets from a CDN host |
| **Templates** | MiniJinja engine with inheritance, loops, conditionals, custom filters |
| **Search** | Client-side full-text search with modal UI, 28 locale translations, Ctrl+K / Cmd+K |
| **Security** | CSP build-time extraction (zero unsafe-inline), SRI hash generation, asset fingerprinting, path traversal prevention, structured SsgError type-safe error hierarchy |
| **Minification** | Native HTML / JS / CSS minification (opt-in minify feature) via [minify-html](https://crates.io/crates/minify-html/0.15.0) 0.15 (HTML, <pre> preserved), [oxc_minifier](https://crates.io/crates/oxc_minifier/0.95.0) 0.95 (JS, mangle + DCE), and [lightningcss](https://crates.io/crates/lightningcss/1.0.0-alpha.71) 1.0.0-alpha.71 (CSS). Recursive walk processes every .html, .css, and .js file under site_dir regardless of depth. |
| **Supply Chain** | Automated CycloneDX 1.5 SBOM (sbom.cdx.json) generated on every build via SbomPlugin, listing compiler version, dependency tree, and license metadata |
| **DX** | CSS hot reload, browser error overlay via WebSocket, file watching with change classification |
| **WebAssembly** | ssg-core + ssg-wasm + ssg-search compile to wasm32-unknown-unknown with wasm-bindgen; ssg-wasm ships ISR + RPC entry points for Edge runtimes (CI-enforced ≤ 2 MB gzipped) |
| **Vector search** | ssg-search — browser-native int8-quantised hashed-n-gram (or opt-in model2vec-rs) embeddings, Float32Array boundary, no division / sqrt at runtime, p99 < 100 ms on 1000-doc corpus (CI-gated) |
| **Edge runtimes** | Cloudflare Workers + Vercel Edge adapters with KV / Edge Config content provider, SHA-256-keyed ISR manifest, invalidation webhook, optional View Transitions client (transitions = true) |
| **Edge RPC** | #[ssg_rpc] proc-macro, JSON-over-POST dispatch, schemars 1.2 + custom JSON-Schema → TypeScript emitter, golden .d.ts test |
| **Edge headers** | Per-host emitters for Cloudflare _headers, Netlify _headers, Vercel vercel.json with PQC posture guidance — emits current best-practice TLS/PQC configuration guidance for your CDN (X25519+ML-KEM-768 hybrid notes); ML-DSA content-provenance signing is roadmap (#579) |
| **Audit CLI** | ssg audit runs 15 gates (WCAG 2.2 AAA, JSON-LD, hreflang, lang consistency, CSP+SRI, PQC TLS, HTML5, broken links, OG, markdown lint, perf budget, AI discovery, RSS/Atom, image opt, search index integrity); JSON / JUnit / **SARIF v2.1.0** / text outputs (v0.0.45 #562, GitHub Code Scanning ingestible) |
| **Architecture Decision Records** | Six baseline ADRs under [docs/adr/](docs/adr/) in Nygard format documenting the tokio-free architecture, Rayon orchestration, lol_html selection, sync tungstenite HMR, ureq LLM transport, and CycloneDX-over-SPDX SBOM choice. CI-enforced adr: ADR-NNNN citation graph (v0.0.45 #557) |
| **Supply-chain attestation** | cargo-vet (v0.0.45 #561) layers per-crate audit attestation over cargo deny's license + CVE checks. Imports Mozilla Firefox, Bytecode Alliance, and Google trust sets; exemption-reduction policy in [supply-chain/README.md](supply-chain/README.md) |
| **Concurrency proofs** | Miri job ([.github/workflows/miri.yml](.github/workflows/miri.yml), v0.0.45 #560) runs cargo miri test --lib on a nightly schedule + run-miri-labelled PRs. Loom + Kani follow in v0.0.46 (#564 / #565) |
| **Feature-matrix CI** | cargo hack check --feature-powerset --depth 2 (v0.0.45 #584) exercises every reachable subset of {ai, benchmark, cli, image-optimization, minify, otel, templates, test-fault-injection} on every PR — catches cfg-gating gaps before they merge |
| **Agentic discovery** | Opt-in /agents.txt (robots-style AI agent allow/deny), /.well-known/ai-plugin.json (OpenAI plugin manifest), /.well-known/mcp.json (Model Context Protocol registry with auto-populated resources) |
| **ISO 20022 JSON-LD** | Schema.org descriptors for regulated financial sites: BankAccount, FinancialProduct, MonetaryAmount, PaymentInstrument, RegulatedFinancialInstitution. Built-in IBAN + BIC validators |
| **View Transitions** | Opt-in (transitions = true) View Transitions API client + lazy hydration; persistent <header> / <footer> get view-transition-name so they don't animate across boundaries; falls back to plain reload in non-supporting browsers |
| **Islands** | Web Components with lazy hydration (visible, idle, interaction) |
ssg -c content -o public -t templates --ai-fix ```
---
[dependencies]
ssg = "0.0.59"
git clone https://github.com/sebastienrousseau/static-site-generator.git
cd static-site-generator
make # check + clippy + test
Requires Rust 1.88.0+. Tested on Linux, macOS, and Windows.
make install # to /usr/local
make PREFIX=/usr install # to /usr
make DESTDIR=/tmp/stage install # staged, for packaging
make uninstall # exact inverse of install
Installs the binary, the ssg.1 man page and bash, zsh and fish completions to their FHS locations. The man page and completions are generated from the CLI definition at build time, so man ssg cannot drift from ssg --help; CI asserts that on every push. PowerShell completions are generated too, and installed when PWSHCOMPDIR is set.
---
cargo install ssg
ssg -c content -o public -t templates
| Pages | Time | Memory |
|---|---|---|
| 100 | < 5s (CI-gated) | < 100 MB |
| 1,000 | < 10s | < 200 MB |
| 10,000 | Bounded-memory batches | 512 MB budget |
| 100,000+ | Bounded-memory batches | Configurable via --max-memory |
Reproduce: cargo bench --bench bench -- scalability.
---
--incremental Skip recompile when DepGraph diff is empty (issue #524)
--isr Emit an SHA-256-keyed ISR manifest for Edge adapters (issue #549)
--no-llm-cache Bypass the deterministic LLM inference cache (issue #528)
```bash
<details> <summary><b>Minimal pipeline</b></summary>
,no_run
fn main() -> Result<(), ssg::error::SsgError> {
ssg::run()
}
</details>
<details> <summary><b>Custom plugin</b></summary>
,no_run
use ssg::plugin::{Plugin, PluginContext, PluginManager};
use ssg::error::SsgError;
use std::path::Path;
#[derive(Debug)]
struct LogPlugin;
impl Plugin for LogPlugin {
fn name(&self) -> &str { "logger" }
fn after_compile(&self, ctx: &PluginContext) -> Result<(), SsgError> {
println!("Site compiled to {:?}", ctx.site_dir);
Ok(())
}
}
fn main() -> Result<(), SsgError> {
let mut pm = PluginManager::new();
pm.register(LogPlugin);
pm.register(ssg::plugins::MinifyPlugin);
let ctx = PluginContext::new(
Path::new("content"),
Path::new("build"),
Path::new("public"),
Path::new("templates"),
);
pm.run_after_compile(&ctx)?;
Ok(())
}
</details>
<details> <summary><b>Content schema validation</b></summary>
Create content/content.schema.toml:
[[schemas]]
name = "post"
[[schemas.fields]]
name = "title"
type = "string"
required = true
[[schemas.fields]]
name = "date"
type = "date"
required = true
[[schemas.fields]]
name = "draft"
type = "bool"
default = "false"
Pages with schema = "post" in their frontmatter are validated at compile time. Run ssg --validate for schema-only checks.
</details>
<details> <summary><b>Readability audit</b></summary>
,no_run
use ssg::llm::{LlmPlugin, LlmConfig};
use std::path::Path;
let report = LlmPlugin::audit_all(Path::new("content"), 8.0).unwrap();
println!("{}/{} files pass grade 8.0", report.passing, report.total_files);
// Multilingual: French content uses Kandel-Moles automatically
// when frontmatter contains `language: fr`
</details>
<details> <summary><b>OG image generation</b></summary>
,no_run
use ssg::og_image::generate_og_svg;
let svg = generate_og_svg("My Page Title", "My Site", "#1a1a2e", "#ffffff");
std::fs::write("og-card.svg", svg).unwrap();
// 1200x630 SVG social card ready for og:image
</details>
<details> <summary><b>Vector search index (issue #545)</b></summary>
,no_run
use ssg_search::artifacts::{Artifacts, InputDoc};
use ssg_search::VectorEngine;
// Build side: turn a doc corpus into the 4-file artifact blob.
let docs = vec![
InputDoc {
url: "/post-1".into(),
title: "Rust WebAssembly".into(),
body: "rust compiles to wasm".into(),
excerpt: "rust wasm".into(),
},
InputDoc {
url: "/post-2".into(),
title: "Sourdough".into(),
body: "starter flour water salt".into(),
excerpt: "bread".into(),
},
];
let arts = Artifacts::from_docs(&docs);
std::fs::write("site/search/embeddings.bin", &arts.embeddings).unwrap();
std::fs::write("site/search/model.bin", &arts.model).unwrap();
std::fs::write("site/search/tokenizer.bin", &arts.tokenizer).unwrap();
// Runtime (native or WASM): load and query.
let engine = VectorEngine::new(
&arts.model, &arts.tokenizer, &arts.embeddings, arts.count(),
).unwrap();
let top = engine.search("rust webassembly", 3);
println!("{:?}", top);
</details>
<details> <summary><b>Edge RPC method (issue #548)</b></summary>
,ignore
use ssg_rpc::ssg_rpc;
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
#[derive(Deserialize, JsonSchema)]
struct EchoIn { msg: String }
#[derive(Serialize, JsonSchema)]
struct EchoOut { msg: String }
#[ssg_rpc]
fn echo(input: EchoIn) -> Result<EchoOut, ssg_rpc::DispatchError> {
Ok(EchoOut { msg: input.msg })
}
// The build emits `site/rpc.d.ts` automatically; clients call:
// const r = await ssgRpc("echo", { msg: "hi" });
</details>
<details> <summary><b>Audit a built site (issue #551)</b></summary>
```bash ssg audit site/ --out junit > audit.xml
Run any example:
cargo run --example basic
cargo run --example blog
| Example | Purpose |
|---|---|
basic | Minimal site with SEO, search, and fused transforms |
quickstart | Scaffold and build in 10 lines |
multilingual | Multi-locale site with hreflang and per-locale sitemaps |
multilingual_full | Nested content/<lang>/ layout, plus translated slugs paired by translation_key (/en/about/ ↔ /fr/a-propos/ ↔ /de/ueber-uns/). Asserts reciprocity, not just that pages rendered |
plugins | Full plugin pipeline demo with DepGraph API |
blog | EAA-compliant accessibility-first blog with dual feeds |
docs | Documentation portal with schema validation and syntax highlighting |
landing | Zero-JS landing page with CSP hardening |
portfolio | Developer portfolio with JSON-LD and Atom feed |
The table below is a capability comparison, not a benchmark; for build times see Benchmarks.
| Capability | SSG | Hugo | Zola | Astro |
|---|---|---|---|---|
| Agentic AI pipeline | Yes | No | No | No |
| Multilingual readability | Yes | No | No | No |
| Auto-generated OG images | Yes | No | No | Plugin |
| Built-in WCAG validation | Yes | No | No | No |
| CSP/SRI auto-extraction | Yes | No | No | Plugin |
| axe-core CI gate | Yes | No | No | No |
| WebAssembly target | Yes | No | No | N/A |
| 98% CI coverage floors | Yes | No | No | No |
| Zero unsafe code | Yes | Yes | Yes | N/A |
---
高效安全的静态网站生成工具,值得推荐
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ Apache 2.0 — 宽松开源协议,可商用,需保留版权声明和 NOTICE 文件,含专利授权条款。
总体来看,静态网站生成器 是一款质量优秀的Agent工作流,在同类工具中具备一定竞争力。AI Skill Hub 将持续追踪其更新动态,建议收藏备用,结合自身场景选择合适时机引入使用。
| 原始名称 | static-site-generator |
| 原始描述 | 开源AI工作流:A secure-by-default static site generator built in Rust. WCAG 2.2 AA validation,。⭐51 · Rust |
| Topics | 静态网站Rust无障碍访问命令行工具 |
| GitHub | https://github.com/sebastienrousseau/static-site-generator |
| License | Apache-2.0 |
| 语言 | Rust |
收录时间:2026-06-07 · 更新时间:2026-06-08 · License:Apache-2.0 · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端