No description
Find a file
Johann 80262af94f Remove config integration test target files
The test doesn't run right now. It wouldn't work anyway, since we have
no way of testing stuff from the main function at this time.

I've kept the fixtures since they're used in tests in main.rs
2015-12-30 16:20:36 +01:00
src Rename .config.yml to .cobalt.yml 2015-12-30 16:19:51 +01:00
tests Remove config integration test target files 2015-12-30 16:20:36 +01:00
.gitignore Add tests 2015-11-06 21:22:45 +01:00
.travis.yml Update .travis.yml 2015-11-07 09:48:51 +01:00
Cargo.toml Adding a config yaml file 2015-12-04 19:37:25 +00:00
CONTRIBUTING.md Create CONTRIBUTING.md 2015-11-07 09:37:25 +01:00
README.md add gitter badge [skip ci] 2015-12-07 17:03:02 +01:00

Cobalt

Gitter

A static site generator written in Rust.

Installation

  $ cargo install --git https://github.com/cobalt-org/cobalt.rs

Usage

  $ cobalt build -s path/to/your/source -d path/to/your/destination

See more options with

  $ cobalt -h

Layouts

You can have custom layouts in the _layouts directory.

Layouts will be compiled as liquid templates.

Posts

Posts live in _posts.

Example:

@extends: posts.tpl

title:   My first Blogpost
date:    24/08/2014 at 15:36
---
Hey there this is my first blogpost and this is super awesome.

My Blog is lorem ipsum like, yes it is..

The content before --- are meta attributes made accessible to the template via their key (see below).

The @extends attribute specifies which layout will be used.

Other files

Any file with the .tpl file extension will be parsed for metadata and compiled using liquid, like a post.

Unlike posts, files outside the _posts directory will not be indexed as blog posts and not passed to the index file in the list of contents.

All other files and directories in the source folder will be recursively added to your destination folder.

Attributes

All template files have access to a set of attributes.

In example above title is accessible via {{ title }} and date via {{ date }}, for the layout template as well as the post template.

Special Attributes

content

{{ content }} is accessible only to layouts and contains the compiled text below the --- block of the post.

posts

{{ posts }} is a list of the attributes of all templates in the _posts directory. Example: