Array
(
    [page] => Array
        (
            [title] => Kowari is a Nano CMS
            [description] => A simple, fast, and lightweight CMS for lazy web developer.
            [keywords] => CMS, nano-CMS, static websites, small websites
            [robots] => noindex, nofollow
        )

    [navs] => Array
        (
            [main] => Array
                (
                    [type] => flat
                    [items] => Array
                        (
                            [0] => Array
                                (
                                    [label] => Home
                                    [slug] => 
                                )

                            [1] => Array
                                (
                                    [label] => Documentation
                                    [slug] => documentation
                                )

                            [2] => Array
                                (
                                    [label] => Examples
                                    [slug] => examples
                                )

                        )

                )

        )

    [media] => Array
        (
            [boston] => Array
                (
                    [0] => Array
                        (
                            [srcset] => media/boston--mob.webp 2x
                            [width] => 960
                            [height] => 960
                            [type] => image/webp
                            [media] => (max-width: 480px)
                        )

                    [1] => Array
                        (
                            [srcset] => media/boston--tab.webp 2x
                            [width] => 1600
                            [height] => 1200
                            [type] => image/webp
                            [media] => (max-width: 960px)
                        )

                    [2] => Array
                        (
                            [srcset] => media/boston--dsk.webp 2x
                            [width] => 1920
                            [height] => 1280
                            [type] => image/webp
                            [media] => (max-width: 1280px)
                        )

                    [img] => Array
                        (
                            [src] => boston.jpg
                        )

                )

            [boston-dsk] => Array
                (
                    [img] => Array
                        (
                            [src] => boston-dsk.webp
                        )

                )

        )

)

Quick and Easy

  • Compose your HTML and CSS
  • Write your content using Markdown
  • Upload via FTP and enjoy

One Page Example

  • Customize the HTML of index.php
  • Add your CSS and Javascript to @assets/ folder
  • Edit the contents of the main.md file
  • Optionally edit the meta.json file

Micro Website Example

  • Open @template/index.php and customize general layout and functions
  • Duplicate the @template/ folder for each page and rename it with a friendly slug
  • Customize each page as explained above in One Page Example

Quick Reference

Root Folder Structure

@kowari/ contains the little magic, do not remove or rename
@template/ contains the basic page template you can easily custom and duplicate
@assets/ contains the common files your website frontend relies on
index.php is the home page template
main.md is the home page main content written in Markdown
meta.json is the home page meta information file (optional but recommended)

Template File Structure

Every page is rendered by its unique index.php file where HTML and content are composed, for example:

<?php 
    // Required Block
    define('ROOT', $_SERVER['DOCUMENT_ROOT']);
    require_once ROOT . '/@kowari/bootstrap.php';
?>

<?php get_part('header') ?>

<section class="content">
    <?php get_content() ?>
</section>

<?php get_part('footer') ?>

The template file is made up of some calls to get_part('part') to retrieve individual common pieces of code and one ore more calls to get_content() to retrieve and parse the markdown content.

The only required instructions are in the first PHP block where the ROOT is defined and the website is bootstrapped.

You are free to define how many and which parts to use, how to name them and how to arrange them on the page, but if you are looking for inspiration you can see our examples.

Page Folder Structure

index.php – the page template
main.md – the main content

(optional files)
meta.json – the page information file
intro.md – the intro (or any other name) content
intro.css – the intro specific CSS file

Picture 1 Element Test

Hello World

Picture 2 Element Test

Hello World