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

translated page add-a-service-worker.md #40

Merged
merged 3 commits into from
Feb 15, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions docs/docs/add-a-service-worker.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,29 @@
title: Adding a Service Worker
arshadkazmi42 marked this conversation as resolved.
Show resolved Hide resolved
---

## What is a service worker
## service worker क्या है।
arshadkazmi42 marked this conversation as resolved.
Show resolved Hide resolved

A service worker is a script that your browser runs in the background, separate from a web page, opening the door to features that don't need a web page or user interaction. They increase your site availability in spotty connections, and are essential to making a nice user experience.
service worker एक स्क्रिप्ट है जो आपका ब्राउज़र पृष्ठभूमि में चलता है, एक वेब पेज से अलग होता है, उन सुविधाओं के लिए द्वार खोलता है जिन्हें वेब पेज या उपयोगकर्ता इंटरैक्शन की आवश्यकता नहीं है। वे धब्बेदार कनेक्शन में आपकी साइट की उपलब्धता बढ़ाते हैं, और एक अच्छा उपयोगकर्ता अनुभव बनाने के लिए आवश्यक हैं।
arshadkazmi42 marked this conversation as resolved.
Show resolved Hide resolved
arshadkazmi42 marked this conversation as resolved.
Show resolved Hide resolved
arshadkazmi42 marked this conversation as resolved.
Show resolved Hide resolved
arshadkazmi42 marked this conversation as resolved.
Show resolved Hide resolved

It supports features like push notifications and background sync.
यह पुश नोटिफिकेशन और बैकग्राउंड सिंक जैसी सुविधाओं का समर्थन करता है।

## Using service workers in Gatsby with `gatsby-plugin-offline`
## `gatsby-plugin-offline` साथ Gatsby में service workers का उपयोग करना।
arshadkazmi42 marked this conversation as resolved.
Show resolved Hide resolved

Gatsby provides awesome plugin interface to create and load a service worker into your site [gatsby-plugin-offline](https://www.npmjs.com/package/gatsby-plugin-offline).
Gatsby आपकी साइट में एक service worker बनाने और लोड करने के लिए अच्छा प्लगइन इंटरफ़ेस प्रदान करता है [gatsby-plugin-offline](https://www.npmjs.com/package/gatsby-plugin-offline).
arshadkazmi42 marked this conversation as resolved.
Show resolved Hide resolved
arshadkazmi42 marked this conversation as resolved.
Show resolved Hide resolved

You can use this plugin together with the [manifest plugin](https://www.npmjs.com/package/gatsby-plugin-manifest). (Don’t forget to list the offline plugin after the manifest plugin so that the manifest file can be included in the service worker).
आप इस प्लगइन का उपयोग एक साथ कर सकते हैं [manifest plugin](https://www.npmjs.com/package/gatsby-plugin-manifest). (मैनिफ़ेस्ट प्लगइन के बाद ऑफ़लाइन प्लगइन को सूचीबद्ध करना न भूलें ताकि मेनिफ़ेस्ट फ़ाइल को service worker में शामिल किया जा सके ).
arshadkazmi42 marked this conversation as resolved.
Show resolved Hide resolved

## Installing `gatsby-plugin-offline`
## `gatsby-plugin-offline` को इंस्टॉल करने के लिये
arshadkazmi42 marked this conversation as resolved.
Show resolved Hide resolved

`npm install --save gatsby-plugin-offline`

Add this plugin to your `gatsby-config.js`
इस प्लगइन को अपने `gatsby-config.js`में जोड़ें
arshadkazmi42 marked this conversation as resolved.
Show resolved Hide resolved

```javascript:title=gatsby-config.js
plugins: [`gatsby-plugin-offline`]
```

## References
## संदर्भ

- [Service Workers: an Introduction](https://developers.google.com/web/fundamentals/primers/service-workers/)
arshadkazmi42 marked this conversation as resolved.
Show resolved Hide resolved
- [Service Worker API](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API)
arshadkazmi42 marked this conversation as resolved.
Show resolved Hide resolved