mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-18 18:52:23 +02:00
feat(v2): Implement proof-of-concept Docusaurus Debug Dashboard (#2928)
* feat(v2): Implement proof-of-concept Docusaurus Debug Dashboard * Ensure we show the exact boolean
This commit is contained in:
parent
729b3cae9b
commit
6e37d3fb12
9 changed files with 127 additions and 0 deletions
31
packages/docusaurus-plugin-debug/src/index.ts
Normal file
31
packages/docusaurus-plugin-debug/src/index.ts
Normal file
|
@ -0,0 +1,31 @@
|
|||
/**
|
||||
* 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 {LoadContext, Plugin} from '@docusaurus/types';
|
||||
import {normalizeUrl} from '@docusaurus/utils';
|
||||
|
||||
import path from 'path';
|
||||
|
||||
export default function pluginContentPages({
|
||||
siteConfig: {baseUrl},
|
||||
}: LoadContext): Plugin<void> {
|
||||
return {
|
||||
name: 'docusaurus-plugin-debug',
|
||||
|
||||
getThemePath() {
|
||||
return path.resolve(__dirname, '../src/theme');
|
||||
},
|
||||
|
||||
contentLoaded({actions: {addRoute}}) {
|
||||
addRoute({
|
||||
path: normalizeUrl([baseUrl, '__docusaurus/debug']),
|
||||
component: '@theme/Debug',
|
||||
exact: true,
|
||||
});
|
||||
},
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue