Skip to content

Commit

Permalink
chore: use posthtml default config when parsing front matter
Browse files Browse the repository at this point in the history
  • Loading branch information
cossssmin committed Jul 23, 2024
1 parent 6fd9e14 commit dca806c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/generators/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { cwd } from 'node:process'
import { defu as merge } from 'defu'
import expressions from 'posthtml-expressions'
import { parseFrontMatter } from '../utils/node.js'
import defaultConfig from '../posthtml/defaultConfig.js'
import { process as compilePostHTML } from '../posthtml/index.js'
import { run as useTransformers, transformers } from '../transformers/index.js'

Expand Down Expand Up @@ -40,7 +41,7 @@ export async function render(html = '', config = {}) {
})
]
)
.process(matter)
.process(matter, defaultConfig)
.then(({ html }) => parseFrontMatter(`---${html}\n---`))

const templateConfig = merge(matterData, config)
Expand Down

0 comments on commit dca806c

Please sign in to comment.