Skip to content

Commit f8727ed

Browse files
committed
add beta 21 version
1 parent 1e18f8f commit f8727ed

File tree

94 files changed

+356
-89
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+356
-89
lines changed

CHANGELOG.md

+110
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,115 @@
11
# Docusaurus 2 Changelog
22

3+
## 2.0.0-beta.21 (2022-05-27)
4+
5+
#### :boom: Breaking Change
6+
7+
- `docusaurus-plugin-pwa`
8+
- [#7422](https://github.com/facebook/docusaurus/pull/7422) refactor(pwa): remove reloadPopup option in favor of swizzling ([@Josh-Cena](https://github.com/Josh-Cena))
9+
- `create-docusaurus`, `docusaurus-cssnano-preset`, `docusaurus-logger`, `docusaurus-mdx-loader`, `docusaurus-migrate`, `docusaurus-plugin-client-redirects`, `docusaurus-plugin-content-blog`, `docusaurus-plugin-content-docs`, `docusaurus-plugin-content-pages`, `docusaurus-plugin-debug`, `docusaurus-plugin-google-analytics`, `docusaurus-plugin-google-gtag`, `docusaurus-plugin-ideal-image`, `docusaurus-plugin-pwa`, `docusaurus-plugin-sitemap`, `docusaurus-preset-classic`, `docusaurus-remark-plugin-npm2yarn`, `docusaurus-theme-classic`, `docusaurus-theme-common`, `docusaurus-theme-live-codeblock`, `docusaurus-theme-search-algolia`, `docusaurus-theme-translations`, `docusaurus-utils-common`, `docusaurus-utils-validation`, `docusaurus-utils`, `docusaurus`, `eslint-plugin`, `lqip-loader`
10+
- [#7501](https://github.com/facebook/docusaurus/pull/7501) chore: require Node 16.14 ([@Josh-Cena](https://github.com/Josh-Cena))
11+
12+
#### :rocket: New Feature
13+
14+
- `docusaurus-plugin-sitemap`
15+
- [#7469](https://github.com/facebook/docusaurus/pull/7469) feat(sitemap): allow customizing the output name ([@Josh-Cena](https://github.com/Josh-Cena))
16+
- `docusaurus-utils`, `docusaurus`
17+
- [#7371](https://github.com/facebook/docusaurus/pull/7371) feat(core): support docusaurus.config.cjs as default file name ([@Josh-Cena](https://github.com/Josh-Cena))
18+
- `docusaurus`
19+
- [#7500](https://github.com/facebook/docusaurus/pull/7500) feat: make docusaurus serve automatically open in browser ([@Zamiell](https://github.com/Zamiell))
20+
- [#7452](https://github.com/facebook/docusaurus/pull/7452) feat: add --no-minify flag to docusaurus start ([@lanegoolsby](https://github.com/lanegoolsby))
21+
- `docusaurus-theme-classic`
22+
- [#7357](https://github.com/facebook/docusaurus/pull/7357) feat(theme-classic): allow className as option for type: "search" ([@JPeer264](https://github.com/JPeer264))
23+
24+
#### :bug: Bug Fix
25+
26+
- `docusaurus`
27+
- [#7362](https://github.com/facebook/docusaurus/pull/7362) fix: always emit SEO title + og:title meta ([@charleskorn](https://github.com/charleskorn))
28+
- [#7453](https://github.com/facebook/docusaurus/pull/7453) fix(core): avoid using logger and fs.readJSON in SSR ([@Josh-Cena](https://github.com/Josh-Cena))
29+
- [#7369](https://github.com/facebook/docusaurus/pull/7369) fix(cli): output correct path when swizzling bare-file component in subfolder ([@Josh-Cena](https://github.com/Josh-Cena))
30+
- [#7360](https://github.com/facebook/docusaurus/pull/7360) fix(core): allow githubPort in config validation ([@mhughes2k](https://github.com/mhughes2k))
31+
- `docusaurus-plugin-google-gtag`
32+
- [#7424](https://github.com/facebook/docusaurus/pull/7424) fix(gtag): send the newly rendered page's title instead of the old one's ([@ori-shalom](https://github.com/ori-shalom))
33+
- `create-docusaurus`, `docusaurus-utils`
34+
- [#7507](https://github.com/facebook/docusaurus/pull/7507) fix(create-docusaurus): potential security issue with command injection ([@slorber](https://github.com/slorber))
35+
- `docusaurus-module-type-aliases`, `docusaurus-theme-classic`, `docusaurus`
36+
- [#7492](https://github.com/facebook/docusaurus/pull/7492) fix(core): always treat error boundary fallback as a callback ([@Josh-Cena](https://github.com/Josh-Cena))
37+
- `docusaurus-theme-classic`
38+
- [#7438](https://github.com/facebook/docusaurus/pull/7438) fix(theme-classic): allow nested task lists to preserve the indent ([@Josh-Cena](https://github.com/Josh-Cena))
39+
- [#7430](https://github.com/facebook/docusaurus/pull/7430) fix(theme-classic): consistently apply the right active class name for all navbar items ([@Josh-Cena](https://github.com/Josh-Cena))
40+
- [#7411](https://github.com/facebook/docusaurus/pull/7411) fix(theme-classic): autocollapse sidebar categories when navigating with paginator ([@pranabdas](https://github.com/pranabdas))
41+
- [#7363](https://github.com/facebook/docusaurus/pull/7363) fix(theme-classic): resolve customCss from site dir ([@Josh-Cena](https://github.com/Josh-Cena))
42+
- `docusaurus-utils`
43+
- [#7464](https://github.com/facebook/docusaurus/pull/7464) fix(utils): fix Markdown link replacement when link text is same as href ([@Josh-Cena](https://github.com/Josh-Cena))
44+
- [#7458](https://github.com/facebook/docusaurus/pull/7458) fix(utils): avoid replacing Markdown links missing the directly next link ([@Josh-Cena](https://github.com/Josh-Cena))
45+
- `docusaurus-mdx-loader`
46+
- [#7392](https://github.com/facebook/docusaurus/pull/7392) fix(mdx-loader): use React.Fragment as fragment factory ([@Josh-Cena](https://github.com/Josh-Cena))
47+
- `docusaurus-plugin-content-docs`
48+
- [#7385](https://github.com/facebook/docusaurus/pull/7385) fix(content-docs): restore functionality when a category only has index page ([@Josh-Cena](https://github.com/Josh-Cena))
49+
50+
#### :nail_care: Polish
51+
52+
- `docusaurus-theme-translations`
53+
- [#7493](https://github.com/facebook/docusaurus/pull/7493) chore(theme-translations): complete French translations ([@forresst](https://github.com/forresst))
54+
- [#7474](https://github.com/facebook/docusaurus/pull/7474) chore(theme-translations): complete zh translations ([@Josh-Cena](https://github.com/Josh-Cena))
55+
- [#7400](https://github.com/facebook/docusaurus/pull/7400) chore(theme-translations): complete Farsi translations ([@massoudmaboudi](https://github.com/massoudmaboudi))
56+
- `docusaurus`
57+
- [#7499](https://github.com/facebook/docusaurus/pull/7499) fix: avoid printing period after localhost URL ([@Zamiell](https://github.com/Zamiell))
58+
- `create-docusaurus`
59+
- [#7374](https://github.com/facebook/docusaurus/pull/7374) refactor(create): clean up logic when prompting for unspecified arguments ([@Josh-Cena](https://github.com/Josh-Cena))
60+
61+
#### :memo: Documentation
62+
63+
- [#7503](https://github.com/facebook/docusaurus/pull/7503) docs: document MDXComponents scope ([@Josh-Cena](https://github.com/Josh-Cena))
64+
- [#7497](https://github.com/facebook/docusaurus/pull/7497) docs: link every reference of types in API table to the type definition ([@Zamiell](https://github.com/Zamiell))
65+
- [#7407](https://github.com/facebook/docusaurus/pull/7407) docs: add Azure SWA as deployment option ([@nitya](https://github.com/nitya))
66+
- [#7390](https://github.com/facebook/docusaurus/pull/7390) fix(website): use react-lite-youtube-embed for lazy YouTube video ([@matkoch](https://github.com/matkoch))
67+
68+
#### :wrench: Maintenance
69+
70+
- `create-docusaurus`, `docusaurus-logger`, `docusaurus-mdx-loader`, `docusaurus-migrate`, `docusaurus-module-type-aliases`, `docusaurus-plugin-client-redirects`, `docusaurus-plugin-content-blog`, `docusaurus-plugin-content-docs`, `docusaurus-plugin-content-pages`, `docusaurus-plugin-debug`, `docusaurus-plugin-google-gtag`, `docusaurus-plugin-ideal-image`, `docusaurus-plugin-pwa`, `docusaurus-plugin-sitemap`, `docusaurus-remark-plugin-npm2yarn`, `docusaurus-theme-classic`, `docusaurus-theme-common`, `docusaurus-theme-live-codeblock`, `docusaurus-theme-search-algolia`, `docusaurus-theme-translations`, `docusaurus-utils-validation`, `docusaurus-utils`, `docusaurus`, `lqip-loader`, `stylelint-copyright`
71+
- [#7477](https://github.com/facebook/docusaurus/pull/7477) refactor: fix a lot of errors in type-aware linting ([@Josh-Cena](https://github.com/Josh-Cena))
72+
- `docusaurus-theme-classic`, `docusaurus-theme-translations`
73+
- [#7447](https://github.com/facebook/docusaurus/pull/7447) refactor(theme-classic): migrate to tsc for build ([@Josh-Cena](https://github.com/Josh-Cena))
74+
- `stylelint-copyright`
75+
- [#7441](https://github.com/facebook/docusaurus/pull/7441) refactor(stylelint-copyright): migrate to TS ([@Josh-Cena](https://github.com/Josh-Cena))
76+
- `docusaurus-cssnano-preset`
77+
- [#7440](https://github.com/facebook/docusaurus/pull/7440) refactor(cssnano-preset): migrate to TS ([@Josh-Cena](https://github.com/Josh-Cena))
78+
- `create-docusaurus`, `docusaurus-logger`, `docusaurus-mdx-loader`, `docusaurus-migrate`, `docusaurus-plugin-client-redirects`, `docusaurus-plugin-content-blog`, `docusaurus-plugin-content-docs`, `docusaurus-plugin-content-pages`, `docusaurus-plugin-debug`, `docusaurus-plugin-google-analytics`, `docusaurus-plugin-google-gtag`, `docusaurus-plugin-ideal-image`, `docusaurus-plugin-pwa`, `docusaurus-plugin-sitemap`, `docusaurus-preset-classic`, `docusaurus-remark-plugin-npm2yarn`, `docusaurus-theme-classic`, `docusaurus-theme-common`, `docusaurus-theme-live-codeblock`, `docusaurus-theme-search-algolia`, `docusaurus-theme-translations`, `docusaurus-utils-common`, `docusaurus-utils-validation`, `docusaurus-utils`, `docusaurus`, `eslint-plugin`, `lqip-loader`
79+
- [#7437](https://github.com/facebook/docusaurus/pull/7437) refactor: use TS project references instead of running tsc multiple times ([@Josh-Cena](https://github.com/Josh-Cena))
80+
- `docusaurus-plugin-pwa`
81+
- [#7421](https://github.com/facebook/docusaurus/pull/7421) refactor(pwa): migrate client modules to TS ([@Josh-Cena](https://github.com/Josh-Cena))
82+
- `docusaurus-theme-classic`
83+
- [#7415](https://github.com/facebook/docusaurus/pull/7415) refactor(theme-classic): always collocate stylesheets with components in one folder ([@Josh-Cena](https://github.com/Josh-Cena))
84+
- `docusaurus`
85+
- [#7405](https://github.com/facebook/docusaurus/pull/7405) refactor(core): properly code-split NotFound page ([@Josh-Cena](https://github.com/Josh-Cena))
86+
87+
#### Committers: 23
88+
89+
- Akara ([@Messiahhh](https://github.com/Messiahhh))
90+
- Benjamin Diolez ([@BenDz](https://github.com/BenDz))
91+
- Charles Korn ([@charleskorn](https://github.com/charleskorn))
92+
- Designatory ([@Designatory](https://github.com/Designatory))
93+
- Forresst ([@forresst](https://github.com/forresst))
94+
- Ggicci ([@ggicci](https://github.com/ggicci))
95+
- James ([@Zamiell](https://github.com/Zamiell))
96+
- Jan Peer Stöcklmair ([@JPeer264](https://github.com/JPeer264))
97+
- Jeremy ([@jrmyw92](https://github.com/jrmyw92))
98+
- Joshua Chen ([@Josh-Cena](https://github.com/Josh-Cena))
99+
- Junjie ([@junjieweb](https://github.com/junjieweb))
100+
- Lane Goolsby ([@lanegoolsby](https://github.com/lanegoolsby))
101+
- Massoud Maboudi ([@massoudmaboudi](https://github.com/massoudmaboudi))
102+
- Matthias Koch ([@matkoch](https://github.com/matkoch))
103+
- Michael Hughes ([@mhughes2k](https://github.com/mhughes2k))
104+
- Ngô Quốc Đạt ([@datlechin](https://github.com/datlechin))
105+
- Nitya Narasimhan ([@nitya](https://github.com/nitya))
106+
- Oluwatobi Sofela ([@oluwatobiss](https://github.com/oluwatobiss))
107+
- Ori Shalom ([@ori-shalom](https://github.com/ori-shalom))
108+
- Pranab Das ([@pranabdas](https://github.com/pranabdas))
109+
- Rui Peres ([@RuiAAPeres](https://github.com/RuiAAPeres))
110+
- Sébastien Lorber ([@slorber](https://github.com/slorber))
111+
- 凱恩 Kane ([@Gary50613](https://github.com/Gary50613))
112+
3113
## 2.0.0-beta.20 (2022-05-05)
4114

5115
#### :bug: Bug Fix

website/versioned_docs/version-2.0.0-beta.19/api/docusaurus.config.js.md website/versioned_docs/version-2.0.0-beta.21/api/docusaurus.config.js.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ Example:
130130
module.exports = {
131131
i18n: {
132132
defaultLocale: 'en',
133-
locales: ['en', 'fr'],
133+
locales: ['en', 'fa'],
134134
localeConfigs: {
135135
en: {
136136
label: 'English',
@@ -153,7 +153,7 @@ module.exports = {
153153
- `locales`: List of locales deployed on your site. Must contain `defaultLocale`.
154154
- `localeConfigs`: Individual options for each locale.
155155
- `label`: The label displayed for this locale in the locales dropdown.
156-
- `direction`: `ltr` (default) or `rtl` (for [right-to-left languages](https://developer.mozilla.org/en-US/docs/Glossary/rtl) like Arabic, Hebrew, etc.). Used to select the locale's CSS and html meta attribute.
156+
- `direction`: `ltr` (default) or `rtl` (for [right-to-left languages](https://developer.mozilla.org/en-US/docs/Glossary/rtl) like Farsi, Arabic, Hebrew, etc.). Used to select the locale's CSS and html meta attribute.
157157
- `htmlLang`: BCP 47 language tag to use in `<html lang="...">` and in `<link ... hreflang="...">`
158158
- `calendar`: the [calendar](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/calendar) used to calculate the date era. Note that it doesn't control the actual string displayed: `MM/DD/YYYY` and `DD/MM/YYYY` are both `gregory`. To choose the format (`DD/MM/YYYY` or `MM/DD/YYYY`), set your locale name to `en-GB` or `en-US` (`en` means `en-US`).
159159

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
sidebar_position: 0
3+
title: '📦 create-docusaurus'
4+
slug: '/api/misc/create-docusaurus'
5+
---
6+
7+
A scaffolding utility to help you instantly set up a functional Docusaurus app.
8+
9+
## Usage {#usage}
10+
11+
```bash
12+
npx create-docusaurus@latest [name] [template] [rootDir]
13+
```
14+
15+
The `name` argument will be used as the site's path as well as the `name` field in the created app's package.json. It can be an absolute path, or a path relative to `rootDir`.
16+
17+
The `template` argument can be one of the following:
18+
19+
- `classic`: Uses the classic template (recommended)
20+
- `facebook`: Uses the Facebook/Meta template, which contains some Meta-specific setup
21+
- A git repo URL (beginning with `https://` or `git@`), which can be cloned to the destination
22+
- A local file path relative to CWD, which contains the files to be copied to destination
23+
24+
The `rootDir` will be used to resolve the absolute path to the site directory. The default is CWD.
25+
26+
:::caution
27+
28+
This command should be preferably used in an interactive shell so all features are available.
29+
30+
:::
31+
32+
## Options {#options}
33+
34+
### `-t, --typescript` {#typescript}
35+
36+
Used when the template argument is a recognized name. Currently, only `classic` provides a TypeScript variant.
37+
38+
### `-g, --git-strategy` {#git-strategy}
39+
40+
Used when the template argument is a git repo. It needs to be one of:
41+
42+
- `deep`: preserves full git history
43+
- `shallow`: clones with `--depth=1`
44+
- `copy`: does a shallow clone, but does not create a git repo
45+
- `custom`: enter your custom git clone command. We will prompt you for it. You can write something like `git clone --depth 10`, and we will append the repository URL and destination directory.
46+
47+
### `-p, --package-manager` {#package-manager}
48+
49+
Value should be one of `npm`, `yarn`, or `pnpm`. If it's not explicitly provided, Docusaurus will infer one based on:
50+
51+
- The lockfile already present in the CWD (e.g. if you are setting up website in an existing project)
52+
- The command used to invoke `create-docusaurus` (e.g. `npm init`, `npx`, `yarn create`, etc.)
53+
- Interactive prompting, in case all heuristics are not present
54+
55+
### `-s, --skip-install` {#skip-install}
56+
57+
If provided, Docusaurus will not automatically install dependencies after creating the app. The `--package-manager` option is only useful when you are actually installing dependencies.

website/versioned_docs/version-2.0.0-beta.19/api/misc/eslint-plugin/README.md website/versioned_docs/version-2.0.0-beta.21/api/misc/eslint-plugin/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_position: 0
2+
sidebar_position: 1
33
id: eslint-plugin
44
title: '📦 eslint-plugin'
55
slug: '/api/misc/@docusaurus/eslint-plugin'

website/versioned_docs/version-2.0.0-beta.19/api/misc/logger.md website/versioned_docs/version-2.0.0-beta.21/api/misc/logger/logger.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
sidebar_position: 1
2+
sidebar_position: 2
33
title: '📦 logger'
4-
slug: '/api/plugins/@docusaurus/logger'
4+
slug: '/api/misc/@docusaurus/logger'
55
---
66

77
An encapsulated logger for semantically formatting console messages.
@@ -64,4 +64,4 @@ An embedded expression is optionally preceded by a flag in the form `[a-z]+=` (a
6464

6565
If the expression is an array, it's formatted by `` `\n- ${array.join('\n- ')}\n` `` (note it automatically gets a leading line end). Each member is formatted by itself and the bullet is not formatted. So you would see the above message printed as:
6666

67-
![demo](./img/logger-demo.png)
67+
![demo](./demo.png)

website/versioned_docs/version-2.0.0-beta.19/api/plugins/plugin-client-redirects.md website/versioned_docs/version-2.0.0-beta.21/api/plugins/plugin-client-redirects.md

+10-2
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,25 @@ Accepted fields:
4141
| --- | --- | --- | --- |
4242
| `fromExtensions` | `string[]` | `[]` | The extensions to be removed from the route after redirecting. |
4343
| `toExtensions` | `string[]` | `[]` | The extensions to be appended to the route after redirecting. |
44-
| `redirects` | `RedirectRule[]` | `[]` | The list of redirect rules. |
45-
| `createRedirects` | `CreateRedirectsFn` | `undefined` | A callback to create a redirect rule. |
44+
| `redirects` | <code><a href="#RedirectRule">RedirectRule</a>[]</code> | `[]` | The list of redirect rules. |
45+
| `createRedirects` | <code><a href="#CreateRedirectsFn">CreateRedirectsFn</a></code> | `undefined` | A callback to create a redirect rule. |
4646

4747
</APITable>
4848

49+
### Types {#types}
50+
51+
#### `RedirectRule` {#RedirectRule}
52+
4953
```ts
5054
type RedirectRule = {
5155
to: string;
5256
from: string | string[];
5357
};
58+
```
5459

60+
#### `CreateRedirectsFn` {#CreateRedirectsFn}
61+
62+
```ts
5563
type CreateRedirectsFn = (path: string) => string[] | string | null | undefined;
5664
```
5765

website/versioned_docs/version-2.0.0-beta.19/api/plugins/plugin-content-blog.md website/versioned_docs/version-2.0.0-beta.21/api/plugins/plugin-content-blog.md

+18-6
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Accepted fields:
3838
| Name | Type | Default | Description |
3939
| --- | --- | --- | --- |
4040
| `path` | `string` | `'blog'` | Path to the blog content directory on the file system, relative to site dir. |
41-
| `editUrl` | <code>string \| EditUrlFunction</code> | `undefined` | Base URL to edit your site. The final URL is computed by `editUrl + relativePostPath`. Using a function allows more nuanced control for each file. Omitting this variable entirely will disable edit links. |
41+
| `editUrl` | <code>string \| <a href="#EditUrlFn">EditUrlFn</a></code> | `undefined` | Base URL to edit your site. The final URL is computed by `editUrl + relativePostPath`. Using a function allows more nuanced control for each file. Omitting this variable entirely will disable edit links. |
4242
| `editLocalizedFiles` | `boolean` | `false` | The edit URL will target the localized file, instead of the original unlocalized file. Ignored when `editUrl` is a function. |
4343
| `blogTitle` | `string` | `'Blog'` | Blog page title for better SEO. |
4444
| `blogDescription` | `string` | `'Blog'` | Blog page meta description for better SEO. |
@@ -61,10 +61,10 @@ Accepted fields:
6161
| `beforeDefaultRehypePlugins` | `any[]` | `[]` | Custom Rehype plugins passed to MDX before the default Docusaurus Rehype plugins. |
6262
| `truncateMarker` | `RegExp` | `/<!--\s*(truncate)\s*-->/` | Truncate marker marking where the summary ends. |
6363
| `showReadingTime` | `boolean` | `true` | Show estimated reading time for the blog post. |
64-
| `readingTime` | `ReadingTimeFunctionOption` | The default reading time | A callback to customize the reading time number displayed. |
64+
| `readingTime` | `ReadingTimeFn` | The default reading time | A callback to customize the reading time number displayed. |
6565
| `authorsMapPath` | `string` | `'authors.yml'` | Path to the authors map file, relative to the blog content directory. |
6666
| `feedOptions` | _See below_ | `{type: ['rss', 'atom']}` | Blog feed. |
67-
| `feedOptions.type` | <code>FeedType \| FeedType[] \| 'all' \| null</code> | **Required** | Type of feed to be generated. Use `null` to disable generation. |
67+
| `feedOptions.type` | <code><a href="#FeedType">FeedType</a> \| <a href="#FeedType">FeedType</a>[] \| 'all' \| null</code> | **Required** | Type of feed to be generated. Use `null` to disable generation. |
6868
| `feedOptions.title` | `string` | `siteConfig.title` | Title of the feed. |
6969
| `feedOptions.description` | `string` | <code>\`${siteConfig.title} Blog\`</code> | Description of the feed. |
7070
| `feedOptions.copyright` | `string` | `undefined` | Copyright message. |
@@ -73,31 +73,43 @@ Accepted fields:
7373

7474
</APITable>
7575

76+
### Types {#types}
77+
78+
#### `EditUrlFn` {#EditUrlFn}
79+
7680
```ts
7781
type EditUrlFunction = (params: {
7882
blogDirPath: string;
7983
blogPath: string;
8084
permalink: string;
8185
locale: string;
8286
}) => string | undefined;
87+
```
88+
89+
#### `ReadingTimeFn` {#ReadingTimeFn}
8390

91+
```ts
8492
type ReadingTimeOptions = {
8593
wordsPerMinute: number;
8694
wordBound: (char: string) => boolean;
8795
};
8896

89-
type ReadingTimeFunction = (params: {
97+
type ReadingTimeCalculator = (params: {
9098
content: string;
9199
frontMatter?: BlogPostFrontMatter & Record<string, unknown>;
92100
options?: ReadingTimeOptions;
93101
}) => number;
94102

95-
type ReadingTimeFunctionOption = (params: {
103+
type ReadingTimeFn = (params: {
96104
content: string;
97105
frontMatter: BlogPostFrontMatter & Record<string, unknown>;
98-
defaultReadingTime: ReadingTimeFunction;
106+
defaultReadingTime: ReadingTimeCalculator;
99107
}) => number | undefined;
108+
```
100109

110+
#### `FeedType` {#FeedType}
111+
112+
```ts
101113
type FeedType = 'rss' | 'atom' | 'json';
102114
```
103115

0 commit comments

Comments
 (0)