-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrocket.config.js
60 lines (53 loc) · 1.7 KB
/
rocket.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import helmet from "eleventy-plugin-helmet";
import { rocketLaunch } from "@rocket/launch";
import { rocketSearch } from "@rocket/search";
import { codeTabs } from "rocket-preset-code-tabs";
import { customElementsManifest } from "rocket-preset-custom-elements-manifest";
import { playgroundElements } from "rocket-preset-playground-elements";
import { absoluteBaseUrlNetlify } from "@rocket/core/helpers";
/** @type {import('@rocket/cli').RocketCliConfig} */
export default {
absoluteBaseUrl: absoluteBaseUrlNetlify("http://localhost:8080"),
presets: [
rocketLaunch(),
rocketSearch(),
codeTabs({
collections: {
packageManagers: {
npm: {
label: "NPM",
iconHref: "/_merged_assets/_static/logos/npm.svg",
},
yarn: {
label: "Yarn",
iconHref: "/_merged_assets/_static/logos/yarn.svg",
},
pnpm: {
label: "PNPM",
iconHref: "/_merged_assets/_static/logos/pnpm.svg",
},
},
},
}),
customElementsManifest({
package: "package.json",
}),
playgroundElements({
importMap: {
"@pionjs/pion": "https://cdn.pika.dev/@pionjs/pion",
"@pionjs/pion/core": "https://cdn.pika.dev/@pionjs/pion/core",
lighterhtml: "https://unpkg.com/lighterhtml?module",
},
}),
],
eleventy(eleventyConfig) {
eleventyConfig.addPlugin(helmet);
eleventyConfig.addWatchTarget("_assets/**/*.css");
eleventyConfig.addTransform("fix-noscript", (content) =>
content
.replace(/&#x3C;(link|style)/g, "<$1")
.replace(/&(link|style)/g, "<$1")
.replace(/<(link|style)/g, "<$1")
);
},
};