diff --git a/docs/en/docs/getting-started/_meta.json b/docs/en/docs/getting-started/_meta.json
index 1e1cd48..4d15793 100644
--- a/docs/en/docs/getting-started/_meta.json
+++ b/docs/en/docs/getting-started/_meta.json
@@ -8,8 +8,8 @@
"label": "Create Your First Extension"
},
{
- "name": "remote-extension-execution",
- "label": "Remote Extension Execution"
+ "name": "run-remote-extensions",
+ "label": "Run Remote Extensions"
},
{
"name": "templates",
diff --git a/docs/en/docs/getting-started/create-your-first-extension.mdx b/docs/en/docs/getting-started/create-your-first-extension.mdx
index f8e63d2..52220e5 100644
--- a/docs/en/docs/getting-started/create-your-first-extension.mdx
+++ b/docs/en/docs/getting-started/create-your-first-extension.mdx
@@ -8,13 +8,13 @@ Take a common task for some developers: searching on GitHub.
**The problem:** I want to search on GitHub in the most convenient way. Imagine searching GitHub projects directly from your browser's URL bar.
-The solution? Meet `github_search`, a tool that makes this possible.
+The solution? Meet github_search, a tool that makes this possible.

## The Plan
-Our goal is to make searching GitHub projects as easy as searching on Google. To avoid irrelevant searches when the user decides to search something else, let's reserve a keyword for our extension: if the user types "gh", followed by a tab click, will activate our extension to trigger our search.
+Our goal is to make searching GitHub projects as easy as searching on Google. To avoid irrelevant searches when the user decides to search for something else, let's reserve a keyword for our extension: if the user types "gh," followed by a tab click, it will activate our extension to trigger the search.

@@ -32,12 +32,11 @@ Let's use the Extension.js `create` command to bootstrap a minimal extension for
}}
/>
-## Step 1 - Create the manifest file
+## Step 2 - Create the manifest file
-> Step 1 Demo
+> Step 2 Demo
-Every extension starts with a manifest file. It tells the browser information about the extension's metadata, permissions, and files that the extension needs to run properly. Based on the [plan above](#plan), we want a custom search shortcut "gh" that will link us to GitHub search. We are also adding a service_worker script to handle user events logic.
+Every extension starts with a manifest file. It tells the browser information about the extension's metadata, permissions, and files that the extension needs to run properly. Based on the [plan above](#plan), we want a custom search shortcut "gh" that will link us to GitHub search. We are also adding a service worker script to handle user events logic.
-```jsx
+```json
{
"manifest_version": 3,
"name": "GitHub Search",
"version": "1.0",
- "omnibox": {"keyword" : "gh"},
+ "omnibox": { "keyword": "gh" },
"background": {
"service_worker": "service_worker.js"
}
}
```
-- `omnibox.keyword` when the keyword `gh` is set, an event will be fired.
-- `background.service_worker` will listen to the event that we just fired.
+- `omnibox.keyword`: When the keyword `gh` is set, an event will be fired.
+- `background.service_worker`: Will listen to the event that we just fired.
-## Step 2 - Create the Background Service Worker
+## Step 3 - Create the Background Service Worker
-In the context of a browser extension, the background service worker is where the extension can set listeners for all sorts of browser events.
+In the context of a browser extension, the background service worker is where the extension can set listeners for various browser events.
In our case, we need to add a script that listens to input events in the omnibox, so once the user types what they want to search, GitHub can return the correct data.
Let's create a `service_worker.js` file for this purpose:
```js
-// When the user has accepted what is typed into the omnibox.
+When the user has accepted what is typed into the omnibox.
chrome.omnibox.onInputEntered.addListener((text) => {
- // Convert any special character (spaces, &, ?, etc)
- // into a valid character for the URL format.
+ Convert any special character (spaces, &, ?, etc)
+ into a valid character for the URL format.
const encodedSearchText = encodeURIComponent(text);
const url = `https://github.com/search?q=${encodedSearchText}&type=issues`;
@@ -90,13 +89,12 @@ chrome.omnibox.onInputEntered.addListener((text) => {
The script above will open a new tab with GitHub search results whenever you enter something after "gh" in the URL bar.
-## Step 3 - Load Your Extension
+## Step 4 - Load Your Extension
If you take a look at your `package.json` file now, it looks more or less like this:
```json
{
- // ...your extension metadata
"scripts": {
"dev": "extension@latest dev",
"start": "extension start",
@@ -110,16 +108,19 @@ If you take a look at your `package.json` file now, it looks more or less like t
These scripts are the main scripts used by Extension.js for development mode. To preview your extension, let's run it for the first time.
-```
-npm run dev
-```
+
If all goes well, you should see a screen like the following: