Browse Source

Added ssp test files

main
Lakshmi Vyasarajan 13 years ago
parent
commit
3bbcc351c3
3 changed files with 78 additions and 0 deletions
  1. +0
    -0
      hyde/tests/ssp/ext/__init__.py
  2. +18
    -0
      hyde/tests/ssp/ext/banner.py
  3. +60
    -0
      hyde/tests/ssp/site.yaml

+ 0
- 0
hyde/tests/ssp/ext/__init__.py View File


+ 18
- 0
hyde/tests/ssp/ext/banner.py View File

@@ -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 = """
<!--
This file was produced with infinite love, care & sweat.
Please dont copy. If you have to, please drop me a note.
-->
"""
if resource.source.kind == "html":
text = banner + text
return text

+ 60
- 0
hyde/tests/ssp/site.yaml View File

@@ -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

Loading…
Cancel
Save