Skip to content

Commit

Permalink
feat: write transform updates back to storage
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Feb 21, 2024
1 parent a1154f0 commit c4fc410
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions layers/core/app/modules/content/source.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ export default (opts) => {
if (opts.docsConfig.automd) {
if (key.endsWith('.md') && typeof val === 'string') {
const res = await transform(val, opts.docsConfig.automd)
if (res.hasChanged) {
_fs.setItem(key, res.contents).catch(console.error)
}
return res.contents
} else if (key.endsWith('.md$')) {
return { mtime: new Date() }
Expand Down

0 comments on commit c4fc410

Please sign in to comment.