Skip to content

Commit

Permalink
configuration: make sure destination is always inside source when rel…
Browse files Browse the repository at this point in the history
…ative
  • Loading branch information
kingwill101 committed Aug 12, 2024
1 parent e79e90f commit 38124f0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/configuration.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Configuration {
"url": "http://gengen.local",
"theme": "default",
"source": current,
"destination": joinAll([current, 'public']),
"destination": 'public',
"include": <String>[],
"exclude": <String>[],
"post_dir": "_posts",
Expand Down Expand Up @@ -165,6 +165,12 @@ class Configuration {
_config.addAll(overrides);
_addDefaultIncludes();
_addDefaultExcludes();

if (isRelative(destination)) {
_config["destination"] = join(source, destination);
} else {
_config["destination"] = destination;
}
}
}

Expand Down

0 comments on commit 38124f0

Please sign in to comment.