Mercurial > piecrust2
comparison piecrust/sources/default.py @ 366:81d2fd526c82
sources: Default source lists pages in order.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sun, 03 May 2015 18:40:38 -0700 |
parents | dd25bd3ce1f9 |
children | bab91fcef741 |
comparison
equal
deleted
inserted
replaced
365:a9929e0b8f66 | 366:81d2fd526c82 |
---|---|
42 self.fs_endpoint_path) | 42 self.fs_endpoint_path) |
43 | 43 |
44 for dirpath, dirnames, filenames in os.walk(self.fs_endpoint_path): | 44 for dirpath, dirnames, filenames in os.walk(self.fs_endpoint_path): |
45 rel_dirpath = os.path.relpath(dirpath, self.fs_endpoint_path) | 45 rel_dirpath = os.path.relpath(dirpath, self.fs_endpoint_path) |
46 dirnames[:] = list(filter(filter_page_dirname, dirnames)) | 46 dirnames[:] = list(filter(filter_page_dirname, dirnames)) |
47 for f in filter(filter_page_filename, filenames): | 47 for f in sorted(filter(filter_page_filename, filenames)): |
48 fac_path = f | 48 fac_path = f |
49 if rel_dirpath != '.': | 49 if rel_dirpath != '.': |
50 fac_path = os.path.join(rel_dirpath, f) | 50 fac_path = os.path.join(rel_dirpath, f) |
51 slug = self._makeSlug(fac_path) | 51 slug = self._makeSlug(fac_path) |
52 metadata = {'slug': slug} | 52 metadata = {'slug': slug} |