Kiln - a documentation engine written in Swift

Hi all,

I've just released the 1.0 of Kiln a new documentation engine built in Swift. It's built on top of many community packages, including Vapor's LeafKit, [Swift Markdown]( GitHub - swiftlang/swift-markdown: A Swift package for parsing, building, editing, and analyzing Markdown documents. · GitHub ) and Yams, with NIO and Argument Parser handling the command line.

Why Something New?

DocC is great at tutorials and documenting code inline. It however isn't great for docs that don't fit in to one specific repo, like many of Vapor's docs that would cover RoutingKit, Vapor, Fluent etc. Additionally we require first class support for localisation as an international open source project, and our docs are already localised into 10 languages. We also need to be able to support different versions easily (for exciting upcoming reasons!) and DocC can't handle this.

Previously we've used Mkdocs for many years, but it's fallen out of maintenance in recent years and the community has split to a 2.0 fork. However that doesn't support localisation and we've always had issues in the past with trying to style it how we want.

Enter Kiln

So I decided to spend the weekend building a new engine. Kiln supports localisation (both localising static strings and localising documentation pages) out of the box. It supports multiple versions easily so you can switch between them, with support for the current version, previous versions and pre-releases. It's all configured in Swift code, giving you compile-time safety for your project configuration. And best of all, it can easily be themed, so your docs actually look like your docs. Finally, there's a CLI to help you create new sites, build the docs and view them.

Examples

The site for Kiln is of course built in Kiln itself - https://kiln.brokenhands.io

Vapor's Docs are now built using Kiln - https://docs.vapor.codes

You can see the customisation we have to completely change how the site looks like, and now it matches our blog and main site!

Get involved

If you're interested, give it a go! It's fully open source, so I'm open to issues and features requests and interested to see how it can be used!

18 Likes