contentlayerdev / contentlayerdev/contentlayer

Preprocessing and Postprocessing Hooks?

オープン
#325 コメント 1 件 リアクション 0 件 担当者 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 を短くまとめたダイジェスト。