Aglio
An API Blueprint renderer with theme support that outputs static HTML
Features
- 支持多种模板/主题
- 快速进行解析渲染
- 异步处理
- 支持自定义颜色、模板、和解析引擎
- 可以是使用include机制进行文件载入
- 支持命令行执行 `aglio -i service.apib -o api.html`
- 支持实时预览功能 `aglio -i service.apib --server`
- 高测试覆盖率
Including files
使用include机制进行文件的加载, 加载的文件包括API Blueprint文件、Markdwon文件、HTML文件或者JSON文件。
<!-- include(filename.md) -->
Installation
- You need to set up the node environment
- use the npm to install aglio
npm install -g aglio
Basic Usage
# Default theme
aglio -i input.apib -o output.html
# Use three-column layout
aglio -i input.apib --theme-template triple -o output.html
# Built-in color scheme
aglio --theme-variables slate -i input.apib -o output.html
# Customize a built-in style
aglio --theme-style default --theme-style ./my-style.less -i input.apib -o output.html
# Custom layout template
aglio --theme-template /path/to/template.jade -i input.apib -o output.html
# Custom theme engine
aglio -t my-engine -i input.apib -o output.html
# Run a live preview server on http://localhost:3000/
aglio -i input.apib -s
# Print output to terminal (useful for piping)
aglio -i input.apib -o -
# Disable condensing navigation links
aglio --no-theme-condense -i input.apib -o output.html
# Render full-width page instead of fixed max width
aglio --theme-full-width -i input.apib -o output.html
# Set an explicit file include path and read from stdin
aglio --include-path /path/to/includes -i - -o output.html
# Output verbose error information with stack traces
aglio -i input.apib -o output.html --verbose
Use it as Node.js library
npm install --save aglio