contentlayerdev / contentlayerdev/contentlayer

Preprocessing and Postprocessing Hooks?

未关闭
#325 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
help wanted meta: never-stale needs-research
主要语言
TypeScript
星标
3.5k
派生
192
PR 合并指标
30 天内没有已合并 PR

描述

I have a metalsmith site I'd like to move over or integrate with contentlayer.

Unlike CL, Metalsmith has straightforward ways of looking at the whole collection while processing individual documents. This allows, for example, ensuring that all internal website links are to documents that already exist. MS also has a large library of useful plugins.

Is there a way to hook metalsmith into content layer reloading, so it is run first before content layer? Or more directly use metalsmith to process files within content layer itself. As a work around, I suppose, I could use metalsmith to generate a directory of json files that is then used as input to content layer. But this requires basically managing two content systems.

Alternatively, is there a way to hook into the contentlayer process with content processors that can transform individual documents while having access to all collections?

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。