mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-10 15:47:23 +02:00
* misc: convert all internal scripts to ESM * fixes * fix * fixes * fix! * complete eslint * more move * fix! * This looks better? * Final ones
33 lines
930 B
JavaScript
33 lines
930 B
JavaScript
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
import utils from '@docusaurus/utils';
|
|
|
|
/**
|
|
* @param {import('@docusaurus/types').LoadContext} context
|
|
* @returns {import('@docusaurus/types').Plugin}
|
|
*/
|
|
export default function FeatureRequestsPlugin(context) {
|
|
return {
|
|
name: 'feature-requests-plugin',
|
|
async contentLoaded({actions}) {
|
|
const basePath = utils.normalizeUrl([
|
|
context.baseUrl,
|
|
'/feature-requests',
|
|
]);
|
|
await actions.createData('paths.json', JSON.stringify(basePath));
|
|
actions.addRoute({
|
|
path: basePath,
|
|
exact: false,
|
|
component: '@site/src/featureRequests/FeatureRequestsPage',
|
|
modules: {
|
|
basePath: './feature-requests-plugin/default/paths.json',
|
|
},
|
|
});
|
|
},
|
|
};
|
|
}
|