Skip to content

Latest commit

 

History

History
66 lines (57 loc) · 1.63 KB

tips.md

File metadata and controls

66 lines (57 loc) · 1.63 KB
title
Tips 'n' Tricks

Flags

There are two flags to be aware of when writing a plugin:

Flag Description

safe

A boolean flag that informs Jekyll whether this plugin may be safely executed in an environment where arbitrary code execution is not allowed. This is used by GitHub Pages to determine which core plugins may be used, and which are unsafe to run. If your plugin does not allow for arbitrary code execution, set this to true. GitHub Pages still won’t load your plugin, but if you submit it for inclusion in core, it’s best for this to be correct!

priority

This flag determines what order the plugin is loaded in. Valid values are: :lowest, :low, :normal, :high, and :highest. Highest priority matches are applied first, lowest priority are applied last.

To use one of the example plugins above as an illustration, here is how you’d specify these two flags:

{% highlight ruby %} module Jekyll class UpcaseConverter < Converter safe true priority :low ... end end {% endhighlight %}