Easily generate a (themed) CSS Styleguide—or 'Pattern Library'—with Jekyll. Included GulpJS workflow with Sass compilation, autoprefixer, auto-building and browsersync.
To add a new Component, simply create a new markdown (.md or .html) file with the HTML for your component in the posts/components folder and run jekyll build (or use the included GulpJS script).
Then add your project's CSS file to Jekyll Styleguide (or @import is in its app.scss) and see how these components render.
posts/components.@import your Sass files in static/scss/app.scss...your.css to _includes/head.htmlstatic/scss/themes/Jekyll requires Ruby, Rubygems and a Linux, Unix or Mac OSX system. If you do not yet have those installed—and are on Mac OSX—I strongly advise you to install those as follows:
\curl -sSL https://get.rvm.io | bash -s stableNow you should have all the requirements for installing Jekyll. The GulpJS workflow requires NodeJS, NPM and a bunch of Gulp plugins. But let's ignore those and start simple, OK?
gem update --system && gem install jekyllgit clone [email protected]:davidhund/jekyll-styleguide.gitcolors/index.mdposts/components/jekyll build --config=_config.dev.yml4. and repeat...Take a look at the _config.dev.yml (_config.yml) to set some global variables such as the baseurl, name and version of your Style Guide, a link to the repository etc.
I've added an experimental GulpJS workflow—GruntJS should be very similar—to automate re-generating the Styleguide, while compiling your Sass files, Concatenating your JS, etc.
To install and use Gulp (you should be at the root of the project, in a command prompt):
npm install -g gulp to install Gulp globallynpm install to install all needed Gulp pluginsgulp: this fires up a local webserver and watches your Sass, JS and components.jekyll child processes crap out and keep running (multiple) in the background. This could cause issues. One way to kill all of those child processes, and start over, is to stop the Gulp task (CTRL+C) and do: ps aux | awk '/jekyll/ {print $2}' | xargs killCheck out the defined Colors or Components