# Documentation of Lnico

Good to know you are here.

-----------------

Lnico is built on nodejs, which means you have to install nodejs. I believe you have installed nodejs, but I'd like to repeat this part.

You can download the package on [nodejs.org](http://nodejs.org) or through a package manager like apt-get and homebrew.


## Installation

Install lnico is simple with npm:

```
$ npm install lnico -g
```

Please install it with ``-g`` option, otherwise you can't use it in command line.

If you want a live reload feature, you have to install socket.io by yourself:

```
$ npm install socket.io -g
```


## Theme

Lnico didn't provide a default theme, and it will not provide a default theme in the foreseen future. But I wrote a theme for you, which is [one](https://github.com/lepture/lnico-one). You can learn how to write your own theme with one.

Let's grab the theme:

    $ git clone git://github.com/lepture/lnico-one.git _themes/one

<a class="button" href="./theme">Read More</a>


## Configure

Lnico can't work well without a configuration. Let's create a `lnico.json`:


```
{
    "source": "content",
    "output": "_site",
    "theme": "_themes/one",
    "permalink": "{{directory}}/{{filename}}.html",
    "writers": [
        "lnico.PostWriter",
        "lnico.FileWriter",
        "lnico.StaticWriter"
    ]
}
```

<a class="button" href="./config">Read More</a>


## Writing

It's the time for us to write something:

```
lnico.json
content/
  hello-world.md
_themes/
  one/
    templates/
    static/
    ...
```

And we will edit `content/hello-world.md`:

```
# Hello Lnico

- pubdate: 2012-12-12

------

Hello World, Hello Lnico.
```

Run the command in the terminal:

```
$ lnico build
```

It will create a folder `_site` in the current working directory, and there will be an article `hello-world.html`.

Learn more about `lnico` in terminal:

```
$ lnico -h
$ lnico build -h
$ lnico server -h
```

<a class="button" href="./syntax">Read More</a>


## Developer Guide

Actually the code of lnico is easy to understand.


## Bug Report

I keep an issue tracker at [GitHub](https://github.com/lepture/lnico/issues),
you can report bugs by [openning a new issue](https://github.com/lepture/lnico/issues/new).
If you want any help, please contact <me@lepture.com>, English and Chinese are acceptable.
