Grunt plugin to generate KSS style documentation
This plugin requires Grunt
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-sg --save-dev
The "sg" task
In your project's Gruntfile, add a section named
sg to the data object passed into
sg: default_options: options: css: 'sass dir' data: '.yml file dir' html: 'partial dir' dest: 'target dir' project_css: 'name of css file for project' syntax: 'theme name' logo: 'logo file' js: 'js file or array of js files'
- Project CSS
- optional js that runs in styleguide
- logo file for project
- Syntax Theme
- Syntax theme for code snippets in styleguide, see options here
- The data option specifies the location of YAML files to load in datasets into the style guide. Handlebars files are then required instead of HTML files in the HTML dir.