Skip to content
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(v2): add base URL to content attribute of head tags PWA #5185

Merged
merged 1 commit into from
Jul 16, 2021

Conversation

lex111
Copy link
Contributor

@lex111 lex111 commented Jul 15, 2021

Motivation

Follow-up of #5169

According to RocketValidator, we have invalid meta tag msapplication-TileImage in which href attribute should be replaced by content. For that case, we should also adding base URL to content attribute in addition to current href attribute.

Attribute “href” not allowed on element “meta” at this point.

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

Preview

Related PRs

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)

@lex111 lex111 added the pr: bug fix This PR fixes a bug in a past release. label Jul 15, 2021
@lex111 lex111 requested a review from slorber as a code owner July 15, 2021 22:44
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Jul 15, 2021
}

const attributePath =
!!path.extname(attributeValue) && attributeValue;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if really need to check for file path exists, so for now just check that attribute value contains file name.

@netlify
Copy link

netlify bot commented Jul 15, 2021

✔️ [V2]

🔨 Explore the source changes: a8dfb6d

🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/60f0ba46d261d40007f746ab

😎 Browse the preview: https://deploy-preview-5185--docusaurus-2.netlify.app

@github-actions
Copy link

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟢 Performance 91
🟢 Accessibility 98
🟢 Best practices 100
🟢 SEO 100
🟢 PWA 95

Lighthouse ran on https://deploy-preview-5185--docusaurus-2.netlify.app/

@github-actions
Copy link

Size Change: +18 B (0%)

Total Size: 850 kB

ℹ️ View Unchanged
Filename Size Change
website/.docusaurus/globalData.json 58.8 kB 0 B
website/build/assets/css/styles.********.css 89 kB 0 B
website/build/assets/js/main.********.js 459 kB +3 B (0%)
website/build/blog/2017/12/14/introducing-docusaurus/index.html 62.4 kB +3 B (0%)
website/build/blog/index.html 26.3 kB +3 B (0%)
website/build/docs-tests/index.html 20.3 kB +3 B (0%)
website/build/docs-tests/standalone/index.html 18.8 kB +3 B (0%)
website/build/docs/index.html 40.2 kB 0 B
website/build/docs/installation/index.html 47.9 kB 0 B
website/build/index.html 27.3 kB +3 B (0%)

compressed-size-action

@slorber
Copy link
Collaborator

slorber commented Jul 16, 2021

Going to merge this, but not 100% sure all this is a good idea in practice, maybe there will be other edge cases and we'll have only half support for baseurl 😅 anyway this shouldn't affect much users and a workaround would be easy

@slorber slorber merged commit 54e4b02 into master Jul 16, 2021
@slorber slorber deleted the lex111/pwa-head-part2 branch August 17, 2021 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: bug fix This PR fixes a bug in a past release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants