Skip to content

Commit 1f78c43

Browse files
committed
Grab templates from template, not target, dir
1 parent 6420461 commit 1f78c43

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

devstats/publish.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ def publish(project, templatedir, outdir):
5454

5555
print(f"Templating [{project}] report from [{templatedir}] to [{outdir}]...")
5656

57-
template_files = glob(f"{templatedir}/{project}/*.md")
57+
templatedir = f"{templatedir}/{project}"
58+
template_files = glob(f"{templatedir}/*.md")
5859

5960
for f in template_files:
6061
with open(f) as fh:
@@ -69,7 +70,7 @@ def publish(project, templatedir, outdir):
6970
# Handle myst includes
7071
template = re.sub(
7172
r"```{include}\s*(.*)\s*```",
72-
functools.partial(_include_file, dest_dir),
73+
functools.partial(_include_file, templatedir),
7374
template,
7475
flags=re.MULTILINE,
7576
)

0 commit comments

Comments
 (0)