Create a site with an example pages, posts, and layouts:
# Create site in current directory $ cobalt init # Create site in `myBlog` sub-directory $ cobalt init myBlog
Serve your site at
$ cobalt serve # Include drafts $ cobalt serve --drafts
This provides live reload; it will re-generate your site as you add or change content.
Add a new page or post to your site:
# Creates page `cats-around-the-world.md` in the current dirsctory $ cobalt new "Cats Around the World" # Creates post `cats-around-the-world.md` in the `posts` directory $ cobalt new "Cats Around the World" --destination posts # Creates post `cats.md` in the `posts` directory $ cobalt new "Cats Around the World" --destination posts/cats.md
Once your post is ready, you can publish it:
$ cobalt publish posts/cats-around-the-world.md
The page will no longer be a "draft" and the
published_date will be set to today.
To see all the available commands, run
$ cobalt --help
You can then get help with those commands by running
$ cobalt <command> --help