Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: improvements #201

Merged
merged 1 commit into from
Aug 7, 2024
Merged

docs: improvements #201

merged 1 commit into from
Aug 7, 2024

Conversation

qiushiyan
Copy link
Contributor

@qiushiyan qiushiyan commented Aug 7, 2024

Summary by CodeRabbit

  • Documentation
    • Enhanced clarity and grammatical accuracy across various documentation files related to the Velite tool.
    • Improved instructions and explanations in guides, ensuring a better understanding of features like code highlighting and custom schemas.
    • Minor corrections made in README and other documentation files for consistency and professionalism.

Copy link

coderabbitai bot commented Aug 7, 2024

Walkthrough

This update improves the documentation for the Velite tool by correcting grammatical errors, enhancing clarity, and standardizing capitalization across multiple files. The adjustments focus on making the text more professional and user-friendly, ensuring that users have a clearer understanding of Velite's features and functionalities without altering any underlying content or logic.

Changes

Files Change Summary
docs/.vitepress/config.ts Updated verb tense in the description for grammatical accuracy.
docs/examples/basic.md Revised phrasing for clarity regarding the development build command.
docs/examples/nextjs.md Similar rephrasing as in basic.md for clearer instructions.
docs/guide/code-highlighting.md Streamlined explanations on code highlighting and improved clarity on customization options.
docs/guide/custom-loader.md Corrected capitalization in the introductory sentence.
docs/guide/custom-schema.md Improved capitalization in sentence beginnings for grammatical accuracy.
docs/guide/define-collections.md Enhanced grammatical accuracy and clarity of explanations related to content collections and schema validation.
docs/guide/introduction.md Adjustments for grammatical correctness and improved clarity on TypeScript functionalities.
docs/guide/last-modified.md Rephrased introduction and improved clarity on custom timestamp schema implementation details.
docs/guide/quick-start.md Minor changes for clarity in "watch mode" instructions.
docs/guide/using-markdown.md Improved grammatical structure of the Markdown support statement.
docs/guide/using-mdx.md Enhanced clarity and flow regarding the use of MDX with Velite, including elaborated examples and instructions.
docs/guide/velite-schemas.md Capitalization adjustment for improved readability in function descriptions.
docs/guide/with-nextjs.md Corrected grammatical errors and improved overall clarity in the documentation.
docs/other/snippets.md Refactored timestamp function to utilize defineSchema, enhancing code clarity while maintaining functionality.
docs/reference/config.md Clarified purpose of defineConfig function for better understanding of typing benefits.
readme.md Corrected verb tense in description for grammatical accuracy.

Possibly related issues

🐇 In the forest so bright and wide,
A rabbit hops with joyful pride.
With every change, the docs now shine,
Clarity and grammar, all align!
A little tweak, a gentle nudge,
Velite's charm, we proudly budge! 🌼


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Outside diff range, codebase verification and nitpick comments (1)
docs/guide/using-mdx.md (1)

245-245: Consider using a stronger adjective.

The phrase "bundling MDX can be a good option for better portability" can be strengthened by using a different adjective. Consider using "excellent" or "optimal" instead of "good".

Tools
LanguageTool

[style] ~245-~245: Consider using a different adjective in this context to strengthen your wording.
Context: ...ased output size, bundling MDX can be a good option for better portability. You can...

(GOOD_ALTERNATIVE)

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 5259a33 and 002584a.

Files selected for processing (17)
  • docs/.vitepress/config.ts (1 hunks)
  • docs/examples/basic.md (1 hunks)
  • docs/examples/nextjs.md (1 hunks)
  • docs/guide/code-highlighting.md (5 hunks)
  • docs/guide/custom-loader.md (1 hunks)
  • docs/guide/custom-schema.md (2 hunks)
  • docs/guide/define-collections.md (6 hunks)
  • docs/guide/introduction.md (3 hunks)
  • docs/guide/last-modified.md (2 hunks)
  • docs/guide/quick-start.md (1 hunks)
  • docs/guide/using-markdown.md (1 hunks)
  • docs/guide/using-mdx.md (8 hunks)
  • docs/guide/velite-schemas.md (1 hunks)
  • docs/guide/with-nextjs.md (2 hunks)
  • docs/other/snippets.md (2 hunks)
  • docs/reference/config.md (1 hunks)
  • readme.md (1 hunks)
Files skipped from review due to trivial changes (9)
  • docs/.vitepress/config.ts
  • docs/guide/custom-loader.md
  • docs/guide/custom-schema.md
  • docs/guide/introduction.md
  • docs/guide/quick-start.md
  • docs/guide/using-markdown.md
  • docs/guide/velite-schemas.md
  • docs/reference/config.md
  • readme.md
Additional context used
Markdownlint
docs/examples/basic.md

55-55: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)

docs/examples/nextjs.md

72-72: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)

LanguageTool
docs/guide/with-nextjs.md

[uncategorized] ~5-~5: The preposition ‘to’ seems more likely in this position.
Context: ...cluding Next.js. Here are some recipes for help you better integrate Velite with N...

(AI_HYDRA_LEO_REPLACE_FOR_TO)

docs/guide/define-collections.md

[style] ~89-~89: Consider removing “of” to be more concise
Context: ...rt of Zod's z object, and it supports all of the features of Zod. See [Zod's Docs](https...

(ALL_OF_THE)

docs/guide/using-mdx.md

[misspelling] ~24-~24: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ...tent/posts/hello-world.mdx` document is a MDX document with the following content...

(EN_A_VS_AN)


[misspelling] ~131-~131: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ...ild time. There is no need to construct a import tree. This can help reduce outpu...

(EN_A_VS_AN)


[misspelling] ~172-~172: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ...ents you want in your MDX files without a import. ::: code-group ```mdx [./post...

(EN_A_VS_AN)


[style] ~245-~245: Consider using a different adjective in this context to strengthen your wording.
Context: ...ased output size, bundling MDX can be a good option for better portability. You can...

(GOOD_ALTERNATIVE)

Additional comments not posted (34)
docs/examples/basic.md (1)

55-55: Clarify command instruction.

The change improves the clarity of the instruction by changing "run build with watch mode" to "run build in watch mode." This makes the instruction more precise and user-friendly.

Tools
Markdownlint

55-55: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)

docs/guide/last-modified.md (9)

3-4: Improved clarity in introductory text.

The rephrasing of the introductory text improves clarity by explicitly stating that users can create a custom schema for displaying last modified times.


5-7: Improved clarity in list items.

The list items have been rephrased to be more concise and clear.


11-11: Improved section title.

The section title has been updated to clearly indicate that it is based on file stat.


14-15: Added necessary imports.

The imports for stat and defineSchema are explicitly added, ensuring that all necessary modules are clearly defined at the beginning of the code block.


17-28: Enhanced structure and readability of the timestamp function.

The timestamp function now uses defineSchema from the velite library, replacing the previous inline function declaration. This change enhances the structure and readability of the code.


31-31: Improved usage example.

The usage example has been updated to reflect the new schema definition approach.


46-49: Added necessary imports.

The imports for exec, promisify, and defineSchema are explicitly added, ensuring that all necessary modules are clearly defined at the beginning of the code block.


52-62: Enhanced structure and readability of the timestamp function.

The timestamp function now uses defineSchema from the velite library, replacing the previous inline function declaration. This change enhances the structure and readability of the code.


65-65: Improved usage example.

The usage example has been updated to reflect the new schema definition approach.

docs/examples/nextjs.md (1)

72-72: Clarify command instruction.

The change improves the clarity of the instruction by changing "run build with watch mode" to "run build in watch mode." This makes the instruction more precise and user-friendly.

Tools
Markdownlint

72-72: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)

docs/guide/code-highlighting.md (6)

3-3: Improved Clarity and Conciseness

The rephrased sentence improves clarity by explaining why Velite does not include built-in code highlighting and how users can implement it themselves.


39-39: Enhanced Explanation

The updated explanation clarifies that rehype-pretty-code creates the HTML structure for syntax highlighting and provides a clear instruction on adding styles.


79-79: Reference to Examples

The added reference to examples enhances the documentation by providing users with a resource for more details.


166-166: Clarification on Client-side Highlighting

The refined sentence specifies that using libraries like PrismJS or Shiki does not add build overhead, which is a significant point for users concerned about performance.


168-168: Example Code for Client-side Highlighting

The added example code for client-side highlighting using Shiki improves the documentation by providing a practical implementation.


180-180: Improved Readability

The rephrased recommendation for processing a large number of documents improves readability and emphasizes the time-consuming nature of syntax highlighting.

docs/guide/with-nextjs.md (2)

5-5: Grammatical Correction

The corrected phrase "Here are some recipes" enhances grammatical accuracy.

Tools
LanguageTool

[uncategorized] ~5-~5: The preposition ‘to’ seems more likely in this position.
Context: ...cluding Next.js. Here are some recipes for help you better integrate Velite with N...

(AI_HYDRA_LEO_REPLACE_FOR_TO)


36-36: Standardized Capitalization

The modification to "In next.config.js:" improves the overall readability by standardizing capitalization.

docs/guide/define-collections.md (8)

3-3: Improved Readability

The corrected phrase "Velite helps you organize" enhances readability and grammatical correctness.


89-89: Clarification on Zod Utility

The refined explanation specifies that the z utility is a re-export of Zod's z object, clarifying its functionality.

Tools
LanguageTool

[style] ~89-~89: Consider removing “of” to be more concise
Context: ...rt of Zod's z object, and it supports all of the features of Zod. See [Zod's Docs](https...

(ALL_OF_THE)


107-107: Enhanced Description

The updated phrase "For more complex schemas" provides a clearer distinction in the context of schema complexity.


159-159: Clarification on Transform Context

The refined explanation emphasizes the role of the transform() function in adding computed fields, improving clarity.


179-179: Improved Grammatical Structure

The corrected phrase "loader keeps content's raw body" improves grammatical structure.


181-181: Clarification on Custom Schema Usage

The updated explanation specifies that the excerpt function can take options, indicating a more flexible usage.


240-240: Improved Example

The refined example for the excerpt function provides a clearer and more detailed explanation of its usage.


247-247: Reference to Extended Schema

The added reference to the s.excerpt(options) documentation enhances the user's understanding of the available options.

docs/other/snippets.md (2)

8-22: LGTM! The refactoring improves readability and maintainability.

The use of defineSchema enhances the structure of the code. The logic for checking the input value and adding issues remains intact. The file's modified timestamp retrieval using fs/promises is correctly implemented.


37-53: LGTM! The refactoring improves readability and maintainability.

The use of defineSchema enhances the structure of the code. The logic for checking the input value and adding issues remains intact. The timestamp retrieval from Git logs using exec is correctly implemented.

docs/guide/using-mdx.md (5)

12-12: Improved clarity by adding hypothetical context.

Changing "you have the following content structure" to "suppose you have the following content structure" adds hypothetical context, enhancing clarity.


24-24: Correct grammatical error: Use "an" instead of "a".

The phrase "a MDX document" should be "an MDX document" to be grammatically correct.

Tools
LanguageTool

[misspelling] ~24-~24: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ...tent/posts/hello-world.mdx` document is a MDX document with the following content...

(EN_A_VS_AN)


131-131: Correct grammatical error: Use "an" instead of "a".

The phrase "a import tree" should be "an import tree" to be grammatically correct.

Tools
LanguageTool

[misspelling] ~131-~131: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ...ild time. There is no need to construct a import tree. This can help reduce outpu...

(EN_A_VS_AN)


172-172: Correct grammatical error: Use "an" instead of "a".

The phrase "a import" should be "an import" to be grammatically correct.

Tools
LanguageTool

[misspelling] ~172-~172: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ...ents you want in your MDX files without a import. ::: code-group ```mdx [./post...

(EN_A_VS_AN)


215-215: Improved flexibility and reusability of components.

Adding global components to make them available to all MDX files enhances flexibility and reusability.

Copy link
Owner

@zce zce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome

@zce
Copy link
Owner

zce commented Aug 7, 2024

@qiushiyan Thanks a lot!

@zce zce merged commit eed684b into zce:main Aug 7, 2024
1 check passed
@zce zce changed the title Documentation improvements docs: improvements Aug 7, 2024
@zce zce linked an issue Aug 9, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Documentation improvement
2 participants