Kakyll

Kakyll is a static site generator.

License

License

GroupId

GroupId

com.kennycason
ArtifactId

ArtifactId

kakyll
Last Version

Last Version

1.7
Release Date

Release Date

Type

Type

jar
Description

Description

Kakyll
Kakyll is a static site generator.
Project URL

Project URL

https://github.com/kennycason/kakyll
Source Code Management

Source Code Management

https://github.com/kennycason/kakyll

Download kakyll

How to add to project

<!-- https://jarcasting.com/artifacts/com.kennycason/kakyll/ -->
<dependency>
    <groupId>com.kennycason</groupId>
    <artifactId>kakyll</artifactId>
    <version>1.7</version>
</dependency>
// https://jarcasting.com/artifacts/com.kennycason/kakyll/
implementation 'com.kennycason:kakyll:1.7'
// https://jarcasting.com/artifacts/com.kennycason/kakyll/
implementation ("com.kennycason:kakyll:1.7")
'com.kennycason:kakyll:jar:1.7'
<dependency org="com.kennycason" name="kakyll" rev="1.7">
  <artifact name="kakyll" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.kennycason', module='kakyll', version='1.7')
)
libraryDependencies += "com.kennycason" % "kakyll" % "1.7"
[com.kennycason/kakyll "1.7"]

Dependencies

test (1)

Group / Artifact Type Version
org.jetbrains.kotlin : kotlin-test-junit jar 1.3.11

Project Modules

There are no modules declared in this project.

Kakyll

Kakyll is a static site generator similar to Hakyll (Haskell) or Jekyll (Ruby) except in Kotlin.

The primary webiste for Kakyll is http://kakyll.com. Kakyll's homesite is also built with Kakyll.

Install

brew install https://raw.githubusercontent.com/kennycason/kakyll/master/script/brew/kakyll.rb

Getting Started

First we tell Kakyll to create a new site.

kakyll new my_site

Next, navigate into the newly created site.

cd my_site

This will have pre-generate a sample blog and a pre-configured default blog structure. The blog structure and configuration are explained below.

kakyll build
kakyll serve (also performs build)
kakyll deploy

Blog Structure

.
├── templates
|   └── default.hbs
|   ├── footer.hbs
|   └── header.hbs
|   └── post.hbs
├── posts
|   ├── 2017-05-17-birth-of-kakyll.md
|   └── 2017-05-18-kotlin-is-awesome.md
├──-assets
|   ├── css
|   |   └── style.css
|   ├── js
|   |   └── scripts.js
|   ├── images
|   |   └── my_logo.png
├── index.hbs
├── about.hbs
├── tags.hbs
└── config.yml

Upon building your site, all contents will be copied to _site

Create A New Post

Via the new post command you can programmatically create a new post. The new post will be generated where ever the post directory is configured. (default: posts/)

Examples:

kakyll new post "name of post.markdown"
kakyll new post name of post.md
kakyll new post hello-world.md

The files are generated in the configured posts directory, file names are normalized, and the current date is automatically prepended.

Notes:

  • Spaces are coerced to dashes (-).
  • Quotes are optional.
  • .md/.markdown extension is required.
  • The current date is automatically prepended to the post file name.

Configuration

TODO explanation/table

Sample default config.yml file

title: My Blog Title
email: [email protected]
description: My Blog is about random stuff like lorem ipsum and programming. I hope you enjoy.
base_url: http://localhost:8080 # The base url to your blog. e.g. http://hakyll.com
template_engine: handlebars
deploy: rsync -avz ....         # command to execut to deploy contents in _site/*
encoding: UTF-8                 # encoding of files, defaults to UTF-8
date_format: yyyy-dd-MM         # format for date to use in post pages
posts:                          # configuration for your blog's posts
    directory: posts            # directory where your posts are located
    template: post.hbs          # optional template for posts
pages:
    - index.html
    - about.html
    - tags.html
tags:
    template: index.html
directories:
    - name: assets

Template Engine

Currently the only supported template engine is Handlebars

Markdown Engine

Kakyll used FlexMark as it's primary markdown renderer. Other options are still being considered. This will also become configurable.

Styling Your Blog

By default the blog is themed using Bootstrap based of some examples from this blog post. The author, Vijaya Anand, put together an immense and detailed post explaining how to use Bootstrap to create a nice and clean blog template.

The current default template for a post.

Versions

Version
1.7
1.6
1.5
1.4
1.3
1.2
1.1
1.0