Closed tsv2013 closed 7 years ago
The plugin currently only supports Pages and Documents. Can you explain a bit more about what you're using a custom content class for?
I've implemented custom generator for my Jekyll site. This generator produces ExamplePages. I'd like to set up redirect options for some of this pages, but I'm not able to make it work.
See https://github.com/jekyll/jekyll-redirect-from/blob/master/lib/jekyll-redirect-from/generator.rb#L15-L19. That's not something that this plugin is likely going to support natively, but you should be able to implement it with your custom generator, if you wish.
I've solved my task this way: added a "jekyll-redirect-from.rb" file in my "_plugins" folder and patch classes registration:
CLASSES = [Jekyll::Page, Jekyll::Document, Jekyll::ExamplePage].freeze
I've a class:
class ExamplePage < Page
. And I want to useredirect_from
frontmatter parameter in my customExamplePage
. How can I achieve this?