Skip to content

Conversation

sbvegan
Copy link
Collaborator

@sbvegan sbvegan commented Mar 19, 2024

Description

Example of how we can import .md files into our .mdx files to enable content reuse.

You can compare the preview to the live page and see there's no difference https://docs.optimism.io/builders/chain-operators/architecture

Tests

Please describe any tests you've added. If you've added no tests, or left important behavior untested, please explain why not.

Additional context

Add any other context about the problem you're solving.

Metadata

  • Fixes #[Link to Issue]

@sbvegan sbvegan requested a review from a team as a code owner March 19, 2024 23:01
@sbvegan sbvegan requested a review from a team March 19, 2024 23:01
Copy link
Contributor

coderabbitai bot commented Mar 19, 2024

Walkthrough

The updates enhance documentation efficiency through content reuse and better modularization. A new file, OpProposerDescriptionShort.md, describes the op-proposer service and is imported into architecture.mdx. Additionally, guidelines on content reuse are provided. Path mappings were adjusted in the tsconfig.json, and an export statement was added to content/index.js.

Changes

Files Change Summary
content/OpProposerDescriptionShort.md Introduces the functionality of op-proposer.
notes/content-reuse.md Provides guidelines on content reuse for technical writers.
pages/builders/chain-operators/...mdx Replaces op-proposer description with <OpProposerDescriptionShort /> component import.
tsconfig.json Adds a new path mapping for @/content/* to content/*.
content/index.js Exports OpProposerDescriptionShort from OpProposerDescriptionShort.md.

Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 60cce75 and 01d37ca.

Files selected for processing (1)
  • notes/content-reuse.md (1 hunks)
Additional context used
Markdownlint
notes/content-reuse.md

33-33: Expected: 0 or 2; Actual: 1
Trailing spaces

(MD009, no-trailing-spaces)


17-17: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


23-23: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


36-36: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


43-43: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


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 Configration 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

netlify bot commented Mar 19, 2024

Deploy Preview for docs-optimism ready!

Name Link
🔨 Latest commit 01d37ca
🔍 Latest deploy log https://app.netlify.com/sites/docs-optimism/deploys/667da7d294e6670008c666bb
😎 Deploy Preview https://deploy-preview-584--docs-optimism.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@cpengilly
Copy link
Contributor

would also be cool if we could update coderabbit (and maybe the linter??) to recommend people use content reuse .md files when it notices overlapping content 😄 i know this would be separate, but this would really elevate the docs too @smartcontracts FV and weigh-in 💟

@cpengilly cpengilly changed the title content reuse example feature: content reuse May 2, 2024
@sbvegan
Copy link
Collaborator Author

sbvegan commented May 2, 2024

I'm not sure how to configure coderabbit or the linter to handle that. Maybe the ai rabbit would be smart enough to pick it up after its introduced into the codebase, but I'm not sure.

Copy link
Contributor

@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: 2

Outside diff range and nitpick comments (2)
pages/builders/chain-operators/architecture.mdx (2)

Line range hint 54-54: Correct the verb form for "setup".

The word "setup" is used incorrectly as a verb. Here's the corrected version:

- It is important to setup a robust chain architecture to handle large volumes of RPC requests from your users.
+ It is important to set up a robust chain architecture to handle large volumes of RPC requests from your users.

Line range hint 68-68: Use the correct article "an" before vowel sounds.

The use of "a" before "RPC" is incorrect since "RPC" starts with a vowel sound. Here's the corrected version:

- This tool is a RPC request router and proxy.
+ This tool is an RPC request router and proxy.

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Copy link
Contributor

@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: 2

@cpengilly cpengilly merged commit 36f0fe7 into main Jun 27, 2024
@cpengilly cpengilly deleted the content-reuse branch June 27, 2024 17:59
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.

2 participants