diff --git a/app/_plugins/generators/redirects.rb b/app/_plugins/generators/redirects.rb index c41a2a55c..0609e1113 100644 --- a/app/_plugins/generators/redirects.rb +++ b/app/_plugins/generators/redirects.rb @@ -6,6 +6,7 @@ class RefirectsGenerator < Jekyll::Generator def generate(site) redirects = api_specs_redirects(site) + redirects << plugin_examples_redirects(site) site.pages << build_page(redirects, site) end @@ -22,5 +23,11 @@ def api_specs_redirects(site) [page.data['base_url'], page.url].join("\t") end end + + def plugin_examples_redirects(site) + site.data.fetch('kong_plugins', {}).map do |_slug, plugin| + ["#{plugin.url}examples/", plugin.data.fetch('get_started_url')].join("\t") + end + end end end