Skip to content

fix: update edit URL and replace social card image#67

Merged
th0rOdinson merged 1 commit intodevfrom
fix/edit-link-and-reduce-image
Jul 18, 2025
Merged

fix: update edit URL and replace social card image#67
th0rOdinson merged 1 commit intodevfrom
fix/edit-link-and-reduce-image

Conversation

@th0rOdinson
Copy link
Copy Markdown
Contributor

@th0rOdinson th0rOdinson commented Jul 18, 2025

Closes https://linear.app/defi-wonderland/issue/CHA-364/reduce-cover-image-size-fix-edit-link-url

Summary by CodeRabbit

  • Chores
    • Updated "edit this page" links in documentation to point to specific subdirectories for improved accuracy.
    • Changed the social media preview image format for the Optimism site from PNG to JPG.

@linear
Copy link
Copy Markdown

linear Bot commented Jul 18, 2025

@vercel
Copy link
Copy Markdown

vercel Bot commented Jul 18, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
handbook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 18, 2025 8:42pm
op-handbook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 18, 2025 8:42pm

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jul 18, 2025

📝 Walkthrough

Walkthrough

This change updates the Docusaurus configuration files for three documentation sites by modifying the "edit this page" URL to point from the root of the handbook repository to their respective subdirectories within the repository. Specifically, the editUrl property is changed for the optimism, template, and wonderland sites to direct edit links to their corresponding folders. Additionally, for the optimism site, the social card image used for social media previews is updated from a PNG file to a JPG file.

Possibly related PRs

  • fix: social cards #65: Updated the social card image in the same configuration file, indicating a direct sequence of changes to the social card image setup.
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ 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>, please review it.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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 using 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 generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this 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.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

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
Copy Markdown
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: 1

🔭 Outside diff range comments (2)
sites/wonderland/docusaurus.config.ts (1)

31-37: Same /tree/ vs /edit/ issue for Wonderland

-          editUrl: "https://github.com/defi-wonderland/handbook/tree/main/sites/wonderland",
+          editUrl: "https://github.com/defi-wonderland/handbook/edit/main/sites/wonderland",
sites/template/docusaurus.config.ts (1)

31-37: Switch template site’s editUrl to the correct GitHub endpoint

-          editUrl: "https://github.com/defi-wonderland/handbook/tree/main/sites/template",
+          editUrl: "https://github.com/defi-wonderland/handbook/edit/main/sites/template",
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c52627d and d8cc3fd.

⛔ Files ignored due to path filters (2)
  • sites/optimism/static/img/op-social-card.jpg is excluded by !**/*.jpg
  • sites/optimism/static/img/op-social-card.png is excluded by !**/*.png
📒 Files selected for processing (3)
  • sites/optimism/docusaurus.config.ts (2 hunks)
  • sites/template/docusaurus.config.ts (1 hunks)
  • sites/wonderland/docusaurus.config.ts (1 hunks)
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: th0rOdinson
PR: defi-wonderland/handbook#50
File: packages/common-config/preset/commonDocusaurusConfig.ts:50-53
Timestamp: 2025-07-08T17:52:29.172Z
Learning: In the defi-wonderland/handbook repository, for external handbook URLs in the navbar dropdown (like "https://handbook.wonderland.xyz/optimism"), the `to` property is used instead of `href` to avoid adding the openInNew icon since these are considered internal links within the handbook ecosystem from a UX perspective.
Learnt from: th0rOdinson
PR: defi-wonderland/handbook#46
File: scripts/src/create-handbook.ts:0-0
Timestamp: 2025-07-03T19:07:42.089Z
Learning: In the defi-wonderland/handbook repository, the `sites/template` directory is a repository structure that's guaranteed to have a package.json file, so validation checks for package.json existence are not needed in the create-handbook script.
Learnt from: th0rOdinson
PR: defi-wonderland/handbook#50
File: packages/common-config/src/components/CategoryCards/index.tsx:26-39
Timestamp: 2025-07-08T17:47:11.797Z
Learning: In the defi-wonderland/handbook monorepo CategoryCards component, the custom click handler with preventDefault, window.scrollTo, and setTimeout before window.location.href navigation was chosen as the best solution after exploring Docusaurus-based and native React approaches that didn't work for this specific use case.
sites/optimism/docusaurus.config.ts (4)
Learnt from: th0rOdinson
PR: defi-wonderland/handbook#50
File: packages/common-config/preset/commonDocusaurusConfig.ts:50-53
Timestamp: 2025-07-08T17:52:29.172Z
Learning: In the defi-wonderland/handbook repository, for external handbook URLs in the navbar dropdown (like "https://handbook.wonderland.xyz/optimism"), the `to` property is used instead of `href` to avoid adding the openInNew icon since these are considered internal links within the handbook ecosystem from a UX perspective.
Learnt from: th0rOdinson
PR: defi-wonderland/handbook#46
File: scripts/src/create-handbook.ts:0-0
Timestamp: 2025-07-03T19:07:42.089Z
Learning: In the defi-wonderland/handbook repository, the `sites/template` directory is a repository structure that's guaranteed to have a package.json file, so validation checks for package.json existence are not needed in the create-handbook script.
Learnt from: th0rOdinson
PR: defi-wonderland/handbook#46
File: sites/template/docusaurus.config.ts:70-70
Timestamp: 2025-07-03T21:13:49.173Z
Learning: In the defi-wonderland/handbook repository, when using webpack-merge to merge configurations in Docusaurus config files, the commonConfig is typed as Partial<Config> and localConfig is typed as Config. This means that merge(commonConfig, localConfig) maintains type safety without needing explicit type assertions, as TypeScript properly handles the merge of a partial configuration with a full configuration.
Learnt from: th0rOdinson
PR: defi-wonderland/handbook#50
File: packages/common-config/src/components/CategoryCards/index.tsx:26-39
Timestamp: 2025-07-08T17:47:11.797Z
Learning: In the defi-wonderland/handbook monorepo CategoryCards component, the custom click handler with preventDefault, window.scrollTo, and setTimeout before window.location.href navigation was chosen as the best solution after exploring Docusaurus-based and native React approaches that didn't work for this specific use case.
sites/wonderland/docusaurus.config.ts (5)
Learnt from: th0rOdinson
PR: defi-wonderland/handbook#50
File: packages/common-config/preset/commonDocusaurusConfig.ts:50-53
Timestamp: 2025-07-08T17:52:29.172Z
Learning: In the defi-wonderland/handbook repository, for external handbook URLs in the navbar dropdown (like "https://handbook.wonderland.xyz/optimism"), the `to` property is used instead of `href` to avoid adding the openInNew icon since these are considered internal links within the handbook ecosystem from a UX perspective.
Learnt from: th0rOdinson
PR: defi-wonderland/handbook#46
File: scripts/src/create-handbook.ts:0-0
Timestamp: 2025-07-03T19:07:42.089Z
Learning: In the defi-wonderland/handbook repository, the `sites/template` directory is a repository structure that's guaranteed to have a package.json file, so validation checks for package.json existence are not needed in the create-handbook script.
Learnt from: th0rOdinson
PR: defi-wonderland/handbook#46
File: sites/template/docusaurus.config.ts:70-70
Timestamp: 2025-07-03T21:13:49.173Z
Learning: In the defi-wonderland/handbook repository, when using webpack-merge to merge configurations in Docusaurus config files, the commonConfig is typed as Partial<Config> and localConfig is typed as Config. This means that merge(commonConfig, localConfig) maintains type safety without needing explicit type assertions, as TypeScript properly handles the merge of a partial configuration with a full configuration.
Learnt from: th0rOdinson
PR: defi-wonderland/handbook#50
File: packages/common-config/src/components/CategoryCards/index.tsx:26-39
Timestamp: 2025-07-08T17:47:11.797Z
Learning: In the defi-wonderland/handbook monorepo CategoryCards component, the custom click handler with preventDefault, window.scrollTo, and setTimeout before window.location.href navigation was chosen as the best solution after exploring Docusaurus-based and native React approaches that didn't work for this specific use case.
Learnt from: th0rOdinson
PR: defi-wonderland/handbook#50
File: packages/common-config/src/components/HandbookSection/index.tsx:24-28
Timestamp: 2025-07-08T17:34:12.910Z
Learning: In the defi-wonderland/handbook monorepo, the build command copies assets so that `/common/img/star-icon.svg` and similar paths in the common-config package are always available to consuming projects, eliminating the need for configurable asset paths.
sites/template/docusaurus.config.ts (3)
Learnt from: th0rOdinson
PR: defi-wonderland/handbook#50
File: packages/common-config/preset/commonDocusaurusConfig.ts:50-53
Timestamp: 2025-07-08T17:52:29.172Z
Learning: In the defi-wonderland/handbook repository, for external handbook URLs in the navbar dropdown (like "https://handbook.wonderland.xyz/optimism"), the `to` property is used instead of `href` to avoid adding the openInNew icon since these are considered internal links within the handbook ecosystem from a UX perspective.
Learnt from: th0rOdinson
PR: defi-wonderland/handbook#46
File: scripts/src/create-handbook.ts:0-0
Timestamp: 2025-07-03T19:07:42.089Z
Learning: In the defi-wonderland/handbook repository, the `sites/template` directory is a repository structure that's guaranteed to have a package.json file, so validation checks for package.json existence are not needed in the create-handbook script.
Learnt from: th0rOdinson
PR: defi-wonderland/handbook#46
File: sites/template/docusaurus.config.ts:70-70
Timestamp: 2025-07-03T21:13:49.173Z
Learning: In the defi-wonderland/handbook repository, when using webpack-merge to merge configurations in Docusaurus config files, the commonConfig is typed as Partial<Config> and localConfig is typed as Config. This means that merge(commonConfig, localConfig) maintains type safety without needing explicit type assertions, as TypeScript properly handles the merge of a partial configuration with a full configuration.
🔇 Additional comments (1)
sites/optimism/docusaurus.config.ts (1)

42-44: OG image asset verified

The file sites/optimism/static/img/op-social-card.jpg is present, so the updated themeConfig.image reference will resolve correctly. No further action needed.

Comment thread sites/optimism/docusaurus.config.ts
@th0rOdinson th0rOdinson merged commit f3796c4 into dev Jul 18, 2025
5 checks passed
@th0rOdinson th0rOdinson deleted the fix/edit-link-and-reduce-image branch July 18, 2025 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants