From 3bbcc351c37c09bb43bd42a619868b4a388798cd Mon Sep 17 00:00:00 2001 From: Lakshmi Vyasarajan Date: Mon, 19 Sep 2011 12:17:44 +0530 Subject: [PATCH] Added ssp test files --- hyde/tests/ssp/ext/__init__.py | 0 hyde/tests/ssp/ext/banner.py | 18 ++++++++++ hyde/tests/ssp/site.yaml | 60 ++++++++++++++++++++++++++++++++++ 3 files changed, 78 insertions(+) create mode 100644 hyde/tests/ssp/ext/__init__.py create mode 100644 hyde/tests/ssp/ext/banner.py create mode 100644 hyde/tests/ssp/site.yaml diff --git a/hyde/tests/ssp/ext/__init__.py b/hyde/tests/ssp/ext/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/hyde/tests/ssp/ext/banner.py b/hyde/tests/ssp/ext/banner.py new file mode 100644 index 0000000..25b5f3e --- /dev/null +++ b/hyde/tests/ssp/ext/banner.py @@ -0,0 +1,18 @@ +from hyde.plugin import Plugin + + +class BannerPlugin(Plugin): + """ + Adds a comment banner to all generated html files + """ + + def text_resource_complete(self, resource, text): + banner = """ + +""" + if resource.source.kind == "html": + text = banner + text + return text \ No newline at end of file diff --git a/hyde/tests/ssp/site.yaml b/hyde/tests/ssp/site.yaml new file mode 100644 index 0000000..0d40562 --- /dev/null +++ b/hyde/tests/ssp/site.yaml @@ -0,0 +1,60 @@ +mode: development +media_root: media # Relative path from content folder. +media_url: /media # URL where the media files are served from. +base_url: / # The base url for autogenerated links. +plugins: + - hyde.ext.plugins.meta.MetaPlugin + - hyde.ext.plugins.auto_extend.AutoExtendPlugin + - hyde.ext.plugins.sorter.SorterPlugin + - hyde.ext.plugins.tagger.TaggerPlugin + - hyde.ext.plugins.syntext.SyntextPlugin + - hyde.ext.plugins.textlinks.TextlinksPlugin + - ext.banner.BannerPlugin +context: + data: + tweet_via: ringce + menu: + - + name: Home + description: Home Page + css_class: home + type: page + url: index.html + - + name: Portfolio + description: Portfolio + css_class: portfolio + type: node + url: portfolio + - + name: Blog + description: Blog + css_class: blog + type: node + url: blog + - + name: About + description: About + css_class: about + type: page + url: about.html +meta: + nodemeta: meta.yaml + created: !!timestamp 2010-01-01 00:00:00 + author: Lakshmi Vyasarajan +sorter: + time: + attr: + - meta.created + reverse: true + filters: + source.kind: html + meta.listable: true +tagger: + sorter: time + archives: + blog: + source: blog + target: blog/tags + template: tagged_posts.j2 + archive_extension: html \ No newline at end of file