Unit 07 · lesson
Plugin Categories and Build Hooks
Plugins make more sense when you understand where they enter the build.
Generators
Generators can create additional content/pages from data during the build.
Question:
Do I need to create output that Jekyll's normal pages/collections/templates do not represent cleanly?
Converters
Converters transform one markup/content format into another representation.
Jekyll already uses converter behavior for Markdown and Sass/SCSS.
A custom converter adds another transformation family.
Liquid tags and filters
Plugins can add template syntax:
custom tag
custom filter
That makes templates dependent on that plugin.
Remove the plugin and the source may no longer render.
Hooks
Hooks let plugin code run at particular lifecycle events/stages.
This can be useful for automation, but it also means behavior can occur outside the page source you are reading.
Commands
Plugins can extend the Jekyll CLI with additional subcommands.
Again, source + tool environment now have another dependency.
Map the build extension
Create a diagram:
SOURCE
↓
JEKYLL BUILD
├─ generators
├─ converters
├─ template tags/filters
├─ lifecycle hooks
└─ commands/tooling
↓
OUTPUT
Do not treat this as exact execution order for every plugin. It is a responsibility map.
Checkpoint
For one candidate plugin, identify which extension category it primarily uses and what evidence would show it ran.