-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix minor issues with Code Samples #2966
Conversation
- The description gets deleted if it matches the title exactly (due to how our plugin finds the text of the README). Changed a couple instances to not match exactly so this doesn't happen. - Changed the top level of the Code Sampels layout to be a <main> element, which allows some styles to apply correctly and also helps the search crawler find the contents of the page.
Yep, that was another instance of the same problem. It turns out, the "feature" of removing text that matches the title was not even needed, so I removed it entirely. Also fixed another typo I spotted along the way. |
@@ -29,7 +29,7 @@ export default function CodeSamples() { | |||
const { codeSamples, langs } = usePageSharedData<any>('code-samples'); | |||
|
|||
return ( | |||
<div className="landing page-community"> | |||
<main className="landing page-code-samples"> |
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.
I cant find any references to this className in the codebase. Maybe we can remove this? Otherwise LGTM
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.
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.
It's not used now but it's available if we need it later. Putting it there (on the correct element) is future-proofing.
<main>
element, which allows some styles to apply correctly and also helps the search crawler find the contents of the page.