mirror of
https://github.com/modernweb-dev/rocket.git
synced 2026-03-10 15:53:30 +00:00
60 lines
1.7 KiB
JavaScript
60 lines
1.7 KiB
JavaScript
import { rocketLaunch } from '@rocket/launch';
|
|
import { rocketBlog } from '@rocket/blog';
|
|
import { rocketSearch } from '@rocket/search';
|
|
import { absoluteBaseUrlNetlify } from '@rocket/core/helpers';
|
|
import { adjustPluginOptions } from 'plugins-manager';
|
|
import { codeTabs } from 'rocket-preset-code-tabs';
|
|
import { customElementsManifest } from 'rocket-preset-custom-elements-manifest';
|
|
|
|
/** @type {import('./packages/cli/types/main').RocketCliOptions} */
|
|
export default {
|
|
absoluteBaseUrl: absoluteBaseUrlNetlify('http://localhost:8080'),
|
|
|
|
presets: [
|
|
rocketLaunch(),
|
|
rocketBlog(),
|
|
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(),
|
|
],
|
|
|
|
setupUnifiedPlugins: [
|
|
adjustPluginOptions('mdjsSetupCode', {
|
|
simulationSettings: {
|
|
simulatorUrl: '/simulator/',
|
|
themes: [
|
|
{ key: 'light', name: 'Light' },
|
|
{ key: 'dark', name: 'Dark' },
|
|
],
|
|
platforms: [
|
|
{ key: 'web', name: 'Web' },
|
|
{ key: 'android', name: 'Android' },
|
|
{ key: 'ios', name: 'iOS' },
|
|
],
|
|
},
|
|
}),
|
|
],
|
|
|
|
eleventy(eleventyConfig) {
|
|
eleventyConfig.addTransform('fix-noscript', content =>
|
|
content
|
|
.replace(/&#x3C;(link|style)/g, '<$1')
|
|
.replace(/&(link|style)/g, '<$1')
|
|
.replace(/<(link|style)/g, '<$1'),
|
|
);
|
|
},
|
|
|
|
// serviceWorkerName: 'sw.js',
|
|
// pathPrefix: '/_site/',
|
|
|
|
// emptyOutputDir: false,
|
|
};
|