Skip to content

Commit

Permalink
feat: expressions in layouts
Browse files Browse the repository at this point in the history
  • Loading branch information
cossssmin committed Apr 24, 2021
1 parent 87e73bb commit b800a99
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/generators/posthtml.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ module.exports = async (html, config) => {
)

return posthtml([
layouts({strict: false, ...layoutsOptions}),
fetchPlugin,
modules({
parser: posthtmlOptions,
Expand All @@ -44,7 +43,17 @@ module.exports = async (html, config) => {
...modulesOptions
}),
...posthtmlPlugins,
expressions({...expressionsOptions, locals})
layouts(
merge(
{
strict: false,
plugins: [
expressions({...expressionsOptions, locals})
]
},
layoutsOptions
)
)
])
.process(html, {...posthtmlOptions})
.then(result => fm(result.html).body)
Expand Down

0 comments on commit b800a99

Please sign in to comment.