Module: Roda::RodaPlugins::SSG
- Defined in:
- lib/roda/plugins/ssg.rb
Overview
This is a simplifed and modified variant of Roda's Public core plugin. It adds additional functionality so that you can host an entire static site through Roda. What's necessary for this to work is handling "pretty" URLs, aka:
/path/to/page -> /path/to/page.html or /path/to/page/index.html /path/to/page/ -> /path/to/page/index.html
It does not support serving compressed files, as that should ideally be handled through a proxy or CDN layer in your architecture.
Defined Under Namespace
Modules: RequestMethods
Constant Summary collapse
- PARSER =
URI::DEFAULT_PARSER
Class Method Summary collapse
Class Method Details
.configure(app, opts = {}) ⇒ Object
20 21 22 23 |
# File 'lib/roda/plugins/ssg.rb', line 20 def self.configure(app, opts = {}) app.opts[:ssg_root] = app.(opts.fetch(:root, "public")) app.opts[:ssg_server] = Rack::Files.new(app.opts[:ssg_root]) end |