Skip to content

Commit b41fc89

Browse files
committed
Going blue
1 parent e9c27be commit b41fc89

File tree

18 files changed

+89
-80
lines changed

18 files changed

+89
-80
lines changed

docs/en/blog/announcing-2-0-0-alpha.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ To me, "very easy" means very low cognitive effort. It means something is famili
2121

2222
The alpha release is focused on bug fixes and testing all existing features while we finish the documentation and templates websites. Keep an eye on this blog or follow us on X for future updates.
2323

24-
For the next release, we are going to focus on making all the existing features stable enough to document and test.
24+
For the next release, we are going to focus on making all the existing features stable enough to document and test.
2525

2626
Thanks for reading. Talk soon.
2727

docs/en/blog/announcing-2-0-0-beta.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
Extension.js is now officially in beta.
88

9-
Beta comes to stabilize the features introduced in the alpha release and to fix all known issues with the browser compatibility.
9+
Beta comes to stabilize the features introduced in the alpha release and to fix all known issues with the browser compatibility.
1010

1111
**Version 2.0.0-beta**
1212

docs/en/docs/commands/dev.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ Below is a breakdown of the available flags for the `dev` command:
5252
| `--polyfill` | Boolean | Enables compatibility for the `browser.*` API in Chromium-based browsers | `false` |
5353
| `--profile` | Profile path | Specifies a path to a browser profile for testing | `default` |
5454
| `-b, --browser` | Browser to run the extension | Specifies the browser to run (`chrome`, `edge`, `firefox`, `all`) | `"chrome"` |
55-
| `--chromium-binary` | Path to the Chromium binary | [Provides the path to a custom Chromium-based browser binary](../browsers/running-other-browsers.mdx) | `undefined` |
56-
| `--gecko-binary` | Path to the Gecko binary | [Provides the path to a custom Gecko-based browser binary](../browsers/running-other-browsers.mdx) | `undefined` |
55+
| `--chromium-binary` | Path to the Chromium binary | [Provides the path to a custom Chromium-based browser binary](../browsers/running-other-browsers.mdx) | `undefined` |
56+
| `--gecko-binary` | Path to the Gecko binary | [Provides the path to a custom Gecko-based browser binary](../browsers/running-other-browsers.mdx) | `undefined` |
5757
| `--starting-url` | URL | Starting URL for testing with the extension | `chrome://newtab` |
5858
| `--open` | Boolean | Whether or not to automatically open the browser upon starting dev | `true` |
5959

docs/en/docs/commands/preview.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ In this example, the extension is created in the `path/to/my-extension` director
4545
| [path or url] | The extension path or the remote extension URL | If a path is defined, previews the local extension. If a URL is provided, pulls the extension from remote source and previews it as a local extension | `process.cwd()` |
4646
| `--profile` | Profile path | Specifies a path to a browser profile for testing | `default` |
4747
| `-b, --browser` | Browser to run the extension | Specifies the browser to run (`chrome`, `edge`, `firefox`, `all`) | `"chrome"` |
48-
| `--chromium-binary` | Path to the Chromium binary | [Provides the path to a custom Chromium-based browser binary](../browsers/running-other-browsers.mdx) | `undefined` |
49-
| `--gecko-binary` | Path to the Gecko binary | [Provides the path to a custom Gecko-based browser binary](../browsers/running-other-browsers.mdx) | `undefined` |
48+
| `--chromium-binary` | Path to the Chromium binary | [Provides the path to a custom Chromium-based browser binary](../browsers/running-other-browsers.mdx) | `undefined` |
49+
| `--gecko-binary` | Path to the Gecko binary | [Provides the path to a custom Gecko-based browser binary](../browsers/running-other-browsers.mdx) | `undefined` |
5050
| `--starting-url` | URL | Starting URL for testing with the extension | `chrome://newtab` |
5151

5252
## Examples

docs/en/docs/features/_meta.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
"name": "cross-browser-compatibility",
44
"label": "Cross-Browser Compatibility"
55
},
6-
{ "name": "browser-specific-fields", "label": "Browser-Specific Manifest Fields" },
6+
{
7+
"name": "browser-specific-fields",
8+
"label": "Browser-Specific Manifest Fields"
9+
},
710
{
811
"name": "special-folders",
912
"label": "Special Folders (Off-Manifest assets)"

docs/en/docs/getting-started/create-your-first-extension.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ To improve our search results, let's add search suggestions directly in the URL
144144
Update the `service_worker.js` file to fetch suggestions from GitHub and display them as you type.
145145

146146
```js
147-
service_worker.js
147+
service_worker.js;
148148

149149
// Create a debounce function to avoid excessive
150150
// calls to the GitHub API while the user is still

docs/en/docs/hall-of-fame.mdx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,13 @@ Browser extensions are a powerful tool for extending the functionality of web br
1111

1212
## Contributors
1313

14-
<img src="https://contrib.rocks/image?repo=extension-js/extension.js" alt="Extension.js Core Contributors" />
15-
<img src="https://contrib.rocks/image?repo=extension-js/docs" alt="Extension.js Documentation Contributors" />
14+
<img
15+
src="https://contrib.rocks/image?repo=extension-js/extension.js"
16+
alt="Extension.js Core Contributors"
17+
/>
18+
<img
19+
src="https://contrib.rocks/image?repo=extension-js/docs"
20+
alt="Extension.js Documentation Contributors"
21+
/>
1622

1723
## Early Adopters

docs/public/logo-dark.png

5.97 KB
Loading

docs/public/logo-light.png

7.69 KB
Loading

postinstall-scripts.js

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,21 @@ const path = require("path");
33

44
function extractMetaDescription(mdxContent) {
55
// Split content into lines
6-
const lines = mdxContent.split('\n');
7-
let firstParagraph = '';
6+
const lines = mdxContent.split("\n");
7+
let firstParagraph = "";
88

99
// Find first valid paragraph
1010
for (let i = 0; i < lines.length; i++) {
1111
const line = lines[i].trim();
12-
12+
1313
// Skip empty lines, imports, components, headers and warnings
14-
if (!line ||
15-
line.startsWith('import') ||
16-
line.startsWith('<') ||
17-
line.startsWith('#') ||
18-
line.toLowerCase().includes('warning')) {
14+
if (
15+
!line ||
16+
line.startsWith("import") ||
17+
line.startsWith("<") ||
18+
line.startsWith("#") ||
19+
line.toLowerCase().includes("warning")
20+
) {
1921
continue;
2022
}
2123

@@ -33,18 +35,18 @@ function addOrUpdateMetaTags(filePath) {
3335
const canonicalURL = "https://extension.js.org/blog/";
3436

3537
// Check if this is a docs page
36-
const isDocsPage = filePath.includes('/docs/');
37-
38+
const isDocsPage = filePath.includes("/docs/");
39+
3840
// If it's a docs page, find corresponding MDX file
3941
let metaDescription = metaDescriptionContent;
4042
if (isDocsPage) {
4143
// Convert HTML path to MDX path
4244
const mdxPath = filePath
43-
.replace('doc_build', 'docs/en')
44-
.replace('.html', '.mdx');
45-
45+
.replace("doc_build", "docs/en")
46+
.replace(".html", ".mdx");
47+
4648
try {
47-
const mdxContent = fs.readFileSync(mdxPath, 'utf8');
49+
const mdxContent = fs.readFileSync(mdxPath, "utf8");
4850
const extractedDesc = extractMetaDescription(mdxContent);
4951
if (extractedDesc) {
5052
metaDescription = extractedDesc;
@@ -79,7 +81,7 @@ function addOrUpdateMetaTags(filePath) {
7981
// Update existing meta description
8082
data = data.replace(
8183
metaDescriptionRegex,
82-
`<meta name="description" content="${metaDescription}">`
84+
`<meta name="description" content="${metaDescription}">`,
8385
);
8486
} else {
8587
// Insert new meta description
@@ -96,7 +98,7 @@ function addOrUpdateMetaTags(filePath) {
9698
if (canonicalRegex.test(data)) {
9799
data = data.replace(
98100
canonicalRegex,
99-
`<link rel="canonical" href="${canonicalURL}">`
101+
`<link rel="canonical" href="${canonicalURL}">`,
100102
);
101103
} else {
102104
const newCanonicalTag = `<link rel="canonical" href="${canonicalURL}">\n`;
@@ -121,14 +123,14 @@ function addOrUpdateMetaTags(filePath) {
121123
// Process all files in doc_build directory
122124
function processDocBuild(dir) {
123125
const files = fs.readdirSync(dir);
124-
125-
files.forEach(file => {
126+
127+
files.forEach((file) => {
126128
const fullPath = path.join(dir, file);
127129
const stat = fs.statSync(fullPath);
128-
130+
129131
if (stat.isDirectory()) {
130132
processDocBuild(fullPath);
131-
} else if (file.endsWith('.html')) {
133+
} else if (file.endsWith(".html")) {
132134
addOrUpdateMetaTags(fullPath);
133135
}
134136
});

0 commit comments

Comments
 (0)