mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-11 08:07:26 +02:00
fix(*): make TypeScript realize that each plugin package has a default export (#7294)
This commit is contained in:
parent
b49ae67521
commit
a2c993bf9a
43 changed files with 208 additions and 187 deletions
|
@ -3,7 +3,7 @@
|
||||||
"version": "2.0.0-beta.18",
|
"version": "2.0.0-beta.18",
|
||||||
"description": "Client redirects plugin for Docusaurus.",
|
"description": "Client redirects plugin for Docusaurus.",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"types": "src/plugin-client-redirects.d.ts",
|
"types": "lib/index.d.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc",
|
"build": "tsc",
|
||||||
"watch": "tsc --watch"
|
"watch": "tsc --watch"
|
||||||
|
|
|
@ -10,7 +10,7 @@ import collectRedirects from '../collectRedirects';
|
||||||
import {validateOptions} from '../options';
|
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 type {Options} from '@docusaurus/plugin-client-redirects';
|
import type {Options} from '../options';
|
||||||
|
|
||||||
function createTestPluginContext(
|
function createTestPluginContext(
|
||||||
options?: Options,
|
options?: Options,
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
import {validateOptions, DEFAULT_OPTIONS} from '../options';
|
import {validateOptions, DEFAULT_OPTIONS} from '../options';
|
||||||
import {normalizePluginOptions} from '@docusaurus/utils-validation';
|
import {normalizePluginOptions} from '@docusaurus/utils-validation';
|
||||||
import type {Options} from '@docusaurus/plugin-client-redirects';
|
import type {Options} from '../options';
|
||||||
|
|
||||||
function testValidate(options: Options) {
|
function testValidate(options: Options) {
|
||||||
return validateOptions({validate: normalizePluginOptions, options});
|
return validateOptions({validate: normalizePluginOptions, options});
|
||||||
|
|
|
@ -6,10 +6,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import type {
|
import type {PluginOptions, RedirectOption} from './options';
|
||||||
PluginOptions,
|
|
||||||
RedirectOption,
|
|
||||||
} from '@docusaurus/plugin-client-redirects';
|
|
||||||
import type {PluginContext, RedirectMetadata} from './types';
|
import type {PluginContext, RedirectMetadata} from './types';
|
||||||
import {
|
import {
|
||||||
createFromExtensionsRedirects,
|
createFromExtensionsRedirects,
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
import type {LoadContext, Plugin} from '@docusaurus/types';
|
import type {LoadContext, Plugin} from '@docusaurus/types';
|
||||||
import type {PluginContext, RedirectMetadata} from './types';
|
import type {PluginContext, RedirectMetadata} from './types';
|
||||||
import type {PluginOptions} from '@docusaurus/plugin-client-redirects';
|
import type {PluginOptions, Options} from './options';
|
||||||
|
|
||||||
import collectRedirects from './collectRedirects';
|
import collectRedirects from './collectRedirects';
|
||||||
import writeRedirectFiles, {
|
import writeRedirectFiles, {
|
||||||
|
@ -52,3 +52,4 @@ export default function pluginClientRedirectsPages(
|
||||||
}
|
}
|
||||||
|
|
||||||
export {validateOptions} from './options';
|
export {validateOptions} from './options';
|
||||||
|
export type {PluginOptions, Options};
|
||||||
|
|
|
@ -5,14 +5,35 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type {
|
|
||||||
PluginOptions,
|
|
||||||
Options,
|
|
||||||
RedirectOption,
|
|
||||||
} from '@docusaurus/plugin-client-redirects';
|
|
||||||
import type {OptionValidationContext} from '@docusaurus/types';
|
import type {OptionValidationContext} from '@docusaurus/types';
|
||||||
import {Joi, PathnameSchema} from '@docusaurus/utils-validation';
|
import {Joi, PathnameSchema} from '@docusaurus/utils-validation';
|
||||||
|
|
||||||
|
export type RedirectOption = {
|
||||||
|
to: string;
|
||||||
|
from: string | string[];
|
||||||
|
};
|
||||||
|
|
||||||
|
export type PluginOptions = {
|
||||||
|
/** Plugin ID. */
|
||||||
|
id: string;
|
||||||
|
/** The extensions to be removed from the route after redirecting. */
|
||||||
|
fromExtensions: string[];
|
||||||
|
/** The extensions to be appended to the route after redirecting. */
|
||||||
|
toExtensions: string[];
|
||||||
|
/** The list of redirect rules, each one with multiple `from`s → one `to`. */
|
||||||
|
redirects: RedirectOption[];
|
||||||
|
/**
|
||||||
|
* A callback to create a redirect rule.
|
||||||
|
* @returns All the paths from which we should redirect to `path`
|
||||||
|
*/
|
||||||
|
createRedirects?: (
|
||||||
|
/** An existing Docusaurus route path */
|
||||||
|
path: string,
|
||||||
|
) => string[] | string | null | undefined;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type Options = Partial<PluginOptions>;
|
||||||
|
|
||||||
export const DEFAULT_OPTIONS: Partial<PluginOptions> = {
|
export const DEFAULT_OPTIONS: Partial<PluginOptions> = {
|
||||||
fromExtensions: [],
|
fromExtensions: [],
|
||||||
toExtensions: [],
|
toExtensions: [],
|
||||||
|
|
|
@ -1,32 +0,0 @@
|
||||||
/**
|
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
export type RedirectOption = {
|
|
||||||
to: string;
|
|
||||||
from: string | string[];
|
|
||||||
};
|
|
||||||
|
|
||||||
export type PluginOptions = {
|
|
||||||
/** Plugin ID. */
|
|
||||||
id: string;
|
|
||||||
/** The extensions to be removed from the route after redirecting. */
|
|
||||||
fromExtensions: string[];
|
|
||||||
/** The extensions to be appended to the route after redirecting. */
|
|
||||||
toExtensions: string[];
|
|
||||||
/** The list of redirect rules, each one with multiple `from`s → one `to`. */
|
|
||||||
redirects: RedirectOption[];
|
|
||||||
/**
|
|
||||||
* A callback to create a redirect rule.
|
|
||||||
* @returns All the paths from which we should redirect to `path`
|
|
||||||
*/
|
|
||||||
createRedirects?: (
|
|
||||||
/** An existing Docusaurus route path */
|
|
||||||
path: string,
|
|
||||||
) => string[] | string | null | undefined;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type Options = Partial<PluginOptions>;
|
|
|
@ -6,7 +6,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type {Props} from '@docusaurus/types';
|
import type {Props} from '@docusaurus/types';
|
||||||
import type {PluginOptions} from '@docusaurus/plugin-client-redirects';
|
import type {PluginOptions} from './options';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The minimal infos the plugin needs to work
|
* The minimal infos the plugin needs to work
|
||||||
|
|
|
@ -9,13 +9,7 @@ import fs from 'fs-extra';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import readingTime from 'reading-time';
|
import readingTime from 'reading-time';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import type {
|
import type {BlogContentPaths, BlogMarkdownLoaderOptions} from './types';
|
||||||
BlogPost,
|
|
||||||
BlogContentPaths,
|
|
||||||
BlogMarkdownLoaderOptions,
|
|
||||||
BlogTags,
|
|
||||||
BlogPaginated,
|
|
||||||
} from './types';
|
|
||||||
import {
|
import {
|
||||||
parseMarkdownString,
|
parseMarkdownString,
|
||||||
normalizeUrl,
|
normalizeUrl,
|
||||||
|
@ -37,6 +31,9 @@ import logger from '@docusaurus/logger';
|
||||||
import type {
|
import type {
|
||||||
PluginOptions,
|
PluginOptions,
|
||||||
ReadingTimeFunction,
|
ReadingTimeFunction,
|
||||||
|
BlogPost,
|
||||||
|
BlogTags,
|
||||||
|
BlogPaginated,
|
||||||
} from '@docusaurus/plugin-content-blog';
|
} from '@docusaurus/plugin-content-blog';
|
||||||
|
|
||||||
export function truncate(fileString: string, truncateMarker: RegExp): string {
|
export function truncate(fileString: string, truncateMarker: RegExp): string {
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {Feed, type Author as FeedAuthor, type Item as FeedItem} from 'feed';
|
import {Feed, type Author as FeedAuthor, type Item as FeedItem} from 'feed';
|
||||||
import type {BlogPost} from './types';
|
|
||||||
import {normalizeUrl, readOutputHTMLFile} from '@docusaurus/utils';
|
import {normalizeUrl, readOutputHTMLFile} from '@docusaurus/utils';
|
||||||
import {load as cheerioLoad} from 'cheerio';
|
import {load as cheerioLoad} from 'cheerio';
|
||||||
import type {DocusaurusConfig} from '@docusaurus/types';
|
import type {DocusaurusConfig} from '@docusaurus/types';
|
||||||
|
@ -16,6 +15,7 @@ import type {
|
||||||
FeedType,
|
FeedType,
|
||||||
PluginOptions,
|
PluginOptions,
|
||||||
Author,
|
Author,
|
||||||
|
BlogPost,
|
||||||
} from '@docusaurus/plugin-content-blog';
|
} from '@docusaurus/plugin-content-blog';
|
||||||
import {blogPostContainerID} from '@docusaurus/utils-common';
|
import {blogPostContainerID} from '@docusaurus/utils-common';
|
||||||
|
|
||||||
|
|
|
@ -25,14 +25,7 @@ import {
|
||||||
} from '@docusaurus/utils';
|
} from '@docusaurus/utils';
|
||||||
import {translateContent, getTranslationFiles} from './translations';
|
import {translateContent, getTranslationFiles} from './translations';
|
||||||
|
|
||||||
import type {
|
import type {BlogContentPaths, BlogMarkdownLoaderOptions} from './types';
|
||||||
BlogTag,
|
|
||||||
BlogTags,
|
|
||||||
BlogContent,
|
|
||||||
BlogPaginated,
|
|
||||||
BlogContentPaths,
|
|
||||||
BlogMarkdownLoaderOptions,
|
|
||||||
} from './types';
|
|
||||||
import type {LoadContext, Plugin, HtmlTags} from '@docusaurus/types';
|
import type {LoadContext, Plugin, HtmlTags} from '@docusaurus/types';
|
||||||
import {
|
import {
|
||||||
generateBlogPosts,
|
generateBlogPosts,
|
||||||
|
@ -46,6 +39,10 @@ import type {
|
||||||
BlogPostFrontMatter,
|
BlogPostFrontMatter,
|
||||||
BlogPostMetadata,
|
BlogPostMetadata,
|
||||||
Assets,
|
Assets,
|
||||||
|
BlogTag,
|
||||||
|
BlogTags,
|
||||||
|
BlogContent,
|
||||||
|
BlogPaginated,
|
||||||
} from '@docusaurus/plugin-content-blog';
|
} from '@docusaurus/plugin-content-blog';
|
||||||
|
|
||||||
export default async function pluginContentBlog(
|
export default async function pluginContentBlog(
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
declare module '@docusaurus/plugin-content-blog' {
|
declare module '@docusaurus/plugin-content-blog' {
|
||||||
import type {MDXOptions} from '@docusaurus/mdx-loader';
|
import type {MDXOptions} from '@docusaurus/mdx-loader';
|
||||||
import type {FrontMatterTag, Tag} from '@docusaurus/utils';
|
import type {FrontMatterTag, Tag} from '@docusaurus/utils';
|
||||||
|
import type {Plugin, LoadContext} from '@docusaurus/types';
|
||||||
import type {Overwrite} from 'utility-types';
|
import type {Overwrite} from 'utility-types';
|
||||||
|
|
||||||
export type Assets = {
|
export type Assets = {
|
||||||
|
@ -410,6 +411,62 @@ declare module '@docusaurus/plugin-content-blog' {
|
||||||
title: string;
|
title: string;
|
||||||
items: {title: string; permalink: string}[];
|
items: {title: string; permalink: string}[];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type BlogContent = {
|
||||||
|
blogSidebarTitle: string;
|
||||||
|
blogPosts: BlogPost[];
|
||||||
|
blogListPaginated: BlogPaginated[];
|
||||||
|
blogTags: BlogTags;
|
||||||
|
blogTagsListPath: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type BlogTags = {
|
||||||
|
[permalink: string]: BlogTag;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type BlogTag = Tag & {
|
||||||
|
/** Blog post permalinks. */
|
||||||
|
items: string[];
|
||||||
|
pages: BlogPaginated[];
|
||||||
|
};
|
||||||
|
|
||||||
|
export type BlogPost = {
|
||||||
|
id: string;
|
||||||
|
metadata: BlogPostMetadata;
|
||||||
|
content: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type BlogPaginatedMetadata = {
|
||||||
|
/** Title of the entire blog. */
|
||||||
|
readonly blogTitle: string;
|
||||||
|
/** Blog description. */
|
||||||
|
readonly blogDescription: string;
|
||||||
|
/** Permalink to the next list page. */
|
||||||
|
readonly nextPage?: string;
|
||||||
|
/** Permalink of the current page. */
|
||||||
|
readonly permalink: string;
|
||||||
|
/** Permalink to the previous list page. */
|
||||||
|
readonly previousPage?: string;
|
||||||
|
/** Index of the current page, 1-based. */
|
||||||
|
readonly page: number;
|
||||||
|
/** Posts displayed on each list page. */
|
||||||
|
readonly postsPerPage: number;
|
||||||
|
/** Total number of posts in the entire blog. */
|
||||||
|
readonly totalCount: number;
|
||||||
|
/** Total number of list pages. */
|
||||||
|
readonly totalPages: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type BlogPaginated = {
|
||||||
|
metadata: BlogPaginatedMetadata;
|
||||||
|
/** Blog post permalinks. */
|
||||||
|
items: string[];
|
||||||
|
};
|
||||||
|
|
||||||
|
export default function pluginContentBlog(
|
||||||
|
context: LoadContext,
|
||||||
|
options: PluginOptions,
|
||||||
|
): Promise<Plugin<BlogContent>>;
|
||||||
}
|
}
|
||||||
|
|
||||||
declare module '@theme/BlogPostPage' {
|
declare module '@theme/BlogPostPage' {
|
||||||
|
@ -446,34 +503,16 @@ declare module '@theme/BlogPostPage' {
|
||||||
|
|
||||||
declare module '@theme/BlogListPage' {
|
declare module '@theme/BlogListPage' {
|
||||||
import type {Content} from '@theme/BlogPostPage';
|
import type {Content} from '@theme/BlogPostPage';
|
||||||
import type {BlogSidebar} from '@docusaurus/plugin-content-blog';
|
import type {
|
||||||
|
BlogSidebar,
|
||||||
export type Metadata = {
|
BlogPaginatedMetadata,
|
||||||
/** Title of the entire blog. */
|
} from '@docusaurus/plugin-content-blog';
|
||||||
readonly blogTitle: string;
|
|
||||||
/** Blog description. */
|
|
||||||
readonly blogDescription: string;
|
|
||||||
/** Permalink to the next list page. */
|
|
||||||
readonly nextPage?: string;
|
|
||||||
/** Permalink of the current page. */
|
|
||||||
readonly permalink: string;
|
|
||||||
/** Permalink to the previous list page. */
|
|
||||||
readonly previousPage?: string;
|
|
||||||
/** Index of the current page, 1-based. */
|
|
||||||
readonly page: number;
|
|
||||||
/** Posts displayed on each list page. */
|
|
||||||
readonly postsPerPage: number;
|
|
||||||
/** Total number of posts in the entire blog. */
|
|
||||||
readonly totalCount: number;
|
|
||||||
/** Total number of list pages. */
|
|
||||||
readonly totalPages: number;
|
|
||||||
};
|
|
||||||
|
|
||||||
export interface Props {
|
export interface Props {
|
||||||
/** Blog sidebar. */
|
/** Blog sidebar. */
|
||||||
readonly sidebar: BlogSidebar;
|
readonly sidebar: BlogSidebar;
|
||||||
/** Metadata of the current listing page. */
|
/** Metadata of the current listing page. */
|
||||||
readonly metadata: Metadata;
|
readonly metadata: BlogPaginatedMetadata;
|
||||||
/**
|
/**
|
||||||
* Array of blog posts included on this page. Every post's metadata is also
|
* Array of blog posts included on this page. Every post's metadata is also
|
||||||
* available.
|
* available.
|
||||||
|
@ -499,9 +538,11 @@ declare module '@theme/BlogTagsListPage' {
|
||||||
}
|
}
|
||||||
|
|
||||||
declare module '@theme/BlogTagsPostsPage' {
|
declare module '@theme/BlogTagsPostsPage' {
|
||||||
import type {BlogSidebar} from '@docusaurus/plugin-content-blog';
|
import type {
|
||||||
|
BlogSidebar,
|
||||||
|
BlogPaginatedMetadata,
|
||||||
|
} from '@docusaurus/plugin-content-blog';
|
||||||
import type {Content} from '@theme/BlogPostPage';
|
import type {Content} from '@theme/BlogPostPage';
|
||||||
import type {Metadata} from '@theme/BlogListPage';
|
|
||||||
import type {TagModule} from '@docusaurus/utils';
|
import type {TagModule} from '@docusaurus/utils';
|
||||||
|
|
||||||
export interface Props {
|
export interface Props {
|
||||||
|
@ -510,7 +551,7 @@ declare module '@theme/BlogTagsPostsPage' {
|
||||||
/** Metadata of this tag. */
|
/** Metadata of this tag. */
|
||||||
readonly tag: TagModule;
|
readonly tag: TagModule;
|
||||||
/** Looks exactly the same as the posts list page */
|
/** Looks exactly the same as the posts list page */
|
||||||
readonly listMetadata: Metadata;
|
readonly listMetadata: BlogPaginatedMetadata;
|
||||||
/**
|
/**
|
||||||
* Array of blog posts included on this page. Every post's metadata is also
|
* Array of blog posts included on this page. Every post's metadata is also
|
||||||
* available.
|
* available.
|
||||||
|
|
|
@ -5,9 +5,12 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type {BlogContent, BlogPaginated} from './types';
|
|
||||||
import type {TranslationFileContent, TranslationFile} from '@docusaurus/types';
|
import type {TranslationFileContent, TranslationFile} from '@docusaurus/types';
|
||||||
import type {PluginOptions} from '@docusaurus/plugin-content-blog';
|
import type {
|
||||||
|
PluginOptions,
|
||||||
|
BlogContent,
|
||||||
|
BlogPaginated,
|
||||||
|
} from '@docusaurus/plugin-content-blog';
|
||||||
|
|
||||||
function translateListPage(
|
function translateListPage(
|
||||||
blogListPaginated: BlogPaginated[],
|
blogListPaginated: BlogPaginated[],
|
||||||
|
|
|
@ -5,42 +5,10 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type {BrokenMarkdownLink, ContentPaths, Tag} from '@docusaurus/utils';
|
import type {BrokenMarkdownLink, ContentPaths} from '@docusaurus/utils';
|
||||||
import type {BlogPostMetadata} from '@docusaurus/plugin-content-blog';
|
|
||||||
import type {Metadata as BlogPaginatedMetadata} from '@theme/BlogListPage';
|
|
||||||
|
|
||||||
export type BlogContentPaths = ContentPaths;
|
export type BlogContentPaths = ContentPaths;
|
||||||
|
|
||||||
export type BlogContent = {
|
|
||||||
blogSidebarTitle: string;
|
|
||||||
blogPosts: BlogPost[];
|
|
||||||
blogListPaginated: BlogPaginated[];
|
|
||||||
blogTags: BlogTags;
|
|
||||||
blogTagsListPath: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type BlogTags = {
|
|
||||||
[permalink: string]: BlogTag;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type BlogTag = Tag & {
|
|
||||||
/** Blog post permalinks. */
|
|
||||||
items: string[];
|
|
||||||
pages: BlogPaginated[];
|
|
||||||
};
|
|
||||||
|
|
||||||
export type BlogPost = {
|
|
||||||
id: string;
|
|
||||||
metadata: BlogPostMetadata;
|
|
||||||
content: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type BlogPaginated = {
|
|
||||||
metadata: BlogPaginatedMetadata;
|
|
||||||
/** Blog post permalinks. */
|
|
||||||
items: string[];
|
|
||||||
};
|
|
||||||
|
|
||||||
export type BlogBrokenMarkdownLink = BrokenMarkdownLink<BlogContentPaths>;
|
export type BlogBrokenMarkdownLink = BrokenMarkdownLink<BlogContentPaths>;
|
||||||
export type BlogMarkdownLoaderOptions = {
|
export type BlogMarkdownLoaderOptions = {
|
||||||
siteDir: string;
|
siteDir: string;
|
||||||
|
|
|
@ -22,7 +22,7 @@ import {
|
||||||
import type {LoadContext} from '@docusaurus/types';
|
import type {LoadContext} from '@docusaurus/types';
|
||||||
|
|
||||||
import {getFileLastUpdate} from './lastUpdate';
|
import {getFileLastUpdate} from './lastUpdate';
|
||||||
import type {DocFile, LoadedVersion} from './types';
|
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';
|
||||||
|
@ -39,6 +39,7 @@ import type {
|
||||||
LastUpdateData,
|
LastUpdateData,
|
||||||
VersionMetadata,
|
VersionMetadata,
|
||||||
DocFrontMatter,
|
DocFrontMatter,
|
||||||
|
LoadedVersion,
|
||||||
} from '@docusaurus/plugin-content-docs';
|
} from '@docusaurus/plugin-content-docs';
|
||||||
|
|
||||||
type LastUpdateOptions = Pick<
|
type LastUpdateOptions = Pick<
|
||||||
|
|
|
@ -26,9 +26,7 @@ import type {DocEnv} from './docs';
|
||||||
import {readVersionDocs, processDocMetadata, addDocNavigation} from './docs';
|
import {readVersionDocs, processDocMetadata, addDocNavigation} from './docs';
|
||||||
import {readVersionsMetadata} from './versions';
|
import {readVersionsMetadata} from './versions';
|
||||||
import type {
|
import type {
|
||||||
LoadedContent,
|
|
||||||
SourceToPermalink,
|
SourceToPermalink,
|
||||||
LoadedVersion,
|
|
||||||
DocFile,
|
DocFile,
|
||||||
DocsMarkdownOption,
|
DocsMarkdownOption,
|
||||||
VersionTag,
|
VersionTag,
|
||||||
|
@ -53,6 +51,8 @@ import type {
|
||||||
DocMetadataBase,
|
DocMetadataBase,
|
||||||
VersionMetadata,
|
VersionMetadata,
|
||||||
DocFrontMatter,
|
DocFrontMatter,
|
||||||
|
LoadedContent,
|
||||||
|
LoadedVersion,
|
||||||
} from '@docusaurus/plugin-content-docs';
|
} from '@docusaurus/plugin-content-docs';
|
||||||
import {createSidebarsUtils} from './sidebars/utils';
|
import {createSidebarsUtils} from './sidebars/utils';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
|
|
|
@ -14,6 +14,7 @@ declare module '@docusaurus/plugin-content-docs' {
|
||||||
TagModule,
|
TagModule,
|
||||||
Tag,
|
Tag,
|
||||||
} from '@docusaurus/utils';
|
} from '@docusaurus/utils';
|
||||||
|
import type {Plugin, LoadContext} from '@docusaurus/types';
|
||||||
import type {Required} from 'utility-types';
|
import type {Required} from 'utility-types';
|
||||||
|
|
||||||
export type Assets = {
|
export type Assets = {
|
||||||
|
@ -504,6 +505,21 @@ declare module '@docusaurus/plugin-content-docs' {
|
||||||
export type PropTagsListPage = {
|
export type PropTagsListPage = {
|
||||||
tags: TagsListItem[];
|
tags: TagsListItem[];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type LoadedVersion = VersionMetadata & {
|
||||||
|
docs: DocMetadata[];
|
||||||
|
drafts: DocMetadata[];
|
||||||
|
sidebars: import('./sidebars/types').Sidebars;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type LoadedContent = {
|
||||||
|
loadedVersions: LoadedVersion[];
|
||||||
|
};
|
||||||
|
|
||||||
|
export default function pluginContentDocs(
|
||||||
|
context: LoadContext,
|
||||||
|
options: PluginOptions,
|
||||||
|
): Promise<Plugin<LoadedContent>>;
|
||||||
}
|
}
|
||||||
|
|
||||||
declare module '@theme/DocItem' {
|
declare module '@theme/DocItem' {
|
||||||
|
|
|
@ -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 {LoadedVersion, VersionTag} from './types';
|
import type {VersionTag} from './types';
|
||||||
import type {
|
import type {
|
||||||
SidebarItemDoc,
|
SidebarItemDoc,
|
||||||
SidebarItem,
|
SidebarItem,
|
||||||
|
@ -22,6 +22,7 @@ import type {
|
||||||
PropSidebarItemLink,
|
PropSidebarItemLink,
|
||||||
PropVersionDocs,
|
PropVersionDocs,
|
||||||
DocMetadata,
|
DocMetadata,
|
||||||
|
LoadedVersion,
|
||||||
} from '@docusaurus/plugin-content-docs';
|
} from '@docusaurus/plugin-content-docs';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import {createDocsByIdIndex} from './docs';
|
import {createDocsByIdIndex} from './docs';
|
||||||
|
|
|
@ -5,7 +5,10 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type {LoadedVersion, LoadedContent} from './types';
|
import type {
|
||||||
|
LoadedVersion,
|
||||||
|
LoadedContent,
|
||||||
|
} from '@docusaurus/plugin-content-docs';
|
||||||
import type {
|
import type {
|
||||||
Sidebar,
|
Sidebar,
|
||||||
SidebarItemCategory,
|
SidebarItemCategory,
|
||||||
|
|
|
@ -7,12 +7,11 @@
|
||||||
|
|
||||||
/// <reference types="@docusaurus/module-type-aliases" />
|
/// <reference types="@docusaurus/module-type-aliases" />
|
||||||
|
|
||||||
import type {Sidebars} from './sidebars/types';
|
|
||||||
import type {BrokenMarkdownLink, Tag} from '@docusaurus/utils';
|
import type {BrokenMarkdownLink, Tag} from '@docusaurus/utils';
|
||||||
import type {
|
import type {
|
||||||
VersionMetadata,
|
VersionMetadata,
|
||||||
LastUpdateData,
|
LastUpdateData,
|
||||||
DocMetadata,
|
LoadedVersion,
|
||||||
CategoryGeneratedIndexMetadata,
|
CategoryGeneratedIndexMetadata,
|
||||||
} from '@docusaurus/plugin-content-docs';
|
} from '@docusaurus/plugin-content-docs';
|
||||||
import type {SidebarsUtils} from './sidebars/utils';
|
import type {SidebarsUtils} from './sidebars/utils';
|
||||||
|
@ -37,16 +36,6 @@ export type VersionTags = {
|
||||||
[permalink: string]: VersionTag;
|
[permalink: string]: VersionTag;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type LoadedVersion = VersionMetadata & {
|
|
||||||
docs: DocMetadata[];
|
|
||||||
drafts: DocMetadata[];
|
|
||||||
sidebars: Sidebars;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type LoadedContent = {
|
|
||||||
loadedVersions: LoadedVersion[];
|
|
||||||
};
|
|
||||||
|
|
||||||
export type FullVersion = LoadedVersion & {
|
export type FullVersion = LoadedVersion & {
|
||||||
sidebarsUtils: SidebarsUtils;
|
sidebarsUtils: SidebarsUtils;
|
||||||
categoryGeneratedIndices: CategoryGeneratedIndexMetadata[];
|
categoryGeneratedIndices: CategoryGeneratedIndexMetadata[];
|
||||||
|
|
|
@ -25,8 +25,12 @@ 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 {LoadedContent, PagesContentPaths} from './types';
|
import type {PagesContentPaths} from './types';
|
||||||
import type {PluginOptions, Metadata} from '@docusaurus/plugin-content-pages';
|
import type {
|
||||||
|
PluginOptions,
|
||||||
|
Metadata,
|
||||||
|
LoadedContent,
|
||||||
|
} from '@docusaurus/plugin-content-pages';
|
||||||
|
|
||||||
export function getContentPathList(contentPaths: PagesContentPaths): string[] {
|
export function getContentPathList(contentPaths: PagesContentPaths): string[] {
|
||||||
return [contentPaths.contentPathLocalized, contentPaths.contentPath];
|
return [contentPaths.contentPathLocalized, contentPaths.contentPath];
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
declare module '@docusaurus/plugin-content-pages' {
|
declare module '@docusaurus/plugin-content-pages' {
|
||||||
import type {MDXOptions} from '@docusaurus/mdx-loader';
|
import type {MDXOptions} from '@docusaurus/mdx-loader';
|
||||||
|
import type {LoadContext, Plugin} from '@docusaurus/types';
|
||||||
|
|
||||||
export type PluginOptions = MDXOptions & {
|
export type PluginOptions = MDXOptions & {
|
||||||
id?: string;
|
id?: string;
|
||||||
|
@ -45,6 +46,13 @@ declare module '@docusaurus/plugin-content-pages' {
|
||||||
};
|
};
|
||||||
|
|
||||||
export type Metadata = JSXPageMetadata | MDXPageMetadata;
|
export type Metadata = JSXPageMetadata | MDXPageMetadata;
|
||||||
|
|
||||||
|
export type LoadedContent = Metadata[];
|
||||||
|
|
||||||
|
export default function pluginContentPages(
|
||||||
|
context: LoadContext,
|
||||||
|
options: PluginOptions,
|
||||||
|
): Promise<Plugin<LoadedContent | null>>;
|
||||||
}
|
}
|
||||||
|
|
||||||
declare module '@theme/MDXPage' {
|
declare module '@theme/MDXPage' {
|
||||||
|
|
|
@ -5,10 +5,6 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type {Metadata} from '@docusaurus/plugin-content-pages';
|
|
||||||
|
|
||||||
export type LoadedContent = Metadata[];
|
|
||||||
|
|
||||||
export type PagesContentPaths = {
|
export type PagesContentPaths = {
|
||||||
contentPath: string;
|
contentPath: string;
|
||||||
contentPathLocalized: string;
|
contentPathLocalized: string;
|
||||||
|
|
|
@ -12,7 +12,7 @@ import path from 'path';
|
||||||
export default function pluginDebug({
|
export default function pluginDebug({
|
||||||
siteConfig: {baseUrl},
|
siteConfig: {baseUrl},
|
||||||
generatedFilesDir,
|
generatedFilesDir,
|
||||||
}: LoadContext): Plugin<void> {
|
}: LoadContext): Plugin<undefined> {
|
||||||
const pluginDataDirRoot = path.join(
|
const pluginDataDirRoot = path.join(
|
||||||
generatedFilesDir,
|
generatedFilesDir,
|
||||||
'docusaurus-plugin-debug',
|
'docusaurus-plugin-debug',
|
||||||
|
|
|
@ -7,6 +7,12 @@
|
||||||
|
|
||||||
/// <reference types="@docusaurus/module-type-aliases" />
|
/// <reference types="@docusaurus/module-type-aliases" />
|
||||||
|
|
||||||
|
declare module '@docusaurus/plugin-debug' {
|
||||||
|
import type {LoadContext, Plugin} from '@docusaurus/types';
|
||||||
|
|
||||||
|
export default function pluginDebug(context: LoadContext): Plugin<undefined>;
|
||||||
|
}
|
||||||
|
|
||||||
declare module '@theme/DebugConfig' {
|
declare module '@theme/DebugConfig' {
|
||||||
export default function DebugMetadata(): JSX.Element;
|
export default function DebugMetadata(): JSX.Element;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"version": "2.0.0-beta.18",
|
"version": "2.0.0-beta.18",
|
||||||
"description": "Global analytics (analytics.js) plugin for Docusaurus.",
|
"description": "Global analytics (analytics.js) plugin for Docusaurus.",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"types": "src/plugin-google-analytics.d.ts",
|
"types": "lib/index.d.ts",
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"access": "public"
|
"access": "public"
|
||||||
},
|
},
|
||||||
|
|
|
@ -13,7 +13,7 @@ import type {
|
||||||
ThemeConfig,
|
ThemeConfig,
|
||||||
ThemeConfigValidationContext,
|
ThemeConfigValidationContext,
|
||||||
} from '@docusaurus/types';
|
} from '@docusaurus/types';
|
||||||
import type {PluginOptions, Options} from '@docusaurus/plugin-google-analytics';
|
import type {PluginOptions, Options} from './options';
|
||||||
|
|
||||||
export default function pluginGoogleAnalytics(
|
export default function pluginGoogleAnalytics(
|
||||||
context: LoadContext,
|
context: LoadContext,
|
||||||
|
@ -87,3 +87,5 @@ export function validateThemeConfig({
|
||||||
}
|
}
|
||||||
return themeConfig;
|
return themeConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type {PluginOptions, Options};
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"version": "2.0.0-beta.18",
|
"version": "2.0.0-beta.18",
|
||||||
"description": "Global Site Tag (gtag.js) plugin for Docusaurus.",
|
"description": "Global Site Tag (gtag.js) plugin for Docusaurus.",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"types": "src/plugin-google-gtag.d.ts",
|
"types": "lib/index.d.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc",
|
"build": "tsc",
|
||||||
"watch": "tsc --watch"
|
"watch": "tsc --watch"
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import globalData from '@generated/globalData';
|
import globalData from '@generated/globalData';
|
||||||
import type {PluginOptions} from '@docusaurus/plugin-google-gtag';
|
import type {PluginOptions} from './options';
|
||||||
import type {ClientModule} from '@docusaurus/types';
|
import type {ClientModule} from '@docusaurus/types';
|
||||||
|
|
||||||
const {trackingID} = globalData['docusaurus-plugin-google-gtag']!
|
const {trackingID} = globalData['docusaurus-plugin-google-gtag']!
|
||||||
|
|
|
@ -13,7 +13,7 @@ import type {
|
||||||
ThemeConfig,
|
ThemeConfig,
|
||||||
ThemeConfigValidationContext,
|
ThemeConfigValidationContext,
|
||||||
} from '@docusaurus/types';
|
} from '@docusaurus/types';
|
||||||
import type {PluginOptions, Options} from '@docusaurus/plugin-google-gtag';
|
import type {PluginOptions, Options} from './options';
|
||||||
|
|
||||||
export default function pluginGoogleGtag(
|
export default function pluginGoogleGtag(
|
||||||
context: LoadContext,
|
context: LoadContext,
|
||||||
|
@ -101,3 +101,5 @@ export function validateThemeConfig({
|
||||||
}
|
}
|
||||||
return themeConfig;
|
return themeConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type {PluginOptions, Options};
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"version": "2.0.0-beta.18",
|
"version": "2.0.0-beta.18",
|
||||||
"description": "Simple sitemap generation plugin for Docusaurus.",
|
"description": "Simple sitemap generation plugin for Docusaurus.",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"types": "src/plugin-sitemap.d.ts",
|
"types": "lib/index.d.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc",
|
"build": "tsc",
|
||||||
"watch": "tsc --watch"
|
"watch": "tsc --watch"
|
||||||
|
|
|
@ -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 {validateOptions, DEFAULT_OPTIONS} from '../options';
|
import {validateOptions, DEFAULT_OPTIONS, type Options} from '../options';
|
||||||
import {normalizePluginOptions} from '@docusaurus/utils-validation';
|
import {normalizePluginOptions} from '@docusaurus/utils-validation';
|
||||||
import type {Options} from '@docusaurus/plugin-sitemap';
|
|
||||||
|
|
||||||
function testValidate(options: Options) {
|
function testValidate(options: Options) {
|
||||||
return validateOptions({validate: normalizePluginOptions, options});
|
return validateOptions({validate: normalizePluginOptions, options});
|
||||||
|
|
|
@ -6,11 +6,11 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {SitemapStream, streamToPromise} from 'sitemap';
|
import {SitemapStream, streamToPromise} from 'sitemap';
|
||||||
import type {PluginOptions} from '@docusaurus/plugin-sitemap';
|
|
||||||
import type {DocusaurusConfig} from '@docusaurus/types';
|
|
||||||
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 {HelmetServerState} from 'react-helmet-async';
|
import type {HelmetServerState} from 'react-helmet-async';
|
||||||
|
import type {PluginOptions} from './options';
|
||||||
import type {ReactElement} from 'react';
|
import type {ReactElement} from 'react';
|
||||||
|
|
||||||
export default async function createSitemap(
|
export default async function createSitemap(
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
|
|
||||||
import fs from 'fs-extra';
|
import fs from 'fs-extra';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import type {PluginOptions} from '@docusaurus/plugin-sitemap';
|
|
||||||
import createSitemap from './createSitemap';
|
import createSitemap from './createSitemap';
|
||||||
|
import type {PluginOptions, Options} from './options';
|
||||||
import type {LoadContext, Plugin} from '@docusaurus/types';
|
import type {LoadContext, Plugin} from '@docusaurus/types';
|
||||||
|
|
||||||
export default function pluginSitemap(
|
export default function pluginSitemap(
|
||||||
|
@ -42,3 +42,4 @@ export default function pluginSitemap(
|
||||||
}
|
}
|
||||||
|
|
||||||
export {validateOptions} from './options';
|
export {validateOptions} from './options';
|
||||||
|
export type {PluginOptions, Options};
|
||||||
|
|
|
@ -7,9 +7,22 @@
|
||||||
|
|
||||||
import {Joi} from '@docusaurus/utils-validation';
|
import {Joi} from '@docusaurus/utils-validation';
|
||||||
import {EnumChangefreq} from 'sitemap';
|
import {EnumChangefreq} from 'sitemap';
|
||||||
import type {Options, PluginOptions} from '@docusaurus/plugin-sitemap';
|
|
||||||
import type {OptionValidationContext} from '@docusaurus/types';
|
import type {OptionValidationContext} from '@docusaurus/types';
|
||||||
|
|
||||||
|
export type PluginOptions = {
|
||||||
|
/** @see https://www.sitemaps.org/protocol.html#xmlTagDefinitions */
|
||||||
|
changefreq: EnumChangefreq;
|
||||||
|
/** @see https://www.sitemaps.org/protocol.html#xmlTagDefinitions */
|
||||||
|
priority: number;
|
||||||
|
/**
|
||||||
|
* A list of glob patterns; matching route paths will be filtered from the
|
||||||
|
* sitemap. Note that you may need to include the base URL in here.
|
||||||
|
*/
|
||||||
|
ignorePatterns: string[];
|
||||||
|
};
|
||||||
|
|
||||||
|
export type Options = Partial<PluginOptions>;
|
||||||
|
|
||||||
export const DEFAULT_OPTIONS: PluginOptions = {
|
export const DEFAULT_OPTIONS: PluginOptions = {
|
||||||
changefreq: EnumChangefreq.WEEKLY,
|
changefreq: EnumChangefreq.WEEKLY,
|
||||||
priority: 0.5,
|
priority: 0.5,
|
||||||
|
|
|
@ -1,22 +0,0 @@
|
||||||
/**
|
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import type {EnumChangefreq} from 'sitemap';
|
|
||||||
|
|
||||||
export type PluginOptions = {
|
|
||||||
/** @see https://www.sitemaps.org/protocol.html#xmlTagDefinitions */
|
|
||||||
changefreq: EnumChangefreq;
|
|
||||||
/** @see https://www.sitemaps.org/protocol.html#xmlTagDefinitions */
|
|
||||||
priority: number;
|
|
||||||
/**
|
|
||||||
* A list of glob patterns; matching route paths will be filtered from the
|
|
||||||
* sitemap. Note that you may need to include the base URL in here.
|
|
||||||
*/
|
|
||||||
ignorePatterns: string[];
|
|
||||||
};
|
|
||||||
|
|
||||||
export type Options = Partial<PluginOptions>;
|
|
|
@ -3,7 +3,7 @@
|
||||||
"version": "2.0.0-beta.18",
|
"version": "2.0.0-beta.18",
|
||||||
"description": "Classic preset for Docusaurus.",
|
"description": "Classic preset for Docusaurus.",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"types": "src/preset-classic.d.ts",
|
"types": "lib/index.d.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc",
|
"build": "tsc",
|
||||||
"watch": "tsc --watch"
|
"watch": "tsc --watch"
|
||||||
|
|
|
@ -11,7 +11,7 @@ import type {
|
||||||
PluginConfig,
|
PluginConfig,
|
||||||
PluginOptions,
|
PluginOptions,
|
||||||
} from '@docusaurus/types';
|
} from '@docusaurus/types';
|
||||||
import type {Options, ThemeConfig} from '@docusaurus/preset-classic';
|
import type {Options, ThemeConfig} from './options';
|
||||||
|
|
||||||
function makePluginConfig(
|
function makePluginConfig(
|
||||||
source: string,
|
source: string,
|
||||||
|
@ -93,3 +93,5 @@ export default function preset(
|
||||||
|
|
||||||
return {themes, plugins};
|
return {themes, plugins};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type {Options, ThemeConfig};
|
||||||
|
|
|
@ -91,10 +91,10 @@ function getInfimaCSSFile(direction: string) {
|
||||||
}.css`;
|
}.css`;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function docusaurusThemeClassic(
|
export default function themeClassic(
|
||||||
context: LoadContext,
|
context: LoadContext,
|
||||||
options: Options,
|
options: Options,
|
||||||
): Plugin<void> {
|
): Plugin<undefined> {
|
||||||
const {
|
const {
|
||||||
i18n: {currentLocale, localeConfigs},
|
i18n: {currentLocale, localeConfigs},
|
||||||
} = context;
|
} = context;
|
||||||
|
|
|
@ -21,9 +21,16 @@
|
||||||
// in their tsconfig.
|
// in their tsconfig.
|
||||||
|
|
||||||
declare module '@docusaurus/theme-classic' {
|
declare module '@docusaurus/theme-classic' {
|
||||||
|
import type {LoadContext, Plugin} from '@docusaurus/types';
|
||||||
|
|
||||||
export type Options = {
|
export type Options = {
|
||||||
customCss?: string | string[];
|
customCss?: string | string[];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export default function themeClassic(
|
||||||
|
context: LoadContext,
|
||||||
|
options: Options,
|
||||||
|
): Plugin<undefined>;
|
||||||
}
|
}
|
||||||
|
|
||||||
declare module '@theme/Admonition' {
|
declare module '@theme/Admonition' {
|
||||||
|
@ -47,10 +54,10 @@ declare module '@theme/BackToTopButton' {
|
||||||
}
|
}
|
||||||
|
|
||||||
declare module '@theme/BlogListPaginator' {
|
declare module '@theme/BlogListPaginator' {
|
||||||
import type {Metadata} from '@theme/BlogListPage';
|
import type {BlogPaginatedMetadata} from '@docusaurus/plugin-content-blog';
|
||||||
|
|
||||||
export interface Props {
|
export interface Props {
|
||||||
readonly metadata: Metadata;
|
readonly metadata: BlogPaginatedMetadata;
|
||||||
}
|
}
|
||||||
export default function BlogListPaginator(props: Props): JSX.Element;
|
export default function BlogListPaginator(props: Props): JSX.Element;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue