Skip to content

Commit 24492bc

Browse files
authored
fixes #37
prepend config_path location to data path
1 parent af90d16 commit 24492bc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

markdownextradata/plugin.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,9 @@ def on_pre_build(self, config, **kwargs):
5353
# assume an empty list if not defined
5454
data_source_folders = self.config.get("data", [])
5555
# cast as a list if is defined but is a string
56+
base_path = os.path.dirname(config["config_file_path"])
5657
if isinstance(data_source_folders, str):
57-
data_source_folders = data_source_folders.split(',')
58+
data_source_folders = [f"{base_path}/{i}" for i in data_source_folders.split(',')]
5859

5960
# if we have not value, then proceed to look in default folders
6061
# and assume a _data folder, add to list of folders to check

0 commit comments

Comments
 (0)