Class: JekyllRedirectFrom::Layout
- Inherits:
-
Jekyll::Layout
- Object
- Jekyll::Layout
- JekyllRedirectFrom::Layout
- Defined in:
- lib/jekyll-redirect-from/layout.rb
Overview
A stubbed layout for our default redirect template We cannot use the standard Layout class because of site.in_source_dir
Instance Method Summary collapse
-
#initialize(site) ⇒ Layout
constructor
A new instance of Layout.
Constructor Details
#initialize(site) ⇒ Layout
Returns a new instance of Layout.
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/jekyll-redirect-from/layout.rb', line 7 def initialize(site) @site = site @base = __dir__ @name = "redirect.html" @path = File.(@name, @base) @relative_path = "_layouts/redirect.html" self.data = {} self.ext = "html" self.content = File.read(@path) end |