Plugins

Hyde is built with a nuclear engine that is stripped down but powerful. Even core features like metadata are added as plugins to keep the engine bloat free.

Hyde’s plugin architecture is event driven; plugins get notified during the course of the generation to allow them to alter/guide the generation process.

If you are interested in creating plugins for Hyde, you can read the developer documentation.

Configuration

Hyde’s plugins get loaded if they are listed in the plugins section of Configuration. Plugins also accept additional parameters in their respective sections. For example, MyAwesomePlugin will get parameters from myawesome section in the configuration file.

In the box

Hyde is shipped with the following plugins:

Metadata

Metadata

class hyde.ext.plugins.meta.MetaPlugin(site)[source]

Metadata plugin for hyde. Loads meta data in the following order:

  1. meta.yaml: files in any folder

  2. frontmatter: any text file with content enclosed within three dashes or three equals signs.

    Example:

    ---
    abc: def
    ---
    

Supports YAML syntax.

AutoExtend

class hyde.ext.plugins.meta.AutoExtendPlugin(site)[source]

The plugin class for extending templates using metadata.

Sorter

class hyde.ext.plugins.meta.SorterPlugin(site)[source]

Sorter plugin for hyde. Adds the ability to do sophisticated sorting by expanding the site objects to support prebuilt sorting methods. These methods can be used in the templates directly.

Configuration example:

#yaml

sorter:
    kind:
        # Sorts by this attribute name
        # Uses `attrgetter` on the resource object
        attr: source_file.kind

        # The filters to be used before sorting
        # This can be used to remove all the items
        # that do not apply. For example,
        # filtering non html content
        filters:
            source_file.kind: html
            is_processable: True
            meta.is_listable: True

CSS

Less CSS

class hyde.ext.plugins.css.LessCSSPlugin(site)[source]

The plugin class for less css

Text Replacement

Blockdown

class hyde.ext.plugins.text.BlockdownPlugin(site)[source]

The plugin class for block text replacement.

Mark

class hyde.ext.plugins.text.MarkingsPlugin(site)[source]

The plugin class for mark text replacement.

Refer

class hyde.ext.plugins.text.ReferencePlugin(site)[source]

The plugin class for reference text replacement.

Syntext

class hyde.ext.plugins.text.SyntextPlugin(site)[source]

The plugin class for syntax text replacement.

Structure

Folder Flattener

class hyde.ext.plugins.structure.FlattenerPlugin(site)[source]

The plugin class for flattening nested folders.