npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

acetate-kss

v0.0.2

Published

Parse KSS formatted sass documentation and add it to Acetate

Downloads

9

Readme

Acetate-KSS

Acetate-KSS parses a folder of sass files with KSS-formatted documentation and makes that data available as data in Acetate.

It also includes a simple Nunjucks Template for displaying KSS documentation in your Acetate site.

Installation

To install, simply add acetate-kss to the package.json of an existing press site:

npm install --save-dev acetate-kss

Use

Using Acetate-KSS is as simple as adding a couple lines to acetate.conf.js. An example conf file could look something like:

// Load press kss to add data to your site
var acetateKSS = require('acetate-kss');
// Load the styleguide to get the Nunjucks template
var styleguide = require('acetate-kss/styleguide');

function config(acetate) {
  acetate.global('config', {
    environment: 'dev',
  });

  acetate.layout('**/*', 'layouts/_layout:content');

  acetate.options.src = 'docs/source';
  acetate.options.dest = 'docs/build';

  // Tell Acetate to use the KSS extension
  acetate.use(acetateKSS({
    // point the extension to your sass folder
    sassDir: 'sass/',
    markdown: true
  }));

  // Tell Acetate to load the Nunjucks helper
  acetate.use(styleguide({
    // use a custom template for styleguide block (optional)
    template: 'partials/_styleguide_block.html'
  }));
}

module.exports = config;

Then, in whatever page you need the kss data, just add it to the frontmatter:

data:
  - kss

And in your page, render a block of documentation by calling the Nunjucks helper:

{% styleguide kss.section('1.1') %}
  <h1 class="$modifier_class">Hey man</h1>
{% endstyleguide %}