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

Add support for Web App Manifest in siteConfig #934

Merged
merged 3 commits into from
Sep 2, 2018

Conversation

tirthbodawala
Copy link
Contributor

Motivation

To improve user experience and low load time for re-visiting users, I would like to include a service worker to make it a Progressive Web App. Adding service worker is easy with scripts in siteConfig but one would require manifest.json to be able to add it to the home screen. With the current code base, there is no extra field to add manifest.json to the head.

Thus have added an optional field manifest in siteConfig and update the lib/core/Head.js along with docs/api-site-config.md accordingly.

Test Plan

Well as the code implies if the config key exists then create the <link /> tag accordingly. No special test cases are required.

@facebook-github-bot
Copy link
Contributor

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@docusaurus-bot
Copy link
Contributor

docusaurus-bot commented Aug 31, 2018

Deploy preview for docusaurus-preview ready!

Built with commit fb8287b

https://deploy-preview-934--docusaurus-preview.netlify.com

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Aug 31, 2018
@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

Copy link
Contributor

@endiliey endiliey left a comment

Choose a reason for hiding this comment

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

Code-wise approved.

Just need extra opinion from @yangshun @JoelMarcey

Copy link
Contributor

@yangshun yangshun left a comment

Choose a reason for hiding this comment

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

Looks great! Thanks for adding this!

@yangshun yangshun merged commit 2cbfeff into facebook:master Sep 2, 2018
@tirthbodawala
Copy link
Contributor Author

I am glad I was able to contribute! Though it was just a small addition :)

@yangshun
Copy link
Contributor

yangshun commented Sep 3, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants