aglio-theme-lego
Forked aglio theme olio -> attributable -> maplet -> lego.
Last updated 3 years ago by mbifolco .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install aglio-theme-lego 
SYNC missed versions from official npm registry.

Aglio Lego Theme

Dependency Status Build Status Coverage Status NPM version License

This is Lego, a new theme for Aglio. It takes an API Blueprint AST and renders it into static HTML. Example use:

$ sudo npm install -g ordergroove/aglio-theme-lego
$ aglio -i blueprint.apib -o MyAPI.html

Theme engines for Aglio are described in more detail in the Aglio documentation.

Design Philosophy

Olio (and thus lego) is designed from the ground up to be both fast and extensible while maintaining backward compatibility with most of the original Aglio theme. It uses the following technologies:

For backward compatibility, Jade templates can continue to use inline Stylus and CoffeeScript.

Theme Options

Olio (and lego) comes with a handful of configurable theme options. These are set via the --theme-XXX parameter, where XXX is one of the following:

Name Description
condense-nav Whether to condense nagivation for resources with only a single action (default is true).
full-width Whether to use the full page width or a responsive layout (default is responsive).
style LESS or CSS to control the layout and style of the document using the variables from below. Can be a path to your own file or one of the following presets: default. May be an array of paths and/or presets.
template Jade template to render HTML. Can be a path to your own file or one of the following presets: default.
variables LESS variables that control theme colors, fonts, and spacing. Can be a path to your own file or one of the following presets: default, flatly, slate, cyborg. May be an array of paths and/or presets.

Note: When using this theme programmatically, these options are cased like you would expect in Javascript: --theme-full-width becomes options.themeFullWidth.

Benchmark

Olio (and lego) makes use of aggressive caching whenever it can, which means that rendering HTML can be blazing fast. Benchmark taken on a 2015 Macbook Pro via BENCHMARK=1 aglio -i example.apib -o example.html:

Step Cached No cache
Parse API Blueprint 44ms 44ms
Get CSS 1ms 49ms
Get template 2ms 102ms
Call template 28ms 32ms
Total time 75ms 227ms

License

Copyright © 2015 Daniel G. Taylor

http://dgt.mit-license.org/

Current Tags

  • 1.2.1                                ...           latest (3 years ago)

5 Versions

  • 1.2.1                                ...           3 years ago
  • 1.2.0                                ...           3 years ago
  • 1.1.1                                ...           3 years ago
  • 1.1.0                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (1)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |