Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
vadimkantorov committed Jul 18, 2024
1 parent b4a6742 commit 718c81a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions zrxivrender.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,10 @@
os.makedirs(args.output_dir, exist_ok = True)
print(args.output_dir)
for d in config['defaults']:
if d['scope']['path'] != 'data/tags/*.md':
continue

#if d['scope']['path'] != 'data/tags/*.md':
# continue
if '*' in d['scope']['path']:
for path in glob.glob(d['scope']['path']):
#breakpoint()
output_path = os.path.join(args.output_dir, d['values']['permalink'].replace(':basename', os.path.splitext(os.path.basename(path))[0]).lstrip('/') + 'index.html' * (d['values']['permalink'][-1] == '/'))
os.makedirs(os.path.dirname(output_path), exist_ok = True)
print(cls(dict(ctx, page = dict(d['values'], path = path, name = os.path.basename(path)))).render(d['values']['layout']), file = open(output_path, 'w'))
Expand Down

0 comments on commit 718c81a

Please sign in to comment.