mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-16 18:46:57 +02:00
feat(v2): add search page (#2756)
This commit is contained in:
parent
1fe2dc192e
commit
3ad4550854
12 changed files with 688 additions and 38 deletions
|
@ -46,6 +46,7 @@ import {
|
|||
} from './types';
|
||||
import {Configuration} from 'webpack';
|
||||
import {docsVersion} from './version';
|
||||
import {VERSIONS_JSON_FILE} from './constants';
|
||||
|
||||
const DEFAULT_OPTIONS: PluginOptions = {
|
||||
path: 'docs', // Path to data on filesystem, relative to site dir.
|
||||
|
@ -95,6 +96,10 @@ export default function pluginContentDocs(
|
|||
return {
|
||||
name: 'docusaurus-plugin-content-docs',
|
||||
|
||||
getThemePath() {
|
||||
return path.resolve(__dirname, './theme');
|
||||
},
|
||||
|
||||
extendCli(cli) {
|
||||
cli
|
||||
.command('docs:version')
|
||||
|
@ -418,7 +423,16 @@ export default function pluginContentDocs(
|
|||
configureWebpack(_config, isServer, utils) {
|
||||
const {getBabelLoader, getCacheLoader} = utils;
|
||||
const {rehypePlugins, remarkPlugins} = options;
|
||||
// Suppress warnings about non-existing of versions file.
|
||||
const stats = {
|
||||
warningsFilter: [VERSIONS_JSON_FILE],
|
||||
};
|
||||
|
||||
return {
|
||||
stats,
|
||||
devServer: {
|
||||
stats,
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
'~docs': dataDir,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue