Browse Source

Merge pull request #54 from gfuchedzhy/hyde

---

Currently if
<pre>
urlcleaner:
  strip_extensions:
    - html
</pre>
options is given, hyde.server will fail to serve stripped urls, which is very inconvenient.
main
Lakshmi Vyasarajan 13 years ago
parent
commit
c021315676
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