mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-10 23:57:22 +02:00
chore: enable import/order rule (#7418)
This commit is contained in:
parent
a4c54aba45
commit
0838884f67
300 changed files with 712 additions and 727 deletions
30
.eslintrc.js
30
.eslintrc.js
|
@ -220,7 +220,35 @@ module.exports = {
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
'import/order': OFF,
|
'import/order': [
|
||||||
|
WARNING,
|
||||||
|
{
|
||||||
|
groups: [
|
||||||
|
'builtin',
|
||||||
|
'external',
|
||||||
|
'internal',
|
||||||
|
['parent', 'sibling', 'index'],
|
||||||
|
'type',
|
||||||
|
],
|
||||||
|
pathGroups: [
|
||||||
|
{pattern: '@jest/globals', group: 'builtin', position: 'before'},
|
||||||
|
{pattern: 'react', group: 'builtin', position: 'before'},
|
||||||
|
{pattern: 'fs-extra', group: 'builtin'},
|
||||||
|
{pattern: 'lodash', group: 'external', position: 'before'},
|
||||||
|
{pattern: 'clsx', group: 'external', position: 'before'},
|
||||||
|
// 'Bit weird to not use the `import/internal-regex` option, but this
|
||||||
|
// way, we can make `import type { Props } from "@theme/*"` appear
|
||||||
|
// before `import styles from "styles.module.css"`, which is what we
|
||||||
|
// always did. This should be removable once we stop using ambient
|
||||||
|
// module declarations for theme aliases.
|
||||||
|
{pattern: '@theme/**', group: 'internal'},
|
||||||
|
{pattern: '@site/**', group: 'internal'},
|
||||||
|
{pattern: '@theme-init/**', group: 'internal'},
|
||||||
|
{pattern: '@theme-original/**', group: 'internal'},
|
||||||
|
],
|
||||||
|
pathGroupsExcludedImportTypes: [],
|
||||||
|
},
|
||||||
|
],
|
||||||
'import/prefer-default-export': OFF,
|
'import/prefer-default-export': OFF,
|
||||||
|
|
||||||
'jest/consistent-test-it': WARNING,
|
'jest/consistent-test-it': WARNING,
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {Globby} from '@docusaurus/utils';
|
|
||||||
import fs from 'fs-extra';
|
import fs from 'fs-extra';
|
||||||
|
import {Globby} from '@docusaurus/utils';
|
||||||
|
|
||||||
type PackageJsonFile = {
|
type PackageJsonFile = {
|
||||||
file: string;
|
file: string;
|
||||||
|
|
|
@ -5,9 +5,8 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type {Handler} from '@netlify/functions';
|
|
||||||
|
|
||||||
import {createPlaygroundResponse} from '../functionUtils/playgroundUtils';
|
import {createPlaygroundResponse} from '../functionUtils/playgroundUtils';
|
||||||
|
import type {Handler} from '@netlify/functions';
|
||||||
|
|
||||||
export const handler: Handler = async function handler() {
|
export const handler: Handler = async function handler() {
|
||||||
return createPlaygroundResponse('codesandbox');
|
return createPlaygroundResponse('codesandbox');
|
||||||
|
|
|
@ -5,13 +5,12 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type {Handler} from '@netlify/functions';
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
readPlaygroundName,
|
readPlaygroundName,
|
||||||
createPlaygroundResponse,
|
createPlaygroundResponse,
|
||||||
createPlaygroundDocumentationResponse,
|
createPlaygroundDocumentationResponse,
|
||||||
} from '../functionUtils/playgroundUtils';
|
} from '../functionUtils/playgroundUtils';
|
||||||
|
import type {Handler} from '@netlify/functions';
|
||||||
|
|
||||||
export const handler: Handler = async (event) => {
|
export const handler: Handler = async (event) => {
|
||||||
const playgroundName = readPlaygroundName(event);
|
const playgroundName = readPlaygroundName(event);
|
||||||
|
|
|
@ -5,9 +5,8 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type {Handler} from '@netlify/functions';
|
|
||||||
|
|
||||||
import {createPlaygroundResponse} from '../functionUtils/playgroundUtils';
|
import {createPlaygroundResponse} from '../functionUtils/playgroundUtils';
|
||||||
|
import type {Handler} from '@netlify/functions';
|
||||||
|
|
||||||
export const handler: Handler = async function handler() {
|
export const handler: Handler = async function handler() {
|
||||||
return createPlaygroundResponse('stackblitz');
|
return createPlaygroundResponse('stackblitz');
|
||||||
|
|
|
@ -5,12 +5,12 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import sharp from 'sharp';
|
|
||||||
import fs from 'fs-extra';
|
import fs from 'fs-extra';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import imageSize from 'image-size';
|
|
||||||
import {fileURLToPath} from 'url';
|
import {fileURLToPath} from 'url';
|
||||||
import logger from '@docusaurus/logger';
|
import logger from '@docusaurus/logger';
|
||||||
|
import sharp from 'sharp';
|
||||||
|
import imageSize from 'image-size';
|
||||||
|
|
||||||
const allImages = (
|
const allImages = (
|
||||||
await fs.readdir(new URL('../../website/src/data/showcase', import.meta.url))
|
await fs.readdir(new URL('../../website/src/data/showcase', import.meta.url))
|
||||||
|
|
8
jest/snapshotPathNormalizer.ts
vendored
8
jest/snapshotPathNormalizer.ts
vendored
|
@ -8,13 +8,13 @@
|
||||||
// Forked from https://github.com/tribou/jest-serializer-path/blob/master/lib/index.js
|
// Forked from https://github.com/tribou/jest-serializer-path/blob/master/lib/index.js
|
||||||
// Added some project-specific handlers
|
// Added some project-specific handlers
|
||||||
|
|
||||||
import _ from 'lodash';
|
|
||||||
import {escapePath} from '@docusaurus/utils';
|
|
||||||
import stripAnsi from 'strip-ansi';
|
|
||||||
import {version} from '@docusaurus/core/package.json';
|
|
||||||
import os from 'os';
|
import os from 'os';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
|
import _ from 'lodash';
|
||||||
|
import {escapePath} from '@docusaurus/utils';
|
||||||
|
import {version} from '@docusaurus/core/package.json';
|
||||||
|
import stripAnsi from 'strip-ansi';
|
||||||
|
|
||||||
export function print(
|
export function print(
|
||||||
val: unknown,
|
val: unknown,
|
||||||
|
|
|
@ -8,11 +8,11 @@
|
||||||
|
|
||||||
// @ts-check
|
// @ts-check
|
||||||
|
|
||||||
|
import path from 'path';
|
||||||
|
import {createRequire} from 'module';
|
||||||
import logger from '@docusaurus/logger';
|
import logger from '@docusaurus/logger';
|
||||||
import semver from 'semver';
|
import semver from 'semver';
|
||||||
import path from 'path';
|
|
||||||
import {program} from 'commander';
|
import {program} from 'commander';
|
||||||
import {createRequire} from 'module';
|
|
||||||
|
|
||||||
const packageJson = createRequire(import.meta.url)('../package.json');
|
const packageJson = createRequire(import.meta.url)('../package.json');
|
||||||
const requiredVersion = packageJson.engines.node;
|
const requiredVersion = packageJson.engines.node;
|
||||||
|
|
|
@ -5,13 +5,13 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import logger from '@docusaurus/logger';
|
|
||||||
import fs from 'fs-extra';
|
import fs from 'fs-extra';
|
||||||
import {fileURLToPath} from 'url';
|
import {fileURLToPath} from 'url';
|
||||||
import prompts, {type Choice} from 'prompts';
|
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import shell from 'shelljs';
|
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
|
import logger from '@docusaurus/logger';
|
||||||
|
import shell from 'shelljs';
|
||||||
|
import prompts, {type Choice} from 'prompts';
|
||||||
import supportsColor from 'supports-color';
|
import supportsColor from 'supports-color';
|
||||||
|
|
||||||
type CLIOptions = {
|
type CLIOptions = {
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
import Layout from '@theme/Layout';
|
|
||||||
import Link from '@docusaurus/Link';
|
import Link from '@docusaurus/Link';
|
||||||
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
||||||
import styles from './index.module.css';
|
import Layout from '@theme/Layout';
|
||||||
import HomepageFeatures from '@site/src/components/HomepageFeatures';
|
import HomepageFeatures from '@site/src/components/HomepageFeatures';
|
||||||
|
|
||||||
|
import styles from './index.module.css';
|
||||||
|
|
||||||
function HomepageHeader() {
|
function HomepageHeader() {
|
||||||
const {siteConfig} = useDocusaurusContext();
|
const {siteConfig} = useDocusaurusContext();
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
import Layout from '@theme/Layout';
|
|
||||||
import Link from '@docusaurus/Link';
|
import Link from '@docusaurus/Link';
|
||||||
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
||||||
import styles from './index.module.css';
|
import Layout from '@theme/Layout';
|
||||||
import HomepageFeatures from '@site/src/components/HomepageFeatures';
|
import HomepageFeatures from '@site/src/components/HomepageFeatures';
|
||||||
|
|
||||||
|
import styles from './index.module.css';
|
||||||
|
|
||||||
function HomepageHeader() {
|
function HomepageHeader() {
|
||||||
const {siteConfig} = useDocusaurusContext();
|
const {siteConfig} = useDocusaurusContext();
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -6,21 +6,23 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import fs from 'fs-extra';
|
import fs from 'fs-extra';
|
||||||
import {createCompiler} from '@mdx-js/mdx';
|
|
||||||
import logger from '@docusaurus/logger';
|
import logger from '@docusaurus/logger';
|
||||||
import emoji from 'remark-emoji';
|
|
||||||
import {
|
import {
|
||||||
parseFrontMatter,
|
parseFrontMatter,
|
||||||
parseMarkdownContentTitle,
|
parseMarkdownContentTitle,
|
||||||
escapePath,
|
escapePath,
|
||||||
getFileLoaderUtils,
|
getFileLoaderUtils,
|
||||||
} from '@docusaurus/utils';
|
} from '@docusaurus/utils';
|
||||||
|
import {createCompiler} from '@mdx-js/mdx';
|
||||||
|
import emoji from 'remark-emoji';
|
||||||
import stringifyObject from 'stringify-object';
|
import stringifyObject from 'stringify-object';
|
||||||
|
|
||||||
import headings from './remark/headings';
|
import headings from './remark/headings';
|
||||||
import toc from './remark/toc';
|
import toc from './remark/toc';
|
||||||
import unwrapMdxCodeBlocks from './remark/unwrapMdxCodeBlocks';
|
import unwrapMdxCodeBlocks from './remark/unwrapMdxCodeBlocks';
|
||||||
import transformImage from './remark/transformImage';
|
import transformImage from './remark/transformImage';
|
||||||
import transformLinks from './remark/transformLinks';
|
import transformLinks from './remark/transformLinks';
|
||||||
|
|
||||||
import type {LoaderContext} from 'webpack';
|
import type {LoaderContext} from 'webpack';
|
||||||
import type {Processor, Plugin} from 'unified';
|
import type {Processor, Plugin} from 'unified';
|
||||||
|
|
||||||
|
|
|
@ -6,13 +6,13 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {parse, type ParserOptions} from '@babel/parser';
|
import {parse, type ParserOptions} from '@babel/parser';
|
||||||
import type {Identifier} from '@babel/types';
|
|
||||||
import traverse from '@babel/traverse';
|
import traverse from '@babel/traverse';
|
||||||
import stringifyObject from 'stringify-object';
|
import stringifyObject from 'stringify-object';
|
||||||
import toString from 'mdast-util-to-string';
|
import toString from 'mdast-util-to-string';
|
||||||
import visit from 'unist-util-visit';
|
import visit from 'unist-util-visit';
|
||||||
import {toValue} from '../utils';
|
import {toValue} from '../utils';
|
||||||
|
|
||||||
|
import type {Identifier} from '@babel/types';
|
||||||
import type {TOCItem} from '../..';
|
import type {TOCItem} from '../..';
|
||||||
import type {Node, Parent} from 'unist';
|
import type {Node, Parent} from 'unist';
|
||||||
import type {Heading, Literal} from 'mdast';
|
import type {Heading, Literal} from 'mdast';
|
||||||
|
|
|
@ -5,6 +5,11 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import path from 'path';
|
||||||
|
import url from 'url';
|
||||||
|
import fs from 'fs-extra';
|
||||||
|
import {promisify} from 'util';
|
||||||
|
import logger from '@docusaurus/logger';
|
||||||
import {
|
import {
|
||||||
toMessageRelativeFilePath,
|
toMessageRelativeFilePath,
|
||||||
posixPath,
|
posixPath,
|
||||||
|
@ -13,15 +18,10 @@ import {
|
||||||
findAsyncSequential,
|
findAsyncSequential,
|
||||||
} from '@docusaurus/utils';
|
} from '@docusaurus/utils';
|
||||||
import visit from 'unist-util-visit';
|
import visit from 'unist-util-visit';
|
||||||
import path from 'path';
|
|
||||||
import url from 'url';
|
|
||||||
import fs from 'fs-extra';
|
|
||||||
import escapeHtml from 'escape-html';
|
import escapeHtml from 'escape-html';
|
||||||
import sizeOf from 'image-size';
|
import sizeOf from 'image-size';
|
||||||
import {promisify} from 'util';
|
|
||||||
import type {Transformer} from 'unified';
|
import type {Transformer} from 'unified';
|
||||||
import type {Image, Literal} from 'mdast';
|
import type {Image, Literal} from 'mdast';
|
||||||
import logger from '@docusaurus/logger';
|
|
||||||
|
|
||||||
const {
|
const {
|
||||||
loaders: {inlineMarkdownImageFileLoader},
|
loaders: {inlineMarkdownImageFileLoader},
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import path from 'path';
|
||||||
|
import url from 'url';
|
||||||
|
import fs from 'fs-extra';
|
||||||
import {
|
import {
|
||||||
toMessageRelativeFilePath,
|
toMessageRelativeFilePath,
|
||||||
posixPath,
|
posixPath,
|
||||||
|
@ -13,9 +16,6 @@ import {
|
||||||
findAsyncSequential,
|
findAsyncSequential,
|
||||||
} from '@docusaurus/utils';
|
} from '@docusaurus/utils';
|
||||||
import visit from 'unist-util-visit';
|
import visit from 'unist-util-visit';
|
||||||
import path from 'path';
|
|
||||||
import url from 'url';
|
|
||||||
import fs from 'fs-extra';
|
|
||||||
import escapeHtml from 'escape-html';
|
import escapeHtml from 'escape-html';
|
||||||
import {stringifyContent} from '../utils';
|
import {stringifyContent} from '../utils';
|
||||||
import type {Transformer} from 'unified';
|
import type {Transformer} from 'unified';
|
||||||
|
|
|
@ -8,11 +8,11 @@
|
||||||
|
|
||||||
// @ts-check
|
// @ts-check
|
||||||
|
|
||||||
|
import path from 'path';
|
||||||
|
import {createRequire} from 'module';
|
||||||
import logger from '@docusaurus/logger';
|
import logger from '@docusaurus/logger';
|
||||||
import semver from 'semver';
|
import semver from 'semver';
|
||||||
import cli from 'commander';
|
import cli from 'commander';
|
||||||
import path from 'path';
|
|
||||||
import {createRequire} from 'module';
|
|
||||||
|
|
||||||
const moduleRequire = createRequire(import.meta.url);
|
const moduleRequire = createRequire(import.meta.url);
|
||||||
const requiredVersion = moduleRequire('../package.json').engines.node;
|
const requiredVersion = moduleRequire('../package.json').engines.node;
|
||||||
|
|
|
@ -6,10 +6,10 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {jest} from '@jest/globals';
|
import {jest} from '@jest/globals';
|
||||||
import {migrateDocusaurusProject} from '../index';
|
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import fs from 'fs-extra';
|
import fs from 'fs-extra';
|
||||||
import {posixPath} from '@docusaurus/utils';
|
import {posixPath} from '@docusaurus/utils';
|
||||||
|
import {migrateDocusaurusProject} from '../index';
|
||||||
|
|
||||||
async function testMigration(siteDir: string, newDir: string) {
|
async function testMigration(siteDir: string, newDir: string) {
|
||||||
const writeMock = jest.spyOn(fs, 'outputFile').mockImplementation(() => {});
|
const writeMock = jest.spyOn(fs, 'outputFile').mockImplementation(() => {});
|
||||||
|
|
|
@ -5,22 +5,23 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import path from 'path';
|
||||||
import fs from 'fs-extra';
|
import fs from 'fs-extra';
|
||||||
import importFresh from 'import-fresh';
|
|
||||||
import logger from '@docusaurus/logger';
|
import logger from '@docusaurus/logger';
|
||||||
import {Globby} from '@docusaurus/utils';
|
import {Globby} from '@docusaurus/utils';
|
||||||
|
import importFresh from 'import-fresh';
|
||||||
import Color from 'color';
|
import Color from 'color';
|
||||||
|
|
||||||
|
import extractMetadata, {shouldQuotifyFrontMatter} from './frontMatter';
|
||||||
|
import migratePage from './transform';
|
||||||
|
import sanitizeMD from './sanitizeMD';
|
||||||
|
|
||||||
import type {
|
import type {
|
||||||
SidebarEntry,
|
SidebarEntry,
|
||||||
SidebarEntries,
|
SidebarEntries,
|
||||||
VersionOneConfig,
|
VersionOneConfig,
|
||||||
VersionTwoConfig,
|
VersionTwoConfig,
|
||||||
} from './types';
|
} from './types';
|
||||||
import extractMetadata, {shouldQuotifyFrontMatter} from './frontMatter';
|
|
||||||
import migratePage from './transform';
|
|
||||||
import sanitizeMD from './sanitizeMD';
|
|
||||||
import path from 'path';
|
|
||||||
|
|
||||||
const DOCUSAURUS_VERSION = (importFresh('../package.json') as {version: string})
|
const DOCUSAURUS_VERSION = (importFresh('../package.json') as {version: string})
|
||||||
.version;
|
.version;
|
||||||
|
|
|
@ -136,8 +136,8 @@ declare module '@docusaurus/ErrorBoundary' {
|
||||||
}
|
}
|
||||||
|
|
||||||
declare module '@docusaurus/Head' {
|
declare module '@docusaurus/Head' {
|
||||||
import type {HelmetProps} from 'react-helmet-async';
|
|
||||||
import type {ReactNode} from 'react';
|
import type {ReactNode} from 'react';
|
||||||
|
import type {HelmetProps} from 'react-helmet-async';
|
||||||
|
|
||||||
export type Props = HelmetProps & {children: ReactNode};
|
export type Props = HelmetProps & {children: ReactNode};
|
||||||
|
|
||||||
|
|
|
@ -5,12 +5,12 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type {PluginContext} from '../types';
|
|
||||||
import collectRedirects from '../collectRedirects';
|
|
||||||
import {validateOptions} from '../options';
|
|
||||||
import {removeTrailingSlash} from '@docusaurus/utils';
|
import {removeTrailingSlash} from '@docusaurus/utils';
|
||||||
import {normalizePluginOptions} from '@docusaurus/utils-validation';
|
import {normalizePluginOptions} from '@docusaurus/utils-validation';
|
||||||
|
import collectRedirects from '../collectRedirects';
|
||||||
|
import {validateOptions} from '../options';
|
||||||
import type {Options} from '../options';
|
import type {Options} from '../options';
|
||||||
|
import type {PluginContext} from '../types';
|
||||||
|
|
||||||
function createTestPluginContext(
|
function createTestPluginContext(
|
||||||
options?: Options,
|
options?: Options,
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {validateOptions, DEFAULT_OPTIONS} from '../options';
|
|
||||||
import {normalizePluginOptions} from '@docusaurus/utils-validation';
|
import {normalizePluginOptions} from '@docusaurus/utils-validation';
|
||||||
|
import {validateOptions, DEFAULT_OPTIONS} from '../options';
|
||||||
import type {Options} from '../options';
|
import type {Options} from '../options';
|
||||||
|
|
||||||
function testValidate(options: Options) {
|
function testValidate(options: Options) {
|
||||||
|
|
|
@ -6,19 +6,18 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import type {PluginOptions, RedirectOption} from './options';
|
import logger from '@docusaurus/logger';
|
||||||
import type {PluginContext, RedirectMetadata} from './types';
|
import {
|
||||||
|
applyTrailingSlash,
|
||||||
|
type ApplyTrailingSlashParams,
|
||||||
|
} from '@docusaurus/utils-common';
|
||||||
import {
|
import {
|
||||||
createFromExtensionsRedirects,
|
createFromExtensionsRedirects,
|
||||||
createToExtensionsRedirects,
|
createToExtensionsRedirects,
|
||||||
} from './extensionRedirects';
|
} from './extensionRedirects';
|
||||||
import {validateRedirect} from './redirectValidation';
|
import {validateRedirect} from './redirectValidation';
|
||||||
import {
|
import type {PluginOptions, RedirectOption} from './options';
|
||||||
applyTrailingSlash,
|
import type {PluginContext, RedirectMetadata} from './types';
|
||||||
type ApplyTrailingSlashParams,
|
|
||||||
} from '@docusaurus/utils-common';
|
|
||||||
|
|
||||||
import logger from '@docusaurus/logger';
|
|
||||||
|
|
||||||
export default function collectRedirects(
|
export default function collectRedirects(
|
||||||
pluginContext: PluginContext,
|
pluginContext: PluginContext,
|
||||||
|
|
|
@ -5,9 +5,9 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import _ from 'lodash';
|
||||||
import * as eta from 'eta';
|
import * as eta from 'eta';
|
||||||
import redirectPageTemplate from './templates/redirectPage.template.html';
|
import redirectPageTemplate from './templates/redirectPage.template.html';
|
||||||
import _ from 'lodash';
|
|
||||||
|
|
||||||
const getCompiledRedirectPageTemplate = _.memoize(() =>
|
const getCompiledRedirectPageTemplate = _.memoize(() =>
|
||||||
eta.compile(redirectPageTemplate.trim()),
|
eta.compile(redirectPageTemplate.trim()),
|
||||||
|
|
|
@ -5,16 +5,15 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type {LoadContext, Plugin} from '@docusaurus/types';
|
import {removePrefix, addLeadingSlash} from '@docusaurus/utils';
|
||||||
import type {PluginContext, RedirectMetadata} from './types';
|
|
||||||
import type {PluginOptions, Options} from './options';
|
|
||||||
|
|
||||||
import collectRedirects from './collectRedirects';
|
import collectRedirects from './collectRedirects';
|
||||||
import writeRedirectFiles, {
|
import writeRedirectFiles, {
|
||||||
toRedirectFilesMetadata,
|
toRedirectFilesMetadata,
|
||||||
type RedirectFileMetadata,
|
type RedirectFileMetadata,
|
||||||
} from './writeRedirectFiles';
|
} from './writeRedirectFiles';
|
||||||
import {removePrefix, addLeadingSlash} from '@docusaurus/utils';
|
import type {LoadContext, Plugin} from '@docusaurus/types';
|
||||||
|
import type {PluginContext, RedirectMetadata} from './types';
|
||||||
|
import type {PluginOptions, Options} from './options';
|
||||||
|
|
||||||
export default function pluginClientRedirectsPages(
|
export default function pluginClientRedirectsPages(
|
||||||
context: LoadContext,
|
context: LoadContext,
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type {OptionValidationContext} from '@docusaurus/types';
|
|
||||||
import {Joi, PathnameSchema} from '@docusaurus/utils-validation';
|
import {Joi, PathnameSchema} from '@docusaurus/utils-validation';
|
||||||
|
import type {OptionValidationContext} from '@docusaurus/types';
|
||||||
|
|
||||||
export type RedirectOption = {
|
export type RedirectOption = {
|
||||||
to: string;
|
to: string;
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type {RedirectMetadata} from './types';
|
|
||||||
import {Joi, PathnameSchema} from '@docusaurus/utils-validation';
|
import {Joi, PathnameSchema} from '@docusaurus/utils-validation';
|
||||||
|
import type {RedirectMetadata} from './types';
|
||||||
|
|
||||||
const RedirectSchema = Joi.object<RedirectMetadata>({
|
const RedirectSchema = Joi.object<RedirectMetadata>({
|
||||||
from: PathnameSchema.required(),
|
from: PathnameSchema.required(),
|
||||||
|
|
|
@ -8,11 +8,12 @@
|
||||||
import fs from 'fs-extra';
|
import fs from 'fs-extra';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
|
import logger from '@docusaurus/logger';
|
||||||
|
import {normalizeUrl} from '@docusaurus/utils';
|
||||||
|
|
||||||
|
import createRedirectPageContent from './createRedirectPageContent';
|
||||||
|
|
||||||
import type {PluginContext, RedirectMetadata} from './types';
|
import type {PluginContext, RedirectMetadata} from './types';
|
||||||
import createRedirectPageContent from './createRedirectPageContent';
|
|
||||||
import {normalizeUrl} from '@docusaurus/utils';
|
|
||||||
import logger from '@docusaurus/logger';
|
|
||||||
|
|
||||||
export type WriteFilesPluginContext = Pick<PluginContext, 'baseUrl' | 'outDir'>;
|
export type WriteFilesPluginContext = Pick<PluginContext, 'baseUrl' | 'outDir'>;
|
||||||
|
|
||||||
|
|
|
@ -5,13 +5,13 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import path from 'path';
|
||||||
import {
|
import {
|
||||||
type AuthorsMap,
|
type AuthorsMap,
|
||||||
getAuthorsMap,
|
getAuthorsMap,
|
||||||
getBlogPostAuthors,
|
getBlogPostAuthors,
|
||||||
validateAuthorsMap,
|
validateAuthorsMap,
|
||||||
} from '../authors';
|
} from '../authors';
|
||||||
import path from 'path';
|
|
||||||
|
|
||||||
describe('getBlogPostAuthors', () => {
|
describe('getBlogPostAuthors', () => {
|
||||||
it('can read no authors', () => {
|
it('can read no authors', () => {
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {jest} from '@jest/globals';
|
import {jest} from '@jest/globals';
|
||||||
|
import fs from 'fs-extra';
|
||||||
|
import path from 'path';
|
||||||
import {
|
import {
|
||||||
truncate,
|
truncate,
|
||||||
parseBlogFileName,
|
parseBlogFileName,
|
||||||
|
@ -14,13 +16,8 @@ import {
|
||||||
paginateBlogPosts,
|
paginateBlogPosts,
|
||||||
type LinkifyParams,
|
type LinkifyParams,
|
||||||
} from '../blogUtils';
|
} from '../blogUtils';
|
||||||
import fs from 'fs-extra';
|
import type {BlogBrokenMarkdownLink, BlogContentPaths} from '../types';
|
||||||
import path from 'path';
|
import type {BlogPost} from '@docusaurus/plugin-content-blog';
|
||||||
import type {
|
|
||||||
BlogBrokenMarkdownLink,
|
|
||||||
BlogContentPaths,
|
|
||||||
BlogPost,
|
|
||||||
} from '../types';
|
|
||||||
|
|
||||||
describe('truncate', () => {
|
describe('truncate', () => {
|
||||||
it('truncates texts', () => {
|
it('truncates texts', () => {
|
||||||
|
|
|
@ -8,11 +8,11 @@
|
||||||
import {jest} from '@jest/globals';
|
import {jest} from '@jest/globals';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import fs from 'fs-extra';
|
import fs from 'fs-extra';
|
||||||
|
import {DEFAULT_OPTIONS} from '../options';
|
||||||
|
import {generateBlogPosts} from '../blogUtils';
|
||||||
import {createBlogFeedFiles} from '../feed';
|
import {createBlogFeedFiles} from '../feed';
|
||||||
import type {LoadContext, I18n} from '@docusaurus/types';
|
import type {LoadContext, I18n} from '@docusaurus/types';
|
||||||
import type {BlogContentPaths} from '../types';
|
import type {BlogContentPaths} from '../types';
|
||||||
import {DEFAULT_OPTIONS} from '../options';
|
|
||||||
import {generateBlogPosts} from '../blogUtils';
|
|
||||||
import type {PluginOptions} from '@docusaurus/plugin-content-blog';
|
import type {PluginOptions} from '@docusaurus/plugin-content-blog';
|
||||||
|
|
||||||
const DefaultI18N: I18n = {
|
const DefaultI18N: I18n = {
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {validateBlogPostFrontMatter} from '../frontMatter';
|
|
||||||
import escapeStringRegexp from 'escape-string-regexp';
|
import escapeStringRegexp from 'escape-string-regexp';
|
||||||
|
import {validateBlogPostFrontMatter} from '../frontMatter';
|
||||||
import type {BlogPostFrontMatter} from '@docusaurus/plugin-content-blog';
|
import type {BlogPostFrontMatter} from '@docusaurus/plugin-content-blog';
|
||||||
|
|
||||||
// TODO this abstraction reduce verbosity but it makes it harder to debug
|
// TODO this abstraction reduce verbosity but it makes it harder to debug
|
||||||
|
|
|
@ -7,13 +7,13 @@
|
||||||
|
|
||||||
import {jest} from '@jest/globals';
|
import {jest} from '@jest/globals';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import pluginContentBlog from '../index';
|
|
||||||
import type {DocusaurusConfig, LoadContext, I18n} from '@docusaurus/types';
|
|
||||||
import {validateOptions} from '../options';
|
|
||||||
import type {BlogPost} from '../types';
|
|
||||||
import {normalizePluginOptions} from '@docusaurus/utils-validation';
|
import {normalizePluginOptions} from '@docusaurus/utils-validation';
|
||||||
import {posixPath, getFileCommitDate} from '@docusaurus/utils';
|
import {posixPath, getFileCommitDate} from '@docusaurus/utils';
|
||||||
|
import pluginContentBlog from '../index';
|
||||||
|
import {validateOptions} from '../options';
|
||||||
|
import type {DocusaurusConfig, LoadContext, I18n} from '@docusaurus/types';
|
||||||
import type {
|
import type {
|
||||||
|
BlogPost,
|
||||||
PluginOptions,
|
PluginOptions,
|
||||||
EditUrlFunction,
|
EditUrlFunction,
|
||||||
} from '@docusaurus/plugin-content-blog';
|
} from '@docusaurus/plugin-content-blog';
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {validateOptions, DEFAULT_OPTIONS} from '../options';
|
|
||||||
import {normalizePluginOptions} from '@docusaurus/utils-validation';
|
import {normalizePluginOptions} from '@docusaurus/utils-validation';
|
||||||
|
import {validateOptions, DEFAULT_OPTIONS} from '../options';
|
||||||
import type {Options} from '@docusaurus/plugin-content-blog';
|
import type {Options} from '@docusaurus/plugin-content-blog';
|
||||||
|
|
||||||
function testValidate(options: Options) {
|
function testValidate(options: Options) {
|
||||||
|
|
|
@ -5,11 +5,14 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type {BlogPost, BlogContent} from '../types';
|
import {updateTranslationFileMessages} from '@docusaurus/utils';
|
||||||
import {getTranslationFiles, translateContent} from '../translations';
|
import {getTranslationFiles, translateContent} from '../translations';
|
||||||
import {DEFAULT_OPTIONS} from '../options';
|
import {DEFAULT_OPTIONS} from '../options';
|
||||||
import {updateTranslationFileMessages} from '@docusaurus/utils';
|
import type {
|
||||||
import type {PluginOptions} from '@docusaurus/plugin-content-blog';
|
PluginOptions,
|
||||||
|
BlogPost,
|
||||||
|
BlogContent,
|
||||||
|
} from '@docusaurus/plugin-content-blog';
|
||||||
|
|
||||||
const sampleBlogOptions: PluginOptions = {
|
const sampleBlogOptions: PluginOptions = {
|
||||||
...DEFAULT_OPTIONS,
|
...DEFAULT_OPTIONS,
|
||||||
|
|
|
@ -5,9 +5,9 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type {BlogContentPaths} from './types';
|
|
||||||
import {getDataFileData} from '@docusaurus/utils';
|
import {getDataFileData} from '@docusaurus/utils';
|
||||||
import {Joi, URISchema} from '@docusaurus/utils-validation';
|
import {Joi, URISchema} from '@docusaurus/utils-validation';
|
||||||
|
import type {BlogContentPaths} from './types';
|
||||||
import type {
|
import type {
|
||||||
Author,
|
Author,
|
||||||
BlogPostFrontMatter,
|
BlogPostFrontMatter,
|
||||||
|
|
|
@ -7,9 +7,9 @@
|
||||||
|
|
||||||
import fs from 'fs-extra';
|
import fs from 'fs-extra';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import readingTime from 'reading-time';
|
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import type {BlogContentPaths, BlogMarkdownLoaderOptions} from './types';
|
import logger from '@docusaurus/logger';
|
||||||
|
import readingTime from 'reading-time';
|
||||||
import {
|
import {
|
||||||
parseMarkdownString,
|
parseMarkdownString,
|
||||||
normalizeUrl,
|
normalizeUrl,
|
||||||
|
@ -24,10 +24,9 @@ import {
|
||||||
getFileCommitDate,
|
getFileCommitDate,
|
||||||
getContentPathList,
|
getContentPathList,
|
||||||
} from '@docusaurus/utils';
|
} from '@docusaurus/utils';
|
||||||
import type {LoadContext} from '@docusaurus/types';
|
|
||||||
import {validateBlogPostFrontMatter} from './frontMatter';
|
import {validateBlogPostFrontMatter} from './frontMatter';
|
||||||
import {type AuthorsMap, getAuthorsMap, getBlogPostAuthors} from './authors';
|
import {type AuthorsMap, getAuthorsMap, getBlogPostAuthors} from './authors';
|
||||||
import logger from '@docusaurus/logger';
|
import type {LoadContext} from '@docusaurus/types';
|
||||||
import type {
|
import type {
|
||||||
PluginOptions,
|
PluginOptions,
|
||||||
ReadingTimeFunction,
|
ReadingTimeFunction,
|
||||||
|
@ -35,6 +34,7 @@ import type {
|
||||||
BlogTags,
|
BlogTags,
|
||||||
BlogPaginated,
|
BlogPaginated,
|
||||||
} from '@docusaurus/plugin-content-blog';
|
} from '@docusaurus/plugin-content-blog';
|
||||||
|
import type {BlogContentPaths, BlogMarkdownLoaderOptions} from './types';
|
||||||
|
|
||||||
export function truncate(fileString: string, truncateMarker: RegExp): string {
|
export function truncate(fileString: string, truncateMarker: RegExp): string {
|
||||||
return fileString.split(truncateMarker, 1).shift()!;
|
return fileString.split(truncateMarker, 1).shift()!;
|
||||||
|
|
|
@ -5,20 +5,20 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {Feed, type Author as FeedAuthor, type Item as FeedItem} from 'feed';
|
|
||||||
import {normalizeUrl, readOutputHTMLFile} from '@docusaurus/utils';
|
|
||||||
import {load as cheerioLoad} from 'cheerio';
|
|
||||||
import type {DocusaurusConfig} from '@docusaurus/types';
|
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import fs from 'fs-extra';
|
import fs from 'fs-extra';
|
||||||
|
import logger from '@docusaurus/logger';
|
||||||
|
import {Feed, type Author as FeedAuthor, type Item as FeedItem} from 'feed';
|
||||||
|
import {normalizeUrl, readOutputHTMLFile} from '@docusaurus/utils';
|
||||||
|
import {blogPostContainerID} from '@docusaurus/utils-common';
|
||||||
|
import {load as cheerioLoad} from 'cheerio';
|
||||||
|
import type {DocusaurusConfig} from '@docusaurus/types';
|
||||||
import type {
|
import type {
|
||||||
FeedType,
|
FeedType,
|
||||||
PluginOptions,
|
PluginOptions,
|
||||||
Author,
|
Author,
|
||||||
BlogPost,
|
BlogPost,
|
||||||
} from '@docusaurus/plugin-content-blog';
|
} from '@docusaurus/plugin-content-blog';
|
||||||
import {blogPostContainerID} from '@docusaurus/utils-common';
|
|
||||||
import logger from '@docusaurus/logger';
|
|
||||||
|
|
||||||
async function generateBlogFeed({
|
async function generateBlogFeed({
|
||||||
blogPosts,
|
blogPosts,
|
||||||
|
|
|
@ -6,8 +6,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import admonitions from 'remark-admonitions';
|
|
||||||
import footnoteIDFixer from './remark/footnoteIDFixer';
|
|
||||||
import {
|
import {
|
||||||
normalizeUrl,
|
normalizeUrl,
|
||||||
docuHash,
|
docuHash,
|
||||||
|
@ -23,17 +21,19 @@ import {
|
||||||
type TagsListItem,
|
type TagsListItem,
|
||||||
type TagModule,
|
type TagModule,
|
||||||
} from '@docusaurus/utils';
|
} from '@docusaurus/utils';
|
||||||
import {translateContent, getTranslationFiles} from './translations';
|
import admonitions from 'remark-admonitions';
|
||||||
|
|
||||||
import type {BlogContentPaths, BlogMarkdownLoaderOptions} from './types';
|
|
||||||
import type {LoadContext, Plugin, HtmlTags} from '@docusaurus/types';
|
|
||||||
import {
|
import {
|
||||||
generateBlogPosts,
|
generateBlogPosts,
|
||||||
getSourceToPermalink,
|
getSourceToPermalink,
|
||||||
getBlogTags,
|
getBlogTags,
|
||||||
paginateBlogPosts,
|
paginateBlogPosts,
|
||||||
} from './blogUtils';
|
} from './blogUtils';
|
||||||
|
import footnoteIDFixer from './remark/footnoteIDFixer';
|
||||||
|
import {translateContent, getTranslationFiles} from './translations';
|
||||||
import {createBlogFeedFiles} from './feed';
|
import {createBlogFeedFiles} from './feed';
|
||||||
|
|
||||||
|
import type {BlogContentPaths, BlogMarkdownLoaderOptions} from './types';
|
||||||
|
import type {LoadContext, Plugin, HtmlTags} from '@docusaurus/types';
|
||||||
import type {
|
import type {
|
||||||
PluginOptions,
|
PluginOptions,
|
||||||
BlogPostFrontMatter,
|
BlogPostFrontMatter,
|
||||||
|
|
|
@ -538,11 +538,11 @@ declare module '@theme/BlogTagsListPage' {
|
||||||
}
|
}
|
||||||
|
|
||||||
declare module '@theme/BlogTagsPostsPage' {
|
declare module '@theme/BlogTagsPostsPage' {
|
||||||
|
import type {Content} from '@theme/BlogPostPage';
|
||||||
import type {
|
import type {
|
||||||
BlogSidebar,
|
BlogSidebar,
|
||||||
BlogPaginatedMetadata,
|
BlogPaginatedMetadata,
|
||||||
} from '@docusaurus/plugin-content-blog';
|
} from '@docusaurus/plugin-content-blog';
|
||||||
import type {Content} from '@theme/BlogPostPage';
|
|
||||||
import type {TagModule} from '@docusaurus/utils';
|
import type {TagModule} from '@docusaurus/utils';
|
||||||
|
|
||||||
export interface Props {
|
export interface Props {
|
||||||
|
|
Binary file not shown.
|
@ -8,6 +8,8 @@
|
||||||
import {jest} from '@jest/globals';
|
import {jest} from '@jest/globals';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import {loadContext} from '@docusaurus/core/src/server/index';
|
import {loadContext} from '@docusaurus/core/src/server/index';
|
||||||
|
import {createSlugger, posixPath, DEFAULT_PLUGIN_ID} from '@docusaurus/utils';
|
||||||
|
import {createSidebarsUtils} from '../sidebars/utils';
|
||||||
import {
|
import {
|
||||||
processDocMetadata,
|
processDocMetadata,
|
||||||
readVersionDocs,
|
readVersionDocs,
|
||||||
|
@ -17,8 +19,9 @@ import {
|
||||||
type DocEnv,
|
type DocEnv,
|
||||||
} from '../docs';
|
} from '../docs';
|
||||||
import {loadSidebars} from '../sidebars';
|
import {loadSidebars} from '../sidebars';
|
||||||
import type {Sidebars} from '../sidebars/types';
|
|
||||||
import {readVersionsMetadata} from '../versions';
|
import {readVersionsMetadata} from '../versions';
|
||||||
|
import {DEFAULT_OPTIONS} from '../options';
|
||||||
|
import type {Sidebars} from '../sidebars/types';
|
||||||
import type {DocFile} from '../types';
|
import type {DocFile} from '../types';
|
||||||
import type {
|
import type {
|
||||||
MetadataOptions,
|
MetadataOptions,
|
||||||
|
@ -29,10 +32,7 @@ import type {
|
||||||
PropNavigationLink,
|
PropNavigationLink,
|
||||||
} from '@docusaurus/plugin-content-docs';
|
} from '@docusaurus/plugin-content-docs';
|
||||||
import type {LoadContext} from '@docusaurus/types';
|
import type {LoadContext} from '@docusaurus/types';
|
||||||
import {DEFAULT_OPTIONS} from '../options';
|
|
||||||
import type {Optional} from 'utility-types';
|
import type {Optional} from 'utility-types';
|
||||||
import {createSlugger, posixPath, DEFAULT_PLUGIN_ID} from '@docusaurus/utils';
|
|
||||||
import {createSidebarsUtils} from '../sidebars/utils';
|
|
||||||
|
|
||||||
jest.setTimeout(15000);
|
jest.setTimeout(15000);
|
||||||
|
|
||||||
|
|
|
@ -5,9 +5,9 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import escapeStringRegexp from 'escape-string-regexp';
|
||||||
import {validateDocFrontMatter} from '../frontMatter';
|
import {validateDocFrontMatter} from '../frontMatter';
|
||||||
import type {DocFrontMatter} from '@docusaurus/plugin-content-docs';
|
import type {DocFrontMatter} from '@docusaurus/plugin-content-docs';
|
||||||
import escapeStringRegexp from 'escape-string-regexp';
|
|
||||||
|
|
||||||
function testField(params: {
|
function testField(params: {
|
||||||
prefix: string;
|
prefix: string;
|
||||||
|
|
|
@ -7,32 +7,27 @@
|
||||||
|
|
||||||
import {jest} from '@jest/globals';
|
import {jest} from '@jest/globals';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
import fs from 'fs-extra';
|
||||||
|
import _ from 'lodash';
|
||||||
import {isMatch} from 'picomatch';
|
import {isMatch} from 'picomatch';
|
||||||
import commander from 'commander';
|
import commander from 'commander';
|
||||||
import _ from 'lodash';
|
import webpack from 'webpack';
|
||||||
|
|
||||||
import fs from 'fs-extra';
|
|
||||||
import pluginContentDocs from '../index';
|
|
||||||
import {loadContext} from '@docusaurus/core/src/server/index';
|
import {loadContext} from '@docusaurus/core/src/server/index';
|
||||||
import {applyConfigureWebpack} from '@docusaurus/core/src/webpack/utils';
|
import {applyConfigureWebpack} from '@docusaurus/core/src/webpack/utils';
|
||||||
import type {RouteConfig} from '@docusaurus/types';
|
|
||||||
import {posixPath} from '@docusaurus/utils';
|
|
||||||
import {sortConfig} from '@docusaurus/core/src/server/plugins/routeConfig';
|
import {sortConfig} from '@docusaurus/core/src/server/plugins/routeConfig';
|
||||||
|
import {posixPath} from '@docusaurus/utils';
|
||||||
import * as cliDocs from '../cli';
|
|
||||||
import {validateOptions} from '../options';
|
|
||||||
import {normalizePluginOptions} from '@docusaurus/utils-validation';
|
import {normalizePluginOptions} from '@docusaurus/utils-validation';
|
||||||
import type {LoadedVersion} from '../types';
|
|
||||||
import type {
|
|
||||||
SidebarItem,
|
|
||||||
SidebarItemsGeneratorOption,
|
|
||||||
SidebarItemsGeneratorOptionArgs,
|
|
||||||
} from '../sidebars/types';
|
|
||||||
import {toSidebarsProp} from '../props';
|
|
||||||
|
|
||||||
import webpack from 'webpack';
|
import pluginContentDocs from '../index';
|
||||||
|
import {toSidebarsProp} from '../props';
|
||||||
import {DefaultSidebarItemsGenerator} from '../sidebars/generator';
|
import {DefaultSidebarItemsGenerator} from '../sidebars/generator';
|
||||||
import {DisabledSidebars} from '../sidebars';
|
import {DisabledSidebars} from '../sidebars';
|
||||||
|
import * as cliDocs from '../cli';
|
||||||
|
import {validateOptions} from '../options';
|
||||||
|
|
||||||
|
import type {RouteConfig} from '@docusaurus/types';
|
||||||
|
import type {LoadedVersion} from '@docusaurus/plugin-content-docs';
|
||||||
|
import type {SidebarItem, SidebarItemsGeneratorOption} from '../sidebars/types';
|
||||||
|
|
||||||
function findDocById(version: LoadedVersion, unversionedId: string) {
|
function findDocById(version: LoadedVersion, unversionedId: string) {
|
||||||
return version.docs.find((item) => item.unversionedId === unversionedId);
|
return version.docs.find((item) => item.unversionedId === unversionedId);
|
||||||
|
@ -768,14 +763,14 @@ describe('site with custom sidebar items generator', () => {
|
||||||
const customSidebarItemsGeneratorMock = jest.fn(async () => []);
|
const customSidebarItemsGeneratorMock = jest.fn(async () => []);
|
||||||
const {siteDir} = await loadSite(customSidebarItemsGeneratorMock);
|
const {siteDir} = await loadSite(customSidebarItemsGeneratorMock);
|
||||||
|
|
||||||
const generatorArg: SidebarItemsGeneratorOptionArgs =
|
const generatorArg: Parameters<SidebarItemsGeneratorOption>[0] =
|
||||||
customSidebarItemsGeneratorMock.mock.calls[0][0];
|
customSidebarItemsGeneratorMock.mock.calls[0][0];
|
||||||
|
|
||||||
// Make test pass even if docs are in different order and paths are
|
// Make test pass even if docs are in different order and paths are
|
||||||
// absolutes
|
// absolutes
|
||||||
function makeDeterministic(
|
function makeDeterministic(
|
||||||
arg: SidebarItemsGeneratorOptionArgs,
|
arg: Parameters<SidebarItemsGeneratorOption>[0],
|
||||||
): SidebarItemsGeneratorOptionArgs {
|
): Parameters<SidebarItemsGeneratorOption>[0] {
|
||||||
return {
|
return {
|
||||||
...arg,
|
...arg,
|
||||||
docs: _.orderBy(arg.docs, 'id'),
|
docs: _.orderBy(arg.docs, 'id'),
|
||||||
|
|
|
@ -5,11 +5,11 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {createTempRepo} from '@testing-utils/git';
|
|
||||||
import {jest} from '@jest/globals';
|
import {jest} from '@jest/globals';
|
||||||
import fs from 'fs-extra';
|
import fs from 'fs-extra';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import shell from 'shelljs';
|
import shell from 'shelljs';
|
||||||
|
import {createTempRepo} from '@testing-utils/git';
|
||||||
|
|
||||||
import {getFileLastUpdate} from '../lastUpdate';
|
import {getFileLastUpdate} from '../lastUpdate';
|
||||||
|
|
||||||
|
|
|
@ -5,14 +5,14 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {validateOptions, DEFAULT_OPTIONS} from '../options';
|
import {GlobExcludeDefault} from '@docusaurus/utils';
|
||||||
import {normalizePluginOptions} from '@docusaurus/utils-validation';
|
import {normalizePluginOptions} from '@docusaurus/utils-validation';
|
||||||
|
import {validateOptions, DEFAULT_OPTIONS} from '../options';
|
||||||
import {DefaultSidebarItemsGenerator} from '../sidebars/generator';
|
import {DefaultSidebarItemsGenerator} from '../sidebars/generator';
|
||||||
import {
|
import {
|
||||||
DefaultNumberPrefixParser,
|
DefaultNumberPrefixParser,
|
||||||
DisabledNumberPrefixParser,
|
DisabledNumberPrefixParser,
|
||||||
} from '../numberPrefix';
|
} from '../numberPrefix';
|
||||||
import {GlobExcludeDefault} from '@docusaurus/utils';
|
|
||||||
import type {Options} from '@docusaurus/plugin-content-docs';
|
import type {Options} from '@docusaurus/plugin-content-docs';
|
||||||
|
|
||||||
// The type of remark/rehype plugins can be function/object
|
// The type of remark/rehype plugins can be function/object
|
||||||
|
|
|
@ -5,14 +5,17 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type {LoadedContent, LoadedVersion} from '../types';
|
import {updateTranslationFileMessages} from '@docusaurus/utils';
|
||||||
import {CURRENT_VERSION_NAME} from '../constants';
|
import {CURRENT_VERSION_NAME} from '../constants';
|
||||||
import {
|
import {
|
||||||
getLoadedContentTranslationFiles,
|
getLoadedContentTranslationFiles,
|
||||||
translateLoadedContent,
|
translateLoadedContent,
|
||||||
} from '../translations';
|
} from '../translations';
|
||||||
import type {DocMetadata} from '@docusaurus/plugin-content-docs';
|
import type {
|
||||||
import {updateTranslationFileMessages} from '@docusaurus/utils';
|
DocMetadata,
|
||||||
|
LoadedContent,
|
||||||
|
LoadedVersion,
|
||||||
|
} from '@docusaurus/plugin-content-docs';
|
||||||
|
|
||||||
function createSampleDoc(doc: Pick<DocMetadata, 'id'>): DocMetadata {
|
function createSampleDoc(doc: Pick<DocMetadata, 'id'>): DocMetadata {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -5,13 +5,13 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import {type SidebarsUtils, toNavigationLink} from './sidebars/utils';
|
||||||
|
import {createDocsByIdIndex} from './docs';
|
||||||
import type {
|
import type {
|
||||||
CategoryGeneratedIndexMetadata,
|
CategoryGeneratedIndexMetadata,
|
||||||
DocMetadataBase,
|
DocMetadataBase,
|
||||||
} from '@docusaurus/plugin-content-docs';
|
} from '@docusaurus/plugin-content-docs';
|
||||||
import type {SidebarItemCategoryWithGeneratedIndex} from './sidebars/types';
|
import type {SidebarItemCategoryWithGeneratedIndex} from './sidebars/types';
|
||||||
import {type SidebarsUtils, toNavigationLink} from './sidebars/utils';
|
|
||||||
import {createDocsByIdIndex} from './docs';
|
|
||||||
|
|
||||||
function getCategoryGeneratedIndexMetadata({
|
function getCategoryGeneratedIndexMetadata({
|
||||||
category,
|
category,
|
||||||
|
|
|
@ -5,6 +5,10 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import fs from 'fs-extra';
|
||||||
|
import path from 'path';
|
||||||
|
import logger from '@docusaurus/logger';
|
||||||
|
import {DEFAULT_PLUGIN_ID} from '@docusaurus/utils';
|
||||||
import {
|
import {
|
||||||
getVersionsFilePath,
|
getVersionsFilePath,
|
||||||
getVersionDocsDirPath,
|
getVersionDocsDirPath,
|
||||||
|
@ -12,13 +16,9 @@ import {
|
||||||
getDocsDirPathLocalized,
|
getDocsDirPathLocalized,
|
||||||
} from './versions/files';
|
} from './versions/files';
|
||||||
import {validateVersionName} from './versions/validation';
|
import {validateVersionName} from './versions/validation';
|
||||||
import fs from 'fs-extra';
|
|
||||||
import path from 'path';
|
|
||||||
import type {PluginOptions} from '@docusaurus/plugin-content-docs';
|
|
||||||
import {loadSidebarsFileUnsafe} from './sidebars';
|
import {loadSidebarsFileUnsafe} from './sidebars';
|
||||||
import {CURRENT_VERSION_NAME} from './constants';
|
import {CURRENT_VERSION_NAME} from './constants';
|
||||||
import {DEFAULT_PLUGIN_ID} from '@docusaurus/utils';
|
import type {PluginOptions} from '@docusaurus/plugin-content-docs';
|
||||||
import logger from '@docusaurus/logger';
|
|
||||||
import type {LoadContext} from '@docusaurus/types';
|
import type {LoadContext} from '@docusaurus/types';
|
||||||
|
|
||||||
async function createVersionedSidebarFile({
|
async function createVersionedSidebarFile({
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import _ from 'lodash';
|
||||||
import {
|
import {
|
||||||
getActivePlugin,
|
getActivePlugin,
|
||||||
getLatestVersion,
|
getLatestVersion,
|
||||||
|
@ -17,7 +18,6 @@ import type {
|
||||||
GlobalVersion,
|
GlobalVersion,
|
||||||
ActivePlugin,
|
ActivePlugin,
|
||||||
} from '@docusaurus/plugin-content-docs/client';
|
} from '@docusaurus/plugin-content-docs/client';
|
||||||
import _ from 'lodash';
|
|
||||||
|
|
||||||
describe('docsClientUtils', () => {
|
describe('docsClientUtils', () => {
|
||||||
it('getActivePlugin', () => {
|
it('getActivePlugin', () => {
|
||||||
|
|
|
@ -19,15 +19,12 @@ import {
|
||||||
Globby,
|
Globby,
|
||||||
normalizeFrontMatterTags,
|
normalizeFrontMatterTags,
|
||||||
} from '@docusaurus/utils';
|
} from '@docusaurus/utils';
|
||||||
import type {LoadContext} from '@docusaurus/types';
|
|
||||||
|
|
||||||
import {getFileLastUpdate} from './lastUpdate';
|
import {getFileLastUpdate} from './lastUpdate';
|
||||||
import type {DocFile} from './types';
|
|
||||||
import getSlug from './slug';
|
import getSlug from './slug';
|
||||||
import {CURRENT_VERSION_NAME} from './constants';
|
import {CURRENT_VERSION_NAME} from './constants';
|
||||||
import {stripPathNumberPrefixes} from './numberPrefix';
|
import {stripPathNumberPrefixes} from './numberPrefix';
|
||||||
import {validateDocFrontMatter} from './frontMatter';
|
import {validateDocFrontMatter} from './frontMatter';
|
||||||
import type {SidebarsUtils} from './sidebars/utils';
|
|
||||||
import {toDocNavigationLink, toNavigationLink} from './sidebars/utils';
|
import {toDocNavigationLink, toNavigationLink} from './sidebars/utils';
|
||||||
import type {
|
import type {
|
||||||
MetadataOptions,
|
MetadataOptions,
|
||||||
|
@ -41,6 +38,9 @@ import type {
|
||||||
DocFrontMatter,
|
DocFrontMatter,
|
||||||
LoadedVersion,
|
LoadedVersion,
|
||||||
} from '@docusaurus/plugin-content-docs';
|
} from '@docusaurus/plugin-content-docs';
|
||||||
|
import type {LoadContext} from '@docusaurus/types';
|
||||||
|
import type {SidebarsUtils} from './sidebars/utils';
|
||||||
|
import type {DocFile} from './types';
|
||||||
|
|
||||||
type LastUpdateOptions = Pick<
|
type LastUpdateOptions = Pick<
|
||||||
PluginOptions,
|
PluginOptions,
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import type {Sidebars} from './sidebars/types';
|
|
||||||
import {getMainDocId} from './docs';
|
import {getMainDocId} from './docs';
|
||||||
import type {FullVersion} from './types';
|
import type {FullVersion} from './types';
|
||||||
import type {
|
import type {
|
||||||
|
@ -18,6 +17,7 @@ import type {
|
||||||
GlobalSidebar,
|
GlobalSidebar,
|
||||||
GlobalDoc,
|
GlobalDoc,
|
||||||
} from '@docusaurus/plugin-content-docs/client';
|
} from '@docusaurus/plugin-content-docs/client';
|
||||||
|
import type {Sidebars} from './sidebars/types';
|
||||||
|
|
||||||
function toGlobalDataDoc(doc: DocMetadata): GlobalDoc {
|
function toGlobalDataDoc(doc: DocMetadata): GlobalDoc {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -6,7 +6,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
import _ from 'lodash';
|
||||||
|
import logger from '@docusaurus/logger';
|
||||||
import {
|
import {
|
||||||
normalizeUrl,
|
normalizeUrl,
|
||||||
docuHash,
|
docuHash,
|
||||||
|
@ -19,20 +20,15 @@ import {
|
||||||
createSlugger,
|
createSlugger,
|
||||||
DEFAULT_PLUGIN_ID,
|
DEFAULT_PLUGIN_ID,
|
||||||
} from '@docusaurus/utils';
|
} from '@docusaurus/utils';
|
||||||
import type {LoadContext, Plugin} from '@docusaurus/types';
|
|
||||||
import {loadSidebars, resolveSidebarPathOption} from './sidebars';
|
import {loadSidebars, resolveSidebarPathOption} from './sidebars';
|
||||||
import {CategoryMetadataFilenamePattern} from './sidebars/generator';
|
import {CategoryMetadataFilenamePattern} from './sidebars/generator';
|
||||||
import type {DocEnv} from './docs';
|
import {
|
||||||
import {readVersionDocs, processDocMetadata, addDocNavigation} from './docs';
|
readVersionDocs,
|
||||||
|
processDocMetadata,
|
||||||
|
addDocNavigation,
|
||||||
|
type DocEnv,
|
||||||
|
} from './docs';
|
||||||
import {readVersionsMetadata} from './versions';
|
import {readVersionsMetadata} from './versions';
|
||||||
import type {
|
|
||||||
SourceToPermalink,
|
|
||||||
DocFile,
|
|
||||||
DocsMarkdownOption,
|
|
||||||
VersionTag,
|
|
||||||
FullVersion,
|
|
||||||
} from './types';
|
|
||||||
import type {RuleSetRule} from 'webpack';
|
|
||||||
import {cliDocsVersionCommand} from './cli';
|
import {cliDocsVersionCommand} from './cli';
|
||||||
import {VERSIONS_JSON_FILE} from './constants';
|
import {VERSIONS_JSON_FILE} from './constants';
|
||||||
import {toGlobalDataVersion} from './globalData';
|
import {toGlobalDataVersion} from './globalData';
|
||||||
|
@ -42,9 +38,10 @@ import {
|
||||||
translateLoadedContent,
|
translateLoadedContent,
|
||||||
getLoadedContentTranslationFiles,
|
getLoadedContentTranslationFiles,
|
||||||
} from './translations';
|
} from './translations';
|
||||||
import logger from '@docusaurus/logger';
|
|
||||||
import {getVersionTags} from './tags';
|
import {getVersionTags} from './tags';
|
||||||
import {createVersionRoutes} from './routes';
|
import {createVersionRoutes} from './routes';
|
||||||
|
import {createSidebarsUtils} from './sidebars/utils';
|
||||||
|
|
||||||
import type {
|
import type {
|
||||||
PropTagsListPage,
|
PropTagsListPage,
|
||||||
PluginOptions,
|
PluginOptions,
|
||||||
|
@ -54,8 +51,15 @@ import type {
|
||||||
LoadedContent,
|
LoadedContent,
|
||||||
LoadedVersion,
|
LoadedVersion,
|
||||||
} from '@docusaurus/plugin-content-docs';
|
} from '@docusaurus/plugin-content-docs';
|
||||||
import {createSidebarsUtils} from './sidebars/utils';
|
import type {LoadContext, Plugin} from '@docusaurus/types';
|
||||||
import _ from 'lodash';
|
import type {
|
||||||
|
SourceToPermalink,
|
||||||
|
DocFile,
|
||||||
|
DocsMarkdownOption,
|
||||||
|
VersionTag,
|
||||||
|
FullVersion,
|
||||||
|
} from './types';
|
||||||
|
import type {RuleSetRule} from 'webpack';
|
||||||
|
|
||||||
export default async function pluginContentDocs(
|
export default async function pluginContentDocs(
|
||||||
context: LoadContext,
|
context: LoadContext,
|
||||||
|
|
|
@ -9,13 +9,13 @@ import {jest} from '@jest/globals';
|
||||||
import fs from 'fs-extra';
|
import fs from 'fs-extra';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import {linkify} from '../linkify';
|
import {linkify} from '../linkify';
|
||||||
|
import {VERSIONED_DOCS_DIR, CURRENT_VERSION_NAME} from '../../constants';
|
||||||
import type {
|
import type {
|
||||||
DocsMarkdownOption,
|
DocsMarkdownOption,
|
||||||
SourceToPermalink,
|
SourceToPermalink,
|
||||||
DocBrokenMarkdownLink,
|
DocBrokenMarkdownLink,
|
||||||
} from '../../types';
|
} from '../../types';
|
||||||
import type {VersionMetadata} from '@docusaurus/plugin-content-docs';
|
import type {VersionMetadata} from '@docusaurus/plugin-content-docs';
|
||||||
import {VERSIONED_DOCS_DIR, CURRENT_VERSION_NAME} from '../../constants';
|
|
||||||
|
|
||||||
function createFakeVersion({
|
function createFakeVersion({
|
||||||
versionName,
|
versionName,
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type {DocsMarkdownOption} from '../types';
|
|
||||||
import {replaceMarkdownLinks, getContentPathList} from '@docusaurus/utils';
|
import {replaceMarkdownLinks, getContentPathList} from '@docusaurus/utils';
|
||||||
|
import type {DocsMarkdownOption} from '../types';
|
||||||
|
|
||||||
function getVersion(filePath: string, options: DocsMarkdownOption) {
|
function getVersion(filePath: string, options: DocsMarkdownOption) {
|
||||||
const versionFound = options.versionsMetadata.find((version) =>
|
const versionFound = options.versionsMetadata.find((version) =>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type {PluginOptions, Options} from '@docusaurus/plugin-content-docs';
|
import logger from '@docusaurus/logger';
|
||||||
import {
|
import {
|
||||||
Joi,
|
Joi,
|
||||||
RemarkPluginsSchema,
|
RemarkPluginsSchema,
|
||||||
|
@ -14,15 +14,14 @@ import {
|
||||||
URISchema,
|
URISchema,
|
||||||
} from '@docusaurus/utils-validation';
|
} from '@docusaurus/utils-validation';
|
||||||
import {GlobExcludeDefault} from '@docusaurus/utils';
|
import {GlobExcludeDefault} from '@docusaurus/utils';
|
||||||
|
|
||||||
import type {OptionValidationContext} from '@docusaurus/types';
|
|
||||||
import logger from '@docusaurus/logger';
|
|
||||||
import admonitions from 'remark-admonitions';
|
import admonitions from 'remark-admonitions';
|
||||||
import {DefaultSidebarItemsGenerator} from './sidebars/generator';
|
import {DefaultSidebarItemsGenerator} from './sidebars/generator';
|
||||||
import {
|
import {
|
||||||
DefaultNumberPrefixParser,
|
DefaultNumberPrefixParser,
|
||||||
DisabledNumberPrefixParser,
|
DisabledNumberPrefixParser,
|
||||||
} from './numberPrefix';
|
} from './numberPrefix';
|
||||||
|
import type {OptionValidationContext} from '@docusaurus/types';
|
||||||
|
import type {PluginOptions, Options} from '@docusaurus/plugin-content-docs';
|
||||||
|
|
||||||
export const DEFAULT_OPTIONS: Omit<PluginOptions, 'id' | 'sidebarPath'> = {
|
export const DEFAULT_OPTIONS: Omit<PluginOptions, 'id' | 'sidebarPath'> = {
|
||||||
path: 'docs', // Path to data on filesystem, relative to site dir.
|
path: 'docs', // Path to data on filesystem, relative to site dir.
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import _ from 'lodash';
|
||||||
|
import {createDocsByIdIndex} from './docs';
|
||||||
import type {VersionTag} from './types';
|
import type {VersionTag} from './types';
|
||||||
import type {
|
import type {
|
||||||
SidebarItemDoc,
|
SidebarItemDoc,
|
||||||
|
@ -24,8 +26,6 @@ import type {
|
||||||
DocMetadata,
|
DocMetadata,
|
||||||
LoadedVersion,
|
LoadedVersion,
|
||||||
} from '@docusaurus/plugin-content-docs';
|
} from '@docusaurus/plugin-content-docs';
|
||||||
import _ from 'lodash';
|
|
||||||
import {createDocsByIdIndex} from './docs';
|
|
||||||
|
|
||||||
export function toSidebarsProp(loadedVersion: LoadedVersion): PropSidebars {
|
export function toSidebarsProp(loadedVersion: LoadedVersion): PropSidebars {
|
||||||
const docsById = createDocsByIdIndex(loadedVersion.docs);
|
const docsById = createDocsByIdIndex(loadedVersion.docs);
|
||||||
|
|
|
@ -5,15 +5,15 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type {PluginContentLoadedActions, RouteConfig} from '@docusaurus/types';
|
import logger from '@docusaurus/logger';
|
||||||
import {docuHash, createSlugger} from '@docusaurus/utils';
|
import {docuHash, createSlugger} from '@docusaurus/utils';
|
||||||
|
import {toVersionMetadataProp} from './props';
|
||||||
|
import type {PluginContentLoadedActions, RouteConfig} from '@docusaurus/types';
|
||||||
import type {FullVersion} from './types';
|
import type {FullVersion} from './types';
|
||||||
import type {
|
import type {
|
||||||
CategoryGeneratedIndexMetadata,
|
CategoryGeneratedIndexMetadata,
|
||||||
DocMetadata,
|
DocMetadata,
|
||||||
} from '@docusaurus/plugin-content-docs';
|
} from '@docusaurus/plugin-content-docs';
|
||||||
import {toVersionMetadataProp} from './props';
|
|
||||||
import logger from '@docusaurus/logger';
|
|
||||||
|
|
||||||
export async function createCategoryGeneratedIndexRoutes({
|
export async function createCategoryGeneratedIndexRoutes({
|
||||||
version,
|
version,
|
||||||
|
|
|
@ -7,9 +7,9 @@
|
||||||
|
|
||||||
import {jest} from '@jest/globals';
|
import {jest} from '@jest/globals';
|
||||||
import {DefaultSidebarItemsGenerator} from '../generator';
|
import {DefaultSidebarItemsGenerator} from '../generator';
|
||||||
import type {SidebarItemsGenerator} from '../types';
|
|
||||||
import {DefaultNumberPrefixParser} from '../../numberPrefix';
|
import {DefaultNumberPrefixParser} from '../../numberPrefix';
|
||||||
import {isCategoryIndex} from '../../docs';
|
import {isCategoryIndex} from '../../docs';
|
||||||
|
import type {SidebarItemsGenerator} from '../types';
|
||||||
|
|
||||||
describe('DefaultSidebarItemsGenerator', () => {
|
describe('DefaultSidebarItemsGenerator', () => {
|
||||||
function testDefaultSidebarItemsGenerator(
|
function testDefaultSidebarItemsGenerator(
|
||||||
|
|
|
@ -9,8 +9,8 @@ import {jest} from '@jest/globals';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import {createSlugger} from '@docusaurus/utils';
|
import {createSlugger} from '@docusaurus/utils';
|
||||||
import {loadSidebars, DisabledSidebars} from '../index';
|
import {loadSidebars, DisabledSidebars} from '../index';
|
||||||
import type {SidebarProcessorParams} from '../types';
|
|
||||||
import {DefaultSidebarItemsGenerator} from '../generator';
|
import {DefaultSidebarItemsGenerator} from '../generator';
|
||||||
|
import type {SidebarProcessorParams} from '../types';
|
||||||
import type {DocMetadata} from '@docusaurus/plugin-content-docs';
|
import type {DocMetadata} from '@docusaurus/plugin-content-docs';
|
||||||
|
|
||||||
describe('loadSidebars', () => {
|
describe('loadSidebars', () => {
|
||||||
|
|
|
@ -6,7 +6,11 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {jest} from '@jest/globals';
|
import {jest} from '@jest/globals';
|
||||||
|
import {createSlugger} from '@docusaurus/utils';
|
||||||
import {processSidebars} from '../processor';
|
import {processSidebars} from '../processor';
|
||||||
|
import {DefaultSidebarItemsGenerator} from '../generator';
|
||||||
|
import {DefaultNumberPrefixParser} from '../../numberPrefix';
|
||||||
|
import {isCategoryIndex} from '../../docs';
|
||||||
import type {
|
import type {
|
||||||
SidebarItem,
|
SidebarItem,
|
||||||
SidebarItemsGenerator,
|
SidebarItemsGenerator,
|
||||||
|
@ -16,11 +20,7 @@ import type {
|
||||||
CategoryMetadataFile,
|
CategoryMetadataFile,
|
||||||
ProcessedSidebars,
|
ProcessedSidebars,
|
||||||
} from '../types';
|
} from '../types';
|
||||||
import {DefaultSidebarItemsGenerator} from '../generator';
|
|
||||||
import {createSlugger} from '@docusaurus/utils';
|
|
||||||
import type {VersionMetadata} from '@docusaurus/plugin-content-docs';
|
import type {VersionMetadata} from '@docusaurus/plugin-content-docs';
|
||||||
import {DefaultNumberPrefixParser} from '../../numberPrefix';
|
|
||||||
import {isCategoryIndex} from '../../docs';
|
|
||||||
|
|
||||||
describe('processSidebars', () => {
|
describe('processSidebars', () => {
|
||||||
function createStaticSidebarItemGenerator(
|
function createStaticSidebarItemGenerator(
|
||||||
|
|
|
@ -5,6 +5,11 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import path from 'path';
|
||||||
|
import _ from 'lodash';
|
||||||
|
import logger from '@docusaurus/logger';
|
||||||
|
import {addTrailingSlash} from '@docusaurus/utils';
|
||||||
|
import {createDocsByIdIndex, toCategoryIndexMatcherParam} from '../docs';
|
||||||
import type {
|
import type {
|
||||||
SidebarItemDoc,
|
SidebarItemDoc,
|
||||||
SidebarItemsGenerator,
|
SidebarItemsGenerator,
|
||||||
|
@ -13,11 +18,6 @@ import type {
|
||||||
NormalizedSidebarItem,
|
NormalizedSidebarItem,
|
||||||
SidebarItemCategoryLinkConfig,
|
SidebarItemCategoryLinkConfig,
|
||||||
} from './types';
|
} from './types';
|
||||||
import _ from 'lodash';
|
|
||||||
import {addTrailingSlash} from '@docusaurus/utils';
|
|
||||||
import logger from '@docusaurus/logger';
|
|
||||||
import path from 'path';
|
|
||||||
import {createDocsByIdIndex, toCategoryIndexMatcherParam} from '../docs';
|
|
||||||
|
|
||||||
const BreadcrumbSeparator = '/';
|
const BreadcrumbSeparator = '/';
|
||||||
|
|
||||||
|
|
|
@ -6,19 +6,19 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import fs from 'fs-extra';
|
import fs from 'fs-extra';
|
||||||
|
import path from 'path';
|
||||||
|
import _ from 'lodash';
|
||||||
|
import logger from '@docusaurus/logger';
|
||||||
|
import {Globby} from '@docusaurus/utils';
|
||||||
|
import Yaml from 'js-yaml';
|
||||||
|
import combinePromises from 'combine-promises';
|
||||||
import importFresh from 'import-fresh';
|
import importFresh from 'import-fresh';
|
||||||
import type {SidebarsConfig, Sidebars, SidebarProcessorParams} from './types';
|
|
||||||
import {validateSidebars, validateCategoryMetadataFile} from './validation';
|
import {validateSidebars, validateCategoryMetadataFile} from './validation';
|
||||||
import {normalizeSidebars} from './normalization';
|
import {normalizeSidebars} from './normalization';
|
||||||
import {processSidebars} from './processor';
|
import {processSidebars} from './processor';
|
||||||
import {postProcessSidebars} from './postProcessor';
|
import {postProcessSidebars} from './postProcessor';
|
||||||
import path from 'path';
|
|
||||||
import {Globby} from '@docusaurus/utils';
|
|
||||||
import logger from '@docusaurus/logger';
|
|
||||||
import type {PluginOptions} from '@docusaurus/plugin-content-docs';
|
import type {PluginOptions} from '@docusaurus/plugin-content-docs';
|
||||||
import Yaml from 'js-yaml';
|
import type {SidebarsConfig, Sidebars, SidebarProcessorParams} from './types';
|
||||||
import _ from 'lodash';
|
|
||||||
import combinePromises from 'combine-promises';
|
|
||||||
|
|
||||||
export const DefaultSidebars: SidebarsConfig = {
|
export const DefaultSidebars: SidebarsConfig = {
|
||||||
defaultSidebar: [
|
defaultSidebar: [
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import _ from 'lodash';
|
||||||
|
import logger from '@docusaurus/logger';
|
||||||
|
import {isCategoriesShorthand} from './utils';
|
||||||
import type {
|
import type {
|
||||||
NormalizedSidebarItem,
|
NormalizedSidebarItem,
|
||||||
NormalizedSidebar,
|
NormalizedSidebar,
|
||||||
|
@ -16,9 +19,6 @@ import type {
|
||||||
SidebarsConfig,
|
SidebarsConfig,
|
||||||
NormalizedSidebarItemCategory,
|
NormalizedSidebarItemCategory,
|
||||||
} from './types';
|
} from './types';
|
||||||
import {isCategoriesShorthand} from './utils';
|
|
||||||
import _ from 'lodash';
|
|
||||||
import logger from '@docusaurus/logger';
|
|
||||||
|
|
||||||
function normalizeCategoriesShorthand(
|
function normalizeCategoriesShorthand(
|
||||||
sidebar: SidebarCategoriesShorthand,
|
sidebar: SidebarCategoriesShorthand,
|
||||||
|
|
|
@ -5,7 +5,9 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import _ from 'lodash';
|
||||||
import {normalizeUrl} from '@docusaurus/utils';
|
import {normalizeUrl} from '@docusaurus/utils';
|
||||||
|
import {getDocIds} from '../docs';
|
||||||
import type {
|
import type {
|
||||||
SidebarItem,
|
SidebarItem,
|
||||||
Sidebars,
|
Sidebars,
|
||||||
|
@ -15,8 +17,6 @@ import type {
|
||||||
ProcessedSidebars,
|
ProcessedSidebars,
|
||||||
SidebarItemCategoryLink,
|
SidebarItemCategoryLink,
|
||||||
} from './types';
|
} from './types';
|
||||||
import {getDocIds} from '../docs';
|
|
||||||
import _ from 'lodash';
|
|
||||||
|
|
||||||
type SidebarPostProcessorParams = SidebarProcessorParams & {
|
type SidebarPostProcessorParams = SidebarProcessorParams & {
|
||||||
draftIds: Set<string>;
|
draftIds: Set<string>;
|
||||||
|
|
|
@ -5,6 +5,11 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import _ from 'lodash';
|
||||||
|
import combinePromises from 'combine-promises';
|
||||||
|
import {DefaultSidebarItemsGenerator} from './generator';
|
||||||
|
import {validateSidebars} from './validation';
|
||||||
|
import {isCategoryIndex} from '../docs';
|
||||||
import type {
|
import type {
|
||||||
DocMetadataBase,
|
DocMetadataBase,
|
||||||
VersionMetadata,
|
VersionMetadata,
|
||||||
|
@ -22,11 +27,6 @@ import type {
|
||||||
SidebarProcessorParams,
|
SidebarProcessorParams,
|
||||||
CategoryMetadataFile,
|
CategoryMetadataFile,
|
||||||
} from './types';
|
} from './types';
|
||||||
import {DefaultSidebarItemsGenerator} from './generator';
|
|
||||||
import {validateSidebars} from './validation';
|
|
||||||
import _ from 'lodash';
|
|
||||||
import combinePromises from 'combine-promises';
|
|
||||||
import {isCategoryIndex} from '../docs';
|
|
||||||
|
|
||||||
function toSidebarItemsGeneratorDoc(
|
function toSidebarItemsGeneratorDoc(
|
||||||
doc: DocMetadataBase,
|
doc: DocMetadataBase,
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import _ from 'lodash';
|
||||||
|
import {toMessageRelativeFilePath} from '@docusaurus/utils';
|
||||||
import type {
|
import type {
|
||||||
Sidebars,
|
Sidebars,
|
||||||
Sidebar,
|
Sidebar,
|
||||||
|
@ -18,9 +20,6 @@ import type {
|
||||||
SidebarItemCategoryWithGeneratedIndex,
|
SidebarItemCategoryWithGeneratedIndex,
|
||||||
SidebarNavigationItem,
|
SidebarNavigationItem,
|
||||||
} from './types';
|
} from './types';
|
||||||
|
|
||||||
import _ from 'lodash';
|
|
||||||
import {toMessageRelativeFilePath} from '@docusaurus/utils';
|
|
||||||
import type {
|
import type {
|
||||||
DocMetadataBase,
|
DocMetadataBase,
|
||||||
PropNavigationLink,
|
PropNavigationLink,
|
||||||
|
|
|
@ -5,10 +5,10 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import _ from 'lodash';
|
||||||
import {groupTaggedItems} from '@docusaurus/utils';
|
import {groupTaggedItems} from '@docusaurus/utils';
|
||||||
import type {VersionTags} from './types';
|
import type {VersionTags} from './types';
|
||||||
import type {DocMetadata} from '@docusaurus/plugin-content-docs';
|
import type {DocMetadata} from '@docusaurus/plugin-content-docs';
|
||||||
import _ from 'lodash';
|
|
||||||
|
|
||||||
export function getVersionTags(docs: DocMetadata[]): VersionTags {
|
export function getVersionTags(docs: DocMetadata[]): VersionTags {
|
||||||
const groups = groupTaggedItems(docs, (doc) => doc.tags);
|
const groups = groupTaggedItems(docs, (doc) => doc.tags);
|
||||||
|
|
|
@ -5,6 +5,14 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import _ from 'lodash';
|
||||||
|
import {mergeTranslations} from '@docusaurus/utils';
|
||||||
|
import {CURRENT_VERSION_NAME} from './constants';
|
||||||
|
import {
|
||||||
|
collectSidebarCategories,
|
||||||
|
transformSidebarItems,
|
||||||
|
collectSidebarLinks,
|
||||||
|
} from './sidebars/utils';
|
||||||
import type {
|
import type {
|
||||||
LoadedVersion,
|
LoadedVersion,
|
||||||
LoadedContent,
|
LoadedContent,
|
||||||
|
@ -15,20 +23,11 @@ import type {
|
||||||
SidebarItemCategoryLink,
|
SidebarItemCategoryLink,
|
||||||
Sidebars,
|
Sidebars,
|
||||||
} from './sidebars/types';
|
} from './sidebars/types';
|
||||||
|
|
||||||
import _ from 'lodash';
|
|
||||||
import {
|
|
||||||
collectSidebarCategories,
|
|
||||||
transformSidebarItems,
|
|
||||||
collectSidebarLinks,
|
|
||||||
} from './sidebars/utils';
|
|
||||||
import type {
|
import type {
|
||||||
TranslationFileContent,
|
TranslationFileContent,
|
||||||
TranslationFile,
|
TranslationFile,
|
||||||
TranslationMessage,
|
TranslationMessage,
|
||||||
} from '@docusaurus/types';
|
} from '@docusaurus/types';
|
||||||
import {mergeTranslations} from '@docusaurus/utils';
|
|
||||||
import {CURRENT_VERSION_NAME} from './constants';
|
|
||||||
|
|
||||||
function getVersionFileName(versionName: string): string {
|
function getVersionFileName(versionName: string): string {
|
||||||
if (versionName === CURRENT_VERSION_NAME) {
|
if (versionName === CURRENT_VERSION_NAME) {
|
||||||
|
|
|
@ -7,9 +7,9 @@
|
||||||
|
|
||||||
import {jest} from '@jest/globals';
|
import {jest} from '@jest/globals';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
import {DEFAULT_PLUGIN_ID} from '@docusaurus/utils';
|
||||||
import {readVersionsMetadata} from '../index';
|
import {readVersionsMetadata} from '../index';
|
||||||
import {DEFAULT_OPTIONS} from '../../options';
|
import {DEFAULT_OPTIONS} from '../../options';
|
||||||
import {DEFAULT_PLUGIN_ID} from '@docusaurus/utils';
|
|
||||||
import type {I18n} from '@docusaurus/types';
|
import type {I18n} from '@docusaurus/types';
|
||||||
import type {
|
import type {
|
||||||
PluginOptions,
|
PluginOptions,
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import fs from 'fs-extra';
|
import fs from 'fs-extra';
|
||||||
|
import {getPluginI18nPath, DEFAULT_PLUGIN_ID} from '@docusaurus/utils';
|
||||||
import {
|
import {
|
||||||
VERSIONS_JSON_FILE,
|
VERSIONS_JSON_FILE,
|
||||||
VERSIONED_DOCS_DIR,
|
VERSIONED_DOCS_DIR,
|
||||||
|
@ -14,7 +15,6 @@ import {
|
||||||
CURRENT_VERSION_NAME,
|
CURRENT_VERSION_NAME,
|
||||||
} from '../constants';
|
} from '../constants';
|
||||||
import {validateVersionNames} from './validation';
|
import {validateVersionNames} from './validation';
|
||||||
import {getPluginI18nPath, DEFAULT_PLUGIN_ID} from '@docusaurus/utils';
|
|
||||||
import type {
|
import type {
|
||||||
PluginOptions,
|
PluginOptions,
|
||||||
VersionMetadata,
|
VersionMetadata,
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import {CURRENT_VERSION_NAME} from '../constants';
|
|
||||||
import {normalizeUrl, posixPath} from '@docusaurus/utils';
|
import {normalizeUrl, posixPath} from '@docusaurus/utils';
|
||||||
|
import {CURRENT_VERSION_NAME} from '../constants';
|
||||||
import {validateVersionsOptions} from './validation';
|
import {validateVersionsOptions} from './validation';
|
||||||
import {
|
import {
|
||||||
getDocsDirPathLocalized,
|
getDocsDirPathLocalized,
|
||||||
|
|
|
@ -7,10 +7,10 @@
|
||||||
|
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import {loadContext} from '@docusaurus/core/lib/server';
|
import {loadContext} from '@docusaurus/core/lib/server';
|
||||||
|
import {normalizePluginOptions} from '@docusaurus/utils-validation';
|
||||||
|
|
||||||
import pluginContentPages from '../index';
|
import pluginContentPages from '../index';
|
||||||
import {validateOptions} from '../options';
|
import {validateOptions} from '../options';
|
||||||
import {normalizePluginOptions} from '@docusaurus/utils-validation';
|
|
||||||
|
|
||||||
describe('docusaurus-plugin-content-pages', () => {
|
describe('docusaurus-plugin-content-pages', () => {
|
||||||
it('loads simple pages', async () => {
|
it('loads simple pages', async () => {
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {validateOptions, DEFAULT_OPTIONS} from '../options';
|
|
||||||
import {normalizePluginOptions} from '@docusaurus/utils-validation';
|
import {normalizePluginOptions} from '@docusaurus/utils-validation';
|
||||||
|
import {validateOptions, DEFAULT_OPTIONS} from '../options';
|
||||||
import type {Options} from '@docusaurus/plugin-content-pages';
|
import type {Options} from '@docusaurus/plugin-content-pages';
|
||||||
|
|
||||||
function testValidate(options: Options) {
|
function testValidate(options: Options) {
|
||||||
|
|
|
@ -21,10 +21,10 @@ import {
|
||||||
DEFAULT_PLUGIN_ID,
|
DEFAULT_PLUGIN_ID,
|
||||||
parseMarkdownString,
|
parseMarkdownString,
|
||||||
} from '@docusaurus/utils';
|
} from '@docusaurus/utils';
|
||||||
import type {LoadContext, Plugin} from '@docusaurus/types';
|
|
||||||
import admonitions from 'remark-admonitions';
|
import admonitions from 'remark-admonitions';
|
||||||
import {validatePageFrontMatter} from './frontMatter';
|
import {validatePageFrontMatter} from './frontMatter';
|
||||||
|
|
||||||
|
import type {LoadContext, Plugin} from '@docusaurus/types';
|
||||||
import type {PagesContentPaths} from './types';
|
import type {PagesContentPaths} from './types';
|
||||||
import type {
|
import type {
|
||||||
PluginOptions,
|
PluginOptions,
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type {PluginOptions, Options} from '@docusaurus/plugin-content-pages';
|
|
||||||
import {
|
import {
|
||||||
Joi,
|
Joi,
|
||||||
RemarkPluginsSchema,
|
RemarkPluginsSchema,
|
||||||
|
@ -14,6 +13,7 @@ import {
|
||||||
} from '@docusaurus/utils-validation';
|
} from '@docusaurus/utils-validation';
|
||||||
import {GlobExcludeDefault} from '@docusaurus/utils';
|
import {GlobExcludeDefault} from '@docusaurus/utils';
|
||||||
import type {OptionValidationContext} from '@docusaurus/types';
|
import type {OptionValidationContext} from '@docusaurus/types';
|
||||||
|
import type {PluginOptions, Options} from '@docusaurus/plugin-content-pages';
|
||||||
|
|
||||||
export const DEFAULT_OPTIONS: PluginOptions = {
|
export const DEFAULT_OPTIONS: PluginOptions = {
|
||||||
path: 'src/pages', // Path to data on filesystem, relative to site dir.
|
path: 'src/pages', // Path to data on filesystem, relative to site dir.
|
||||||
|
|
|
@ -5,9 +5,9 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type {LoadContext, Plugin} from '@docusaurus/types';
|
|
||||||
import {docuHash, normalizeUrl, posixPath} from '@docusaurus/utils';
|
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
import {docuHash, normalizeUrl, posixPath} from '@docusaurus/utils';
|
||||||
|
import type {LoadContext, Plugin} from '@docusaurus/types';
|
||||||
|
|
||||||
export default function pluginDebug({
|
export default function pluginDebug({
|
||||||
siteConfig: {baseUrl},
|
siteConfig: {baseUrl},
|
||||||
|
|
|
@ -6,12 +6,10 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
||||||
import DebugLayout from '@theme/DebugLayout';
|
import DebugLayout from '@theme/DebugLayout';
|
||||||
import DebugJsonView from '@theme/DebugJsonView';
|
import DebugJsonView from '@theme/DebugJsonView';
|
||||||
|
|
||||||
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
|
||||||
|
|
||||||
export default function DebugMetadata(): JSX.Element {
|
export default function DebugMetadata(): JSX.Element {
|
||||||
const {siteConfig} = useDocusaurusContext();
|
const {siteConfig} = useDocusaurusContext();
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -6,10 +6,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import useGlobalData from '@docusaurus/useGlobalData';
|
||||||
import DebugLayout from '@theme/DebugLayout';
|
import DebugLayout from '@theme/DebugLayout';
|
||||||
import DebugJsonView from '@theme/DebugJsonView';
|
import DebugJsonView from '@theme/DebugJsonView';
|
||||||
import useGlobalData from '@docusaurus/useGlobalData';
|
|
||||||
|
|
||||||
export default function DebugMetadata(): JSX.Element {
|
export default function DebugMetadata(): JSX.Element {
|
||||||
const globalData = useGlobalData();
|
const globalData = useGlobalData();
|
||||||
|
|
|
@ -6,9 +6,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
import DebugLayout from '@theme/DebugLayout';
|
|
||||||
import registry from '@generated/registry';
|
import registry from '@generated/registry';
|
||||||
|
import DebugLayout from '@theme/DebugLayout';
|
||||||
import styles from './styles.module.css';
|
import styles from './styles.module.css';
|
||||||
|
|
||||||
export default function DebugRegistry(): JSX.Element {
|
export default function DebugRegistry(): JSX.Element {
|
||||||
|
|
|
@ -6,10 +6,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import routes from '@generated/routes';
|
||||||
import DebugLayout from '@theme/DebugLayout';
|
import DebugLayout from '@theme/DebugLayout';
|
||||||
import DebugJsonView from '@theme/DebugJsonView';
|
import DebugJsonView from '@theme/DebugJsonView';
|
||||||
import routes from '@generated/routes';
|
|
||||||
import styles from './styles.module.css';
|
import styles from './styles.module.css';
|
||||||
|
|
||||||
export default function DebugRoutes(): JSX.Element {
|
export default function DebugRoutes(): JSX.Element {
|
||||||
|
|
|
@ -6,9 +6,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
import DebugLayout from '@theme/DebugLayout';
|
|
||||||
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
||||||
|
import DebugLayout from '@theme/DebugLayout';
|
||||||
import styles from './styles.module.css';
|
import styles from './styles.module.css';
|
||||||
|
|
||||||
export default function DebugMetadata(): JSX.Element {
|
export default function DebugMetadata(): JSX.Element {
|
||||||
|
|
|
@ -5,14 +5,14 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import {Joi} from '@docusaurus/utils-validation';
|
||||||
|
import {readDefaultCodeTranslationMessages} from '@docusaurus/theme-translations';
|
||||||
import type {
|
import type {
|
||||||
LoadContext,
|
LoadContext,
|
||||||
Plugin,
|
Plugin,
|
||||||
OptionValidationContext,
|
OptionValidationContext,
|
||||||
} from '@docusaurus/types';
|
} from '@docusaurus/types';
|
||||||
import type {PluginOptions} from '@docusaurus/plugin-ideal-image';
|
import type {PluginOptions} from '@docusaurus/plugin-ideal-image';
|
||||||
import {Joi} from '@docusaurus/utils-validation';
|
|
||||||
import {readDefaultCodeTranslationMessages} from '@docusaurus/theme-translations';
|
|
||||||
|
|
||||||
export default function pluginIdealImage(
|
export default function pluginIdealImage(
|
||||||
context: LoadContext,
|
context: LoadContext,
|
||||||
|
|
|
@ -5,18 +5,16 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type {HtmlTags, LoadContext, Plugin} from '@docusaurus/types';
|
import path from 'path';
|
||||||
import type {PluginOptions} from '@docusaurus/plugin-pwa';
|
import webpack, {type Configuration} from 'webpack';
|
||||||
|
import Terser from 'terser-webpack-plugin';
|
||||||
|
import {injectManifest} from 'workbox-build';
|
||||||
import {normalizeUrl} from '@docusaurus/utils';
|
import {normalizeUrl} from '@docusaurus/utils';
|
||||||
import {compile} from '@docusaurus/core/lib/webpack/utils';
|
import {compile} from '@docusaurus/core/lib/webpack/utils';
|
||||||
import LogPlugin from '@docusaurus/core/lib/webpack/plugins/LogPlugin';
|
import LogPlugin from '@docusaurus/core/lib/webpack/plugins/LogPlugin';
|
||||||
import {readDefaultCodeTranslationMessages} from '@docusaurus/theme-translations';
|
import {readDefaultCodeTranslationMessages} from '@docusaurus/theme-translations';
|
||||||
|
import type {HtmlTags, LoadContext, Plugin} from '@docusaurus/types';
|
||||||
import path from 'path';
|
import type {PluginOptions} from '@docusaurus/plugin-pwa';
|
||||||
import webpack, {type Configuration} from 'webpack';
|
|
||||||
import Terser from 'terser-webpack-plugin';
|
|
||||||
|
|
||||||
import {injectManifest} from 'workbox-build';
|
|
||||||
|
|
||||||
const isProd = process.env.NODE_ENV === 'production';
|
const isProd = process.env.NODE_ENV === 'production';
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
import React, {useState} from 'react';
|
import React, {useState} from 'react';
|
||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
import Translate, {translate} from '@docusaurus/Translate';
|
import Translate, {translate} from '@docusaurus/Translate';
|
||||||
|
|
||||||
import type {Props} from '@theme/PwaReloadPopup';
|
import type {Props} from '@theme/PwaReloadPopup';
|
||||||
|
|
||||||
import styles from './styles.module.css';
|
import styles from './styles.module.css';
|
||||||
|
|
|
@ -6,9 +6,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import {EnumChangefreq} from 'sitemap';
|
||||||
import createSitemap from '../createSitemap';
|
import createSitemap from '../createSitemap';
|
||||||
import type {DocusaurusConfig} from '@docusaurus/types';
|
import type {DocusaurusConfig} from '@docusaurus/types';
|
||||||
import {EnumChangefreq} from 'sitemap';
|
|
||||||
|
|
||||||
describe('createSitemap', () => {
|
describe('createSitemap', () => {
|
||||||
it('simple site', async () => {
|
it('simple site', async () => {
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {validateOptions, DEFAULT_OPTIONS, type Options} from '../options';
|
|
||||||
import {normalizePluginOptions} from '@docusaurus/utils-validation';
|
import {normalizePluginOptions} from '@docusaurus/utils-validation';
|
||||||
|
import {validateOptions, DEFAULT_OPTIONS, type Options} from '../options';
|
||||||
|
|
||||||
function testValidate(options: Options) {
|
function testValidate(options: Options) {
|
||||||
return validateOptions({validate: normalizePluginOptions, options});
|
return validateOptions({validate: normalizePluginOptions, options});
|
||||||
|
|
|
@ -5,13 +5,13 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import type {ReactElement} from 'react';
|
||||||
import {SitemapStream, streamToPromise} from 'sitemap';
|
import {SitemapStream, streamToPromise} from 'sitemap';
|
||||||
import {applyTrailingSlash} from '@docusaurus/utils-common';
|
import {applyTrailingSlash} from '@docusaurus/utils-common';
|
||||||
import {createMatcher} from '@docusaurus/utils';
|
import {createMatcher} from '@docusaurus/utils';
|
||||||
import type {DocusaurusConfig} from '@docusaurus/types';
|
import type {DocusaurusConfig} from '@docusaurus/types';
|
||||||
import type {HelmetServerState} from 'react-helmet-async';
|
import type {HelmetServerState} from 'react-helmet-async';
|
||||||
import type {PluginOptions} from './options';
|
import type {PluginOptions} from './options';
|
||||||
import type {ReactElement} from 'react';
|
|
||||||
|
|
||||||
export default async function createSitemap(
|
export default async function createSitemap(
|
||||||
siteConfig: DocusaurusConfig,
|
siteConfig: DocusaurusConfig,
|
||||||
|
|
|
@ -5,11 +5,11 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import path from 'path';
|
||||||
|
import vfile from 'to-vfile';
|
||||||
|
import mdx from 'remark-mdx';
|
||||||
import remark from 'remark';
|
import remark from 'remark';
|
||||||
import npm2yarn from '../index';
|
import npm2yarn from '../index';
|
||||||
import vfile from 'to-vfile';
|
|
||||||
import path from 'path';
|
|
||||||
import mdx from 'remark-mdx';
|
|
||||||
|
|
||||||
const processFixture = async (name: string, options?: {sync?: boolean}) => {
|
const processFixture = async (name: string, options?: {sync?: boolean}) => {
|
||||||
const filePath = path.join(__dirname, '__fixtures__', `${name}.md`);
|
const filePath = path.join(__dirname, '__fixtures__', `${name}.md`);
|
||||||
|
|
|
@ -5,11 +5,11 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import visit from 'unist-util-visit';
|
||||||
|
import npmToYarn from 'npm-to-yarn';
|
||||||
import type {Code, Content, Literal} from 'mdast';
|
import type {Code, Content, Literal} from 'mdast';
|
||||||
import type {Plugin} from 'unified';
|
import type {Plugin} from 'unified';
|
||||||
import type {Node, Parent} from 'unist';
|
import type {Node, Parent} from 'unist';
|
||||||
import visit from 'unist-util-visit';
|
|
||||||
import npmToYarn from 'npm-to-yarn';
|
|
||||||
|
|
||||||
type PluginOptions = {
|
type PluginOptions = {
|
||||||
sync?: boolean;
|
sync?: boolean;
|
||||||
|
|
|
@ -5,9 +5,9 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import {updateTranslationFileMessages} from '@docusaurus/utils';
|
||||||
import {getTranslationFiles, translateThemeConfig} from '../translations';
|
import {getTranslationFiles, translateThemeConfig} from '../translations';
|
||||||
import type {ThemeConfig} from '@docusaurus/theme-common';
|
import type {ThemeConfig} from '@docusaurus/theme-common';
|
||||||
import {updateTranslationFileMessages} from '@docusaurus/utils';
|
|
||||||
|
|
||||||
const ThemeConfigSample: ThemeConfig = {
|
const ThemeConfigSample: ThemeConfig = {
|
||||||
colorMode: {},
|
colorMode: {},
|
||||||
|
|
|
@ -6,11 +6,11 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import {ThemeConfigSchema, DEFAULT_CONFIG} from '../validateThemeConfig';
|
|
||||||
|
|
||||||
import {normalizeThemeConfig} from '@docusaurus/utils-validation';
|
import {normalizeThemeConfig} from '@docusaurus/utils-validation';
|
||||||
import theme from 'prism-react-renderer/themes/github';
|
import theme from 'prism-react-renderer/themes/github';
|
||||||
import darkTheme from 'prism-react-renderer/themes/dracula';
|
import darkTheme from 'prism-react-renderer/themes/dracula';
|
||||||
|
import {ThemeConfigSchema, DEFAULT_CONFIG} from '../validateThemeConfig';
|
||||||
|
|
||||||
function testValidateThemeConfig(partialThemeConfig: {[key: string]: unknown}) {
|
function testValidateThemeConfig(partialThemeConfig: {[key: string]: unknown}) {
|
||||||
return normalizeThemeConfig(ThemeConfigSchema, {
|
return normalizeThemeConfig(ThemeConfigSchema, {
|
||||||
|
|
|
@ -6,13 +6,13 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import type {LoadContext, Plugin} from '@docusaurus/types';
|
|
||||||
import type {ThemeConfig} from '@docusaurus/theme-common';
|
|
||||||
import {getTranslationFiles, translateThemeConfig} from './translations';
|
|
||||||
import {createRequire} from 'module';
|
import {createRequire} from 'module';
|
||||||
import type {Plugin as PostCssPlugin} from 'postcss';
|
|
||||||
import rtlcss from 'rtlcss';
|
import rtlcss from 'rtlcss';
|
||||||
import {readDefaultCodeTranslationMessages} from '@docusaurus/theme-translations';
|
import {readDefaultCodeTranslationMessages} from '@docusaurus/theme-translations';
|
||||||
|
import {getTranslationFiles, translateThemeConfig} from './translations';
|
||||||
|
import type {LoadContext, Plugin} from '@docusaurus/types';
|
||||||
|
import type {ThemeConfig} from '@docusaurus/theme-common';
|
||||||
|
import type {Plugin as PostCssPlugin} from 'postcss';
|
||||||
import type {Options} from '@docusaurus/theme-classic';
|
import type {Options} from '@docusaurus/theme-classic';
|
||||||
import type webpack from 'webpack';
|
import type webpack from 'webpack';
|
||||||
|
|
||||||
|
|
|
@ -6,11 +6,11 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Layout from '@theme/Layout';
|
|
||||||
import Link from '@docusaurus/Link';
|
import Link from '@docusaurus/Link';
|
||||||
import type {ArchiveBlogPost, Props} from '@theme/BlogArchivePage';
|
|
||||||
import {translate} from '@docusaurus/Translate';
|
import {translate} from '@docusaurus/Translate';
|
||||||
import {PageMetadata} from '@docusaurus/theme-common';
|
import {PageMetadata} from '@docusaurus/theme-common';
|
||||||
|
import Layout from '@theme/Layout';
|
||||||
|
import type {ArchiveBlogPost, Props} from '@theme/BlogArchivePage';
|
||||||
|
|
||||||
type YearProp = {
|
type YearProp = {
|
||||||
year: string;
|
year: string;
|
||||||
|
|
|
@ -6,19 +6,19 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import clsx from 'clsx';
|
||||||
|
|
||||||
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
||||||
import BlogLayout from '@theme/BlogLayout';
|
|
||||||
import BlogPostItem from '@theme/BlogPostItem';
|
|
||||||
import BlogListPaginator from '@theme/BlogListPaginator';
|
|
||||||
import type {Props} from '@theme/BlogListPage';
|
|
||||||
import {
|
import {
|
||||||
PageMetadata,
|
PageMetadata,
|
||||||
HtmlClassNameProvider,
|
HtmlClassNameProvider,
|
||||||
ThemeClassNames,
|
ThemeClassNames,
|
||||||
} from '@docusaurus/theme-common';
|
} from '@docusaurus/theme-common';
|
||||||
|
import BlogLayout from '@theme/BlogLayout';
|
||||||
|
import BlogPostItem from '@theme/BlogPostItem';
|
||||||
|
import BlogListPaginator from '@theme/BlogListPaginator';
|
||||||
import SearchMetadata from '@theme/SearchMetadata';
|
import SearchMetadata from '@theme/SearchMetadata';
|
||||||
import clsx from 'clsx';
|
import type {Props} from '@theme/BlogListPage';
|
||||||
|
|
||||||
function BlogListPageMetadata(props: Props): JSX.Element {
|
function BlogListPageMetadata(props: Props): JSX.Element {
|
||||||
const {metadata} = props;
|
const {metadata} = props;
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
import type {Props} from '@theme/BlogPostAuthors';
|
|
||||||
import BlogPostAuthor from '@theme/BlogPostAuthor';
|
import BlogPostAuthor from '@theme/BlogPostAuthor';
|
||||||
|
import type {Props} from '@theme/BlogPostAuthors';
|
||||||
|
|
||||||
import styles from './styles.module.css';
|
import styles from './styles.module.css';
|
||||||
|
|
||||||
|
|
|
@ -14,11 +14,11 @@ import {usePluralForm} from '@docusaurus/theme-common';
|
||||||
import {blogPostContainerID} from '@docusaurus/utils-common';
|
import {blogPostContainerID} from '@docusaurus/utils-common';
|
||||||
import MDXContent from '@theme/MDXContent';
|
import MDXContent from '@theme/MDXContent';
|
||||||
import EditThisPage from '@theme/EditThisPage';
|
import EditThisPage from '@theme/EditThisPage';
|
||||||
|
import TagsListInline from '@theme/TagsListInline';
|
||||||
|
import BlogPostAuthors from '@theme/BlogPostAuthors';
|
||||||
import type {Props} from '@theme/BlogPostItem';
|
import type {Props} from '@theme/BlogPostItem';
|
||||||
|
|
||||||
import styles from './styles.module.css';
|
import styles from './styles.module.css';
|
||||||
import TagsListInline from '@theme/TagsListInline';
|
|
||||||
import BlogPostAuthors from '@theme/BlogPostAuthors';
|
|
||||||
|
|
||||||
// Very simple pluralization: probably good enough for now
|
// Very simple pluralization: probably good enough for now
|
||||||
function useReadingTimePlural() {
|
function useReadingTimePlural() {
|
||||||
|
|
|
@ -6,17 +6,17 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import BlogLayout from '@theme/BlogLayout';
|
import clsx from 'clsx';
|
||||||
import BlogPostItem from '@theme/BlogPostItem';
|
|
||||||
import BlogPostPaginator from '@theme/BlogPostPaginator';
|
|
||||||
import type {Props} from '@theme/BlogPostPage';
|
|
||||||
import {
|
import {
|
||||||
PageMetadata,
|
PageMetadata,
|
||||||
HtmlClassNameProvider,
|
HtmlClassNameProvider,
|
||||||
ThemeClassNames,
|
ThemeClassNames,
|
||||||
} from '@docusaurus/theme-common';
|
} from '@docusaurus/theme-common';
|
||||||
|
import BlogLayout from '@theme/BlogLayout';
|
||||||
|
import BlogPostItem from '@theme/BlogPostItem';
|
||||||
|
import BlogPostPaginator from '@theme/BlogPostPaginator';
|
||||||
import TOC from '@theme/TOC';
|
import TOC from '@theme/TOC';
|
||||||
import clsx from 'clsx';
|
import type {Props} from '@theme/BlogPostPage';
|
||||||
|
|
||||||
function BlogPostPageMetadata(props: Props): JSX.Element {
|
function BlogPostPageMetadata(props: Props): JSX.Element {
|
||||||
const {content: BlogPostContents} = props;
|
const {content: BlogPostContents} = props;
|
||||||
|
|
|
@ -9,9 +9,9 @@ import React from 'react';
|
||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
import Link from '@docusaurus/Link';
|
import Link from '@docusaurus/Link';
|
||||||
import {translate} from '@docusaurus/Translate';
|
import {translate} from '@docusaurus/Translate';
|
||||||
|
import type {Props} from '@theme/BlogSidebar/Desktop';
|
||||||
|
|
||||||
import styles from './styles.module.css';
|
import styles from './styles.module.css';
|
||||||
import type {Props} from '@theme/BlogSidebar/Desktop';
|
|
||||||
|
|
||||||
export default function BlogSidebarDesktop({sidebar}: Props): JSX.Element {
|
export default function BlogSidebarDesktop({sidebar}: Props): JSX.Element {
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -6,9 +6,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import {useWindowSize} from '@docusaurus/theme-common';
|
||||||
import BlogSidebarDesktop from '@theme/BlogSidebar/Desktop';
|
import BlogSidebarDesktop from '@theme/BlogSidebar/Desktop';
|
||||||
import BlogSidebarMobile from '@theme/BlogSidebar/Mobile';
|
import BlogSidebarMobile from '@theme/BlogSidebar/Mobile';
|
||||||
import {useWindowSize} from '@docusaurus/theme-common';
|
|
||||||
import type {Props} from '@theme/BlogSidebar';
|
import type {Props} from '@theme/BlogSidebar';
|
||||||
|
|
||||||
export default function BlogSidebar({sidebar}: Props): JSX.Element | null {
|
export default function BlogSidebar({sidebar}: Props): JSX.Element | null {
|
||||||
|
|
|
@ -6,18 +6,17 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import clsx from 'clsx';
|
||||||
import BlogLayout from '@theme/BlogLayout';
|
|
||||||
import TagsListByLetter from '@theme/TagsListByLetter';
|
|
||||||
import type {Props} from '@theme/BlogTagsListPage';
|
|
||||||
import {
|
import {
|
||||||
PageMetadata,
|
PageMetadata,
|
||||||
HtmlClassNameProvider,
|
HtmlClassNameProvider,
|
||||||
ThemeClassNames,
|
ThemeClassNames,
|
||||||
translateTagsPageTitle,
|
translateTagsPageTitle,
|
||||||
} from '@docusaurus/theme-common';
|
} from '@docusaurus/theme-common';
|
||||||
|
import BlogLayout from '@theme/BlogLayout';
|
||||||
|
import TagsListByLetter from '@theme/TagsListByLetter';
|
||||||
|
import type {Props} from '@theme/BlogTagsListPage';
|
||||||
import SearchMetadata from '../SearchMetadata';
|
import SearchMetadata from '../SearchMetadata';
|
||||||
import clsx from 'clsx';
|
|
||||||
|
|
||||||
export default function BlogTagsListPage({tags, sidebar}: Props): JSX.Element {
|
export default function BlogTagsListPage({tags, sidebar}: Props): JSX.Element {
|
||||||
const title = translateTagsPageTitle();
|
const title = translateTagsPageTitle();
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue