From cd643672a42ff70e15137f8f8c896de7b6a19e5c Mon Sep 17 00:00:00 2001 From: zce Date: Sun, 26 Nov 2023 14:14:09 +0800 Subject: [PATCH] docs: update docs --- docs/reference/config.md | 145 +++++++++++++++++++++++++++++++-------- 1 file changed, 116 insertions(+), 29 deletions(-) diff --git a/docs/reference/config.md b/docs/reference/config.md index 2a952fa..39b3f8f 100644 --- a/docs/reference/config.md +++ b/docs/reference/config.md @@ -1,10 +1,6 @@ # Configuration -This documentation is still being written. Please check back later. - - + /** + * Collections + */ + collections: C + /** + * File loaders + * @default [] (built-in loaders: 'json', 'yaml', 'markdown') + */ + loaders: Loader[] + /** + * Global markdown options + */ + markdown: MarkdownOptions + /** + * Global MDX options + */ + mdx: MdxOptions + /** + * Data prepare hook, before write to file + * @description + * You can apply additional processing to the output data, such as modify them, add missing data, handle relationships, or write them to files. + * return false to prevent the default output to a file if you wanted + */ + prepare?: (data: { + [name in keyof C]: C[name]['single'] extends true ? C[name]['schema']['_output'] : Array + }) => Promisable + /** + * Build success hook + * @description + * You can do anything after the build is complete, such as print some tips or deploy the output files. + */ + complete?: () => Promisable +} +``` + +