docusaurus
docusaurus copied to clipboard
fix: do not add Twitter card meta tag if image is missing
Pre-flight checklist
- [x] I have read the Contributing Guidelines on pull requests.
- [x] If this is a code change: I have written unit tests and/or added dogfooding pages to fully verify the new behavior.
- [x] If this is a new API or substantial change: the PR has an accompanying issue (closes #0000) and the maintainers have approved on my working plan.
Motivation
Maybe I am misunderstanding again, but it seems we don't need to add twitter:card meta tag if there is no image for social media on web page.
Test Plan
Test links
Deploy preview: https://deploy-preview-_____--docusaurus-2.netlify.app/
Related issues/PRs
[V2]
Built without sensitive environment variables
| Name | Link |
|---|---|
| Latest commit | ee6541a89f7fade7f3a4f99540d363707b9927e3 |
| Latest deploy log | https://app.netlify.com/sites/docusaurus-2/deploys/635ac4a3469dfc0009c95b99 |
| Deploy Preview | https://deploy-preview-8260--docusaurus-2.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site settings.
⚡️ Lighthouse report for the deploy preview of this PR
| URL | Performance | Accessibility | Best Practices | SEO | PWA | Report |
|---|---|---|---|---|---|---|
| / | 🟠 64 | 🟢 97 | 🟢 100 | 🟢 100 | 🟢 90 | Report |
| /docs/installation | 🟠 81 | 🟢 100 | 🟢 100 | 🟢 100 | 🟢 90 | Report |
User can provide a social card without using the <PageMetadata> component so I'd prefer not remove the defaults