Browse Source

Merge pull request #36 from vincentbernat/hyde

---

By default, backup files are ignored and node turned into a node. With this change, we can ignore those backup files. There is a default list and this is user configurable.
main
Lakshmi Vyasarajan 13 years ago
parent
commit
4e74d74fd2
2 changed files with 6 additions and 1 deletions
  1. +2
    -1
      hyde/model.py
  2. +4
    -0
      hyde/site.py

+ 2
- 1
hyde/model.py View File

@@ -132,7 +132,8 @@ class Config(Expando):
media_url='/media',
base_url="/",
not_found='404.html',
plugins = []
plugins = [],
ignore = [ "*~", "*.bak" ]
)
conf = dict(**default_config)
self.sitepath = Folder(sitepath)


+ 4
- 0
hyde/site.py View File

@@ -3,6 +3,7 @@
Parses & holds information about the site to be generated.
"""
import os
import fnmatch
from hyde.exceptions import HydeException
from hyde.fs import FS, File, Folder
from hyde.model import Config
@@ -352,6 +353,9 @@ class RootNode(Node):

@walker.file_visitor
def visit_file(afile):
for pattern in self.site.config.ignore:
if fnmatch.fnmatch(afile.name, pattern):
return
self.add_resource(afile)




Loading…
Cancel
Save