A fork of hyde, the static site generation. Some patches will be pushed upstream.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

20 lines
431 B

  1. from hyde.plugin import Plugin
  2. class BannerPlugin(Plugin):
  3. """
  4. Adds a comment banner to all generated html files
  5. """
  6. def text_resource_complete(self, resource, text):
  7. banner = """
  8. <!--
  9. This file was produced with infinite love, care & sweat.
  10. Please dont copy. If you have to, please drop me a note.
  11. -->
  12. """
  13. if resource.source.kind == "html":
  14. text = banner + text
  15. return text