zce / velite

Turns Markdown / MDX, YAML, JSON, or others into app's data layer with Zod schema.
http://velite.js.org
MIT License
476 stars 23 forks source link

What is the purpose of the Recipes(especially typescript) in the documents? #121

Open witch-factory opened 6 months ago

witch-factory commented 6 months ago

While reviewing the documentation, I noticed that the articles on Typescript, Markdown, and Asset Handling in the "Recipes" section are still in progress. What is the purpose of these items? Given the content of other Recipes documents, such as MDX Support and Code Highlighting, it seems that the intention might be to explain code handling the respective resources (type, markdown, assets).

However, types are well described at https://velite.js.org/reference/types, and if it's about schema types, they are detailed at https://velite.js.org/guide/velite-schemas. Additionally, the content in the Markdown document could be easily adapted from the MDX Support article with minor modifications. What is the intended purpose of the Typescript and Markdown documents in Recipes?

If it's okay, I would like to help with writing the documentation. Perhaps starting with the seemingly lacking Asset Handling could be a good place to start. Could you tell me what content you expect in those sections(Typescript, Markdown, and Asset Handling in "Recipes")?

witch-factory commented 6 months ago

plus, in the Javascript API section( https://velite.js.org/reference/api ) type signature of the Entry, Result, outputFile(maybe same with outputEntry in code), outputImage(maybe same with outputAsset in code) are different from the current code in github.

If these differences are mistake or the intention for the future improvement, whatever, I would like to help fixing/improvement.

zce commented 6 months ago

First of all, thank you very much for your willingness to help Velite's community.

My original idea about recipes in the document is that it can help users to use Velite better and provide some personal best practices in the past

Markdown:

Asset Handling:

TypeScript:

Of course, this is just my idea. If you want, you can adjust the document structure according to your idea.

Thanks again

witch-factory commented 6 months ago

Thank you for the kind explanation regarding the original purpose. I plan to familiarize myself with the code of Velite first, then work on the documentation for Markdown, Asset Handling, and Typescript, and contribute to the code if needed.

If it's alright, I will link the documentation-related PR to this issue later.