Skip to content
This repository has been archived by the owner on Jul 22, 2020. It is now read-only.

Commit

Permalink
Add base config option to set a base path for twigjs template path re…
Browse files Browse the repository at this point in the history
…solution
  • Loading branch information
BrianWalters committed Jun 25, 2019
1 parent a399e25 commit be7a8ec
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@ class TwigAdapter extends Fractal.Adapter {
async: false,
rethrow: true,
name: meta.self ? `${self._config.handlePrefix}${meta.self.handle}` : tplPath,
precompiled: str
precompiled: str,
base: self._config.base
});
resolve(template.render(context));
} catch (e) {
Expand All @@ -174,7 +175,8 @@ module.exports = function(config) {
config = _.defaults(config || {}, {
pristine: false,
handlePrefix: '@',
importContext: false
importContext: false,
base: null
});

return {
Expand Down

0 comments on commit be7a8ec

Please sign in to comment.