The core of this styleguide-system is powered by fractal, so please read through the documentation there, especially the core concepts. Kalong uses nunjucks-templates instead of the default handlebars-templates, to make patterns and snippets easier for consumption in PHP, using custom Twig-adapters.
About 90% of your work should take place in the folder ./src/patterns/. Create new patterns and components, group them in collections, add Sass and JavaScript, and later combine everything in your templates.
By default you should start with the following four folders, roughly implementing the idea of Atomic Design:
<head> and HTML-Structure.(Note: there is a folder _preview included as well: this provides the wrapping template used for each pattern-preview in this styleguide. Usually you can just leave this alone.)
Feel free to add more collections, if it makes sense. You could for example add a collection named ‘shop’, and group any ecommerce-related components in there, like checkout-buttons, shopping-cart, order-forms etc.
Have a look at the example-pattern from /src/patterns/components/example — this should give you a rough idea, on how to use this system. Also have a look at the default button-component in patterns/components/button for a simpler use-case.
When creating a new pattern, stick to the following naming/file-convention. Create a folder patternname, in one of the pattern-collections. Inside of that folder there can be the following:
(Note: Components and patterns are collated by default)
For more information, have a look at the Fractal Guide for components.