Browse Source

added ability to hyde.server to serve urls stripped with urlcleaner plugin

main
Grygoriy Fuchedzhy 13 years ago
parent
commit
19eeae5eca
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      hyde/server.py

+ 5
- 0
hyde/server.py View File

@@ -68,6 +68,11 @@ class HydeRequestHandler(SimpleHTTPRequestHandler):
if isinstance(deployed, Folder):
node = site.content.node_from_relative_path(path)
res = node.get_resource('index.html')
elif hasattr(site.config, 'urlcleaner') and hasattr(site.config.urlcleaner, 'strip_extensions'):
for ext in site.config.urlcleaner.strip_extensions:
res = site.content.resource_from_relative_deploy_path(path + '.' + ext)
if res:
break
else:
res = site.content.resource_from_relative_deploy_path(path)



Loading…
Cancel
Save