Lanyon serves your Jekyll site as a Rack application.
Assuming you already have a Jekyll project that can be built and
served using the
jekyll command line tool, then converting it
to a Rack application is very simple.
config.rufile in your project's root directory, with the following content:
require "lanyon" run Lanyon.application
You can specify additional Rack middleware in this file.
At the command prompt, build the site and start the web server with
You can find an example site in the
Note that Lanyon does not watch for site changes.
Auto-regeneration similar to Jekyll's
serve command is
not supported, and there are no plans to add this feature.
Lanyon applications can be served with WEBrick, Thin, Unicorn and many other web servers, and they can be deployed to services like e.g. Heroku.
You can install the Lanyon gem from RubyGems.org with
gem install lanyon
Jekyll configuration options can be specified in a
or as Lanyon initialization options in
run Lanyon.application(:destination => "mysite")
This will set a custom destination path, overriding the default (
and settings from a config file.
See Jekyll's documentation for more settings.
Additional Lanyon initialization options:
:config - use given config file (default: "_config.yml") :skip_build - whether to skip site generation at startup (default: false)
Note that on read-only filesystems a site build will fail,
so you must set
:skip_build => true in these cases.
Custum 404 Page
You can provide a custom
404.html file in your site's root directory.
This can also be a file generated by Jekyll from e.g. Markdown sources.
Ruby 2.0.0 or higher
Gem dependencies (runtime):
How URLs are resolved
Lanyon maps URLs to corresponding files as follows:
path/with a trailing slash is changed to
- then, Lanyon checks for an exactly corresponding file,
pathdoes not exist but
path/index.htmldoes, the response will be a redirect to
- when neither 2. nor 3. apply, +path.html+ is tried.
To avoid confusion, it's probably a good idea to have only one
as file in your site.
Report bugs on the Lanyon home page: https://github.com/stomar/lanyon/
Lanyon was inspired by rack-jekyll and written as a replacement.
Copyright © 2015-2018 Marcus Stollsteimer
Lanyon is licensed under the MIT License.
See also the included
LICENSE file for more information.