-
Notifications
You must be signed in to change notification settings - Fork 264
Enable same-page navigation #979
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
Conversation
✅ Deploy Preview for docs-optimism ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
WalkthroughThe pull request introduces several modifications to the Changes
Possibly related PRs
Suggested reviewers
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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this 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 and nitpick comments (2)
theme.config.tsx (2)
Line range hint
87-95
: Excellent SEO improvement with dynamic title templates.The addition of the
useNextSeoProps
function enhances SEO by providing consistent and informative page titles. The implementation correctly handles the home page as a special case.Consider adding a default title for the home page to ensure it also has an optimized title:
useNextSeoProps() { const { asPath } = useRouter(); if (asPath !== "/") { return { titleTemplate: "%s | Optimism Docs", }; + } else { + return { + title: "Optimism Docs | Home" + }; } },
Line range hint
96-146
: Excellent SEO and social media optimization with dynamic meta tags.The expanded
head
function significantly improves SEO and social media sharing capabilities. The implementation covers all major meta tags and usesfrontMatter
for dynamic content, which is a great practice.For consistency, consider using template literals for the URL construction:
- "https://docs.optimism.io" + - (defaultLocale === locale ? asPath : `/${locale}${asPath}`); + `https://docs.optimism.io${defaultLocale === locale ? asPath : `/${locale}${asPath}`}`;Also, to ensure the Twitter card always has an image, you might want to add a fallback image URL:
<meta name="twitter:image" - content="https://docs.optimism.io/logos/docs-header.png" + content={frontMatter.image || "https://docs.optimism.io/logos/docs-header.png"} />
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (1)
- theme.config.tsx (1 hunks)
🧰 Additional context used
🔇 Additional comments (2)
theme.config.tsx (2)
Line range hint
66-77
: Great addition: User feedback component enhances documentation interactivity.The inclusion of the
FeelbackYesNo
component in thetoc.extraContent
is a valuable addition. It provides a simple and effective way for users to give feedback on the usefulness of each page. This can help in improving the documentation quality over time.
Line range hint
1-146
: Overall excellent improvements to theme configuration and SEO.The changes in this file significantly enhance the documentation's SEO, user interaction, and navigation experience. Key improvements include:
- Enabling same-page navigation in the banner.
- Adding a user feedback component.
- Implementing dynamic title templates for better SEO.
- Expanding meta tags for improved SEO and social media sharing.
These changes align well with the PR objective and provide valuable enhancements to the documentation platform.
Description
Enable same-page navigation on the SDK deprecation notice bar.
Tests
Additional context
Metadata