Skip to main content

register_default_plugins

Function register_default_plugins 

Source
pub fn register_default_plugins(
    plugins: &mut PluginManager,
    config: &SsgConfig,
    include_drafts: bool,
    deploy_target: Option<&str>,
)
Expand description

Registers the default plugin pipeline.

Plugins execute in registration order. The ordering is:

  1. SEO plugins (meta tags, canonical URLs, robots.txt)
  2. Search index generation
  3. HTML minification — last in registration order, but note that after_compile hooks all run before any transform_html, so minification precedes the fused transform pass rather than following it (see the note at its registration below)
  4. Live reload (on_serve only)

§Examples

use ssg::cmd::SsgConfig;
use ssg::pipeline::register_default_plugins;
use ssg::plugin::PluginManager;

let cfg = SsgConfig::default();
let mut pm = PluginManager::new();
register_default_plugins(&mut pm, &cfg, false, None);
assert!(pm.len() > 0);