Skip to content

Commit

Permalink
fixes #37
Browse files Browse the repository at this point in the history
prepend config_path location to data path
  • Loading branch information
rosscdh authored Dec 15, 2021
1 parent af90d16 commit 24492bc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion markdownextradata/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@ def on_pre_build(self, config, **kwargs):
# assume an empty list if not defined
data_source_folders = self.config.get("data", [])
# cast as a list if is defined but is a string
base_path = os.path.dirname(config["config_file_path"])
if isinstance(data_source_folders, str):
data_source_folders = data_source_folders.split(',')
data_source_folders = [f"{base_path}/{i}" for i in data_source_folders.split(',')]

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

0 comments on commit 24492bc

Please sign in to comment.