module Lanyon
Lanyon
serves your Jekyll site as a Rack application.
See Lanyon.application
for available initialization options.
Further information on the Lanyon
library is available in the README file or on the project home page: <github.com/stomar/lanyon/>.
Constants
- DATE
- VERSION
Public Class Methods
application(options = {})
click to toggle source
Builds the Jekyll site, prepares the middleware stack, and returns the Rack application.
Options:
:config
-
use given config file (default: “_config.yml”)
:skip_build
-
whether to skip site generation at startup (default:
false
)
Other options are passed on to Jekyll::Site.
Returns a Rack application.
# File lib/lanyon.rb, line 38 def self.application(options = {}) skip_build = options.fetch(:skip_build, default_options[:skip_build]) config = jekyll_config(options) if skip_build puts skip_build_warning else process(config) end destination = config["destination"] router = Router.new(destination) Rack::Builder.new do use Rack::Head use Rack::ContentLength use Rack::ConditionalGet use Rack::ETag, nil, nil run Application.new(router) end end
build(options = {})
click to toggle source
Builds the Jekyll site.
Accepts the same options as ::application
, except for the :skip_build
option which is ignored.
# File lib/lanyon.rb, line 66 def self.build(options = {}) config = jekyll_config(options) process(config) end