Browse Source

Fix subfolders for root paths on windows. (Issue #167).

-   Ensure that subfolders for `layout_root`, `content_root`,
        `media_root` and `deploy_root` works reliably
        on windows. Use `fully_expanded_path` for all path components.
main
Lakshmi Vyasarajan 11 years ago
parent
commit
6e5276c99c
4 changed files with 21 additions and 7 deletions
  1. +10
    -1
      CHANGELOG.rst
  2. +1
    -1
      README.rst
  3. +9
    -4
      hyde/model.py
  4. +1
    -1
      hyde/version.py

+ 10
- 1
CHANGELOG.rst View File

@@ -1,3 +1,13 @@
Version 0.8.7a8
============================================================

* Fix subfolders for root paths on windows. (Issue #167).

- Using subfolders for `layout_root`, `content_root`,
`media_root` and `deploy_root` now works reliably
on windows.


Version 0.8.7a7
============================================================

@@ -5,7 +15,6 @@ Version 0.8.7a7
* Fixed `raise_exceptions` commandline parameter handling.



Version 0.8.7a6
============================================================



+ 1
- 1
README.rst View File

@@ -1,4 +1,4 @@
Version 0.8.7a7
Version 0.8.7a8

A brand new **hyde**
====================


+ 9
- 4
hyde/model.py View File

@@ -146,6 +146,10 @@ class Dependents(IterableUserDict):
if self.deps_file.parent.exists:
self.deps_file.write(yaml.dump(self.data))

def _expand_path(sitepath, path):
child = sitepath.child_folder(path)
return Folder(child.fully_expanded_path)

class Config(Expando):
"""
Represents the hyde configuration file
@@ -226,25 +230,26 @@ class Config(Expando):
"""
Derives the deploy root path from the site path
"""
return self.sitepath.child_folder(self.deploy_root)
return _expand_path(self.sitepath, self.deploy_root)

@property
def content_root_path(self):
"""
Derives the content root path from the site path
"""
return self.sitepath.child_folder(self.content_root)
return _expand_path(self.sitepath, self.content_root)

@property
def media_root_path(self):
"""
Derives the media root path from the content path
"""
return self.content_root_path.child_folder(self.media_root)
path = Folder(self.content_root).child(self.media_root)
return _expand_path(self.sitepath, path)

@property
def layout_root_path(self):
"""
Derives the layout root path from the site path
"""
return self.sitepath.child_folder(self.layout_root)
return _expand_path(self.sitepath, self.layout_root)

+ 1
- 1
hyde/version.py View File

@@ -2,4 +2,4 @@
"""
Handles hyde version.
"""
__version__ = '0.8.7a7'
__version__ = '0.8.7a8'

Loading…
Cancel
Save