Skip to content

Instantly share code, notes, and snippets.

@tkfm-yamaguchi
Created July 18, 2013 13:50
Show Gist options
  • Save tkfm-yamaguchi/6029451 to your computer and use it in GitHub Desktop.
Save tkfm-yamaguchi/6029451 to your computer and use it in GitHub Desktop.

hyde.plugin.Plugin's events

  • begin_generator

    • Called when generation is about to take place.
  • begin_site

    • Called when the site is loaded completely. This implies that all the nodes and resources have been identified and are accessible in the site variable.
  • begin_node(node)

    • Called when a node is about to be processed for generation. This method is called only when the entire node is generated. ルートをふくめ全てのノード毎について1回ずつ呼ばれる
  • begin_text_resource(resource, text)

    • Called when a text resource is about to be processed for generation. The text parameter contains the resource text at this point in its lifecycle. It is the text that has been loaded and any plugins that are higher in the order may have tampered with it. But the text has not been processed by the template yet. Note that the source file associated with the text resource may not be modifed by any plugins. If this function returns a value, it is used as the text for further processing.
  • begin_binary_resource(resource)

    • Called when a binary resource is about to be processed for generation. Plugins are free to modify the contents of the file.
  • text_resource_complete(resource, text)

    • Called when a resource has been processed by the template. The text parameter contains the resource text at this point in its lifecycle. It is the text that has been processed by the template and any plugins that are higher in the order may have tampered with it. Note that the source file associated with the text resource may not be modifed by any plugins. If this function returns a value, it is used as the text for further processing.
  • binary_resource_complete(resource)

    • Called when a binary resource has already been processed. Plugins are free to modify the contents of the file.
  • node_complete(node)

    • Called when all the resources in the node have been processed. This method is called only when the entire node is generated.
  • site_complete

    • Called when the entire site has been processed. This method is called only when the entire site is generated.
  • generation_complete

    • Called when generation is completed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment