File: jekyll-redirect-from.rb

package info (click to toggle)
ruby-jekyll-redirect-from 0.16.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 284 kB
  • sloc: ruby: 659; sh: 17; makefile: 4
file content (20 lines) | stat: -rw-r--r-- 692 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# frozen_string_literal: true

require "jekyll"
require "jekyll-redirect-from/version"
require "jekyll-redirect-from/generator"

module JekyllRedirectFrom
  # Jekyll classes which should be redirectable
  CLASSES = [Jekyll::Page, Jekyll::Document].freeze

  autoload :Context,          "jekyll-redirect-from/context"
  autoload :RedirectPage,     "jekyll-redirect-from/redirect_page"
  autoload :Redirectable,     "jekyll-redirect-from/redirectable"
  autoload :Layout,           "jekyll-redirect-from/layout"
  autoload :PageWithoutAFile, "jekyll-redirect-from/page_without_a_file"
end

JekyllRedirectFrom::CLASSES.each do |klass|
  klass.send :include, JekyllRedirectFrom::Redirectable
end