This commit is contained in:
2024-03-22 03:47:51 +05:30
parent 8bcf3d211e
commit 89819f6fe2
28440 changed files with 3211033 additions and 2 deletions

10
node_modules/@docusaurus/preset-classic/lib/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,10 @@
/**
* 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 type { Preset, LoadContext } from '@docusaurus/types';
import type { Options, ThemeConfig } from './options';
export default function preset(context: LoadContext, opts?: Options): Preset;
export type { Options, ThemeConfig };

62
node_modules/@docusaurus/preset-classic/lib/index.js generated vendored Normal file
View File

@@ -0,0 +1,62 @@
"use strict";
/**
* 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.
*/
Object.defineProperty(exports, "__esModule", { value: true });
function makePluginConfig(source, options) {
if (options) {
return [require.resolve(source), options];
}
return require.resolve(source);
}
function preset(context, opts = {}) {
const { siteConfig } = context;
const { themeConfig } = siteConfig;
const { algolia } = themeConfig;
const isProd = process.env.NODE_ENV === 'production';
const { debug, docs, blog, pages, sitemap, theme, googleAnalytics, gtag, googleTagManager, ...rest } = opts;
const themes = [];
themes.push(makePluginConfig('@docusaurus/theme-classic', theme));
if (algolia) {
themes.push(require.resolve('@docusaurus/theme-search-algolia'));
}
if ('gtag' in themeConfig) {
throw new Error('The "gtag" field in themeConfig should now be specified as option for plugin-google-gtag. For preset-classic, simply move themeConfig.gtag to preset options. More information at https://github.com/facebook/docusaurus/pull/5832.');
}
if ('googleAnalytics' in themeConfig) {
throw new Error('The "googleAnalytics" field in themeConfig should now be specified as option for plugin-google-analytics. For preset-classic, simply move themeConfig.googleAnalytics to preset options. More information at https://github.com/facebook/docusaurus/pull/5832.');
}
const plugins = [];
if (docs !== false) {
plugins.push(makePluginConfig('@docusaurus/plugin-content-docs', docs));
}
if (blog !== false) {
plugins.push(makePluginConfig('@docusaurus/plugin-content-blog', blog));
}
if (pages !== false) {
plugins.push(makePluginConfig('@docusaurus/plugin-content-pages', pages));
}
if (googleAnalytics) {
plugins.push(makePluginConfig('@docusaurus/plugin-google-analytics', googleAnalytics));
}
if (debug || (debug === undefined && !isProd)) {
plugins.push(require.resolve('@docusaurus/plugin-debug'));
}
if (gtag) {
plugins.push(makePluginConfig('@docusaurus/plugin-google-gtag', gtag));
}
if (googleTagManager) {
plugins.push(makePluginConfig('@docusaurus/plugin-google-tag-manager', googleTagManager));
}
if (isProd && sitemap !== false) {
plugins.push(makePluginConfig('@docusaurus/plugin-sitemap', sitemap));
}
if (Object.keys(rest).length > 0) {
throw new Error(`Unrecognized keys ${Object.keys(rest).join(', ')} found in preset-classic configuration. The allowed keys are debug, docs, blog, pages, sitemap, theme, googleAnalytics, gtag, and googleTagManager. Check the documentation: https://docusaurus.io/docs/using-plugins#docusauruspreset-classic for more information on how to configure individual plugins.`);
}
return { themes, plugins };
}
exports.default = preset;

View File

@@ -0,0 +1,46 @@
/**
* 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 type { Options as DocsPluginOptions } from '@docusaurus/plugin-content-docs';
import type { Options as BlogPluginOptions } from '@docusaurus/plugin-content-blog';
import type { Options as PagesPluginOptions } from '@docusaurus/plugin-content-pages';
import type { Options as SitemapPluginOptions } from '@docusaurus/plugin-sitemap';
import type { Options as GAPluginOptions } from '@docusaurus/plugin-google-analytics';
import type { Options as GtagPluginOptions } from '@docusaurus/plugin-google-gtag';
import type { Options as GTMPluginOptions } from '@docusaurus/plugin-google-tag-manager';
import type { Options as ThemeOptions } from '@docusaurus/theme-classic';
import type { ThemeConfig as BaseThemeConfig } from '@docusaurus/types';
import type { UserThemeConfig as ClassicThemeConfig } from '@docusaurus/theme-common';
import type { UserThemeConfig as AlgoliaThemeConfig } from '@docusaurus/theme-search-algolia';
export type Options = {
/**
* Options for `@docusaurus/plugin-debug`. Use `false` to disable, or `true`
* to enable even in production.
*/
debug?: boolean;
/** Options for `@docusaurus/plugin-content-docs`. Use `false` to disable. */
docs?: false | DocsPluginOptions;
/** Options for `@docusaurus/plugin-content-blog`. Use `false` to disable. */
blog?: false | BlogPluginOptions;
/** Options for `@docusaurus/plugin-content-pages`. Use `false` to disable. */
pages?: false | PagesPluginOptions;
/** Options for `@docusaurus/plugin-sitemap`. Use `false` to disable. */
sitemap?: false | SitemapPluginOptions;
/** Options for `@docusaurus/theme-classic`. */
theme?: ThemeOptions;
/**
* Options for `@docusaurus/plugin-google-analytics`. Only enabled when the
* key is present.
*/
googleAnalytics?: GAPluginOptions;
/**
* Options for `@docusaurus/plugin-google-gtag`. Only enabled when the key
* is present.
*/
gtag?: GtagPluginOptions;
googleTagManager?: GTMPluginOptions;
};
export type ThemeConfig = BaseThemeConfig & ClassicThemeConfig & AlgoliaThemeConfig;

View File

@@ -0,0 +1,8 @@
"use strict";
/**
* 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.
*/
Object.defineProperty(exports, "__esModule", { value: true });