Skip to content

Commit

Permalink
An accessor for resource children
Browse files Browse the repository at this point in the history
  • Loading branch information
ssorj committed May 22, 2024
1 parent 21973fb commit 29aa11e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions python/transom/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,12 @@ def ancestors(self):
yield file_
file_ = file_.parent

@property
def children(self):
for file_ in self.site._files:
if file_.parent is self:
yield file_

class _LinkParser(_HTMLParser):
def __init__(self, file_, link_sources, link_targets):
super().__init__()
Expand Down

0 comments on commit 29aa11e

Please sign in to comment.