A style guide is a suite of documents both demonstrating and implementing standard look and feel. Here's a nice one: https://github.com/styleguide/css/2.0
Basic idea is that each UI component in an application is known ahead of time, and this is kind of a working inventory of available components, often organized by category.
These pages are often designed to show implement just enough of the style guide to adhere to the standard, while demonstrating in isolation how a particular widget works. This makes them an excellent place for developing new UI components/widgets, and for testing them.
I just made up that term, it's blather, and you should ignore it. Most websites, from page to page are mostly similar. So the idea is that it might be easier to create a set of scripts that weave together the right components from the right parts of the style guide to ensure that a page is well formed.
Here's a few specific examples:
- src for http://substack.net/
- src for browserify
So this implies that you can use something like brunch.io or jekyll or docpad or something to work on features and widgets, each on their own dedicated page, along with a couple of main views that include the right things in the right places.
Then, in a proxy server, the server can implement a mapping between views, and the data sources needed to transform bits of the page. For example, if the page has a microformat for a logged in person, under a .currentProfile, then the server can automatically fill in the DOM nodes for that bit of DOM by requesting data from the mapped data source, eg perhaps /api/whoami.
- https://github.com/substack/node-trumpet - all following based on this
- https://github.com/No9/harmon/ - reverse proxy trumpet
- https://github.com/substack/hyperspace
- https://github.com/substack/hyperstream
- https://github.com/substack/hypersglue
- https://github.com/No9/brassband
- https://github.com/fb55/node-cornet - potentially faster, better selectors
- https://github.com/MatthewMueller/cheerio - like jQuery, but for node
So to make a styleguide "smart" you need to assemble the final view for the end user by mapping some (proxied) data source via something like trumpet. This can be automated to some degree, assuming you have a nice set of mappings between css selectors and data providers, and by mapping them back into the page at the right place.