create-docusaurus 2.0.0-beta.17 → 2.0.0-beta.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/index.js +13 -14
- package/lib/index.js +15 -16
- package/package.json +9 -9
- package/templates/classic/docusaurus.config.js +15 -1
- package/templates/classic/package.json +9 -6
- package/templates/classic/src/css/custom.css +2 -11
- package/templates/classic-typescript/package.json +9 -9
- package/templates/facebook/docusaurus.config.js +5 -0
- package/templates/facebook/package.json +14 -14
- package/templates/facebook/src/css/custom.css +0 -7
- package/templates/shared/docs/tutorial-basics/_category_.json +5 -1
- package/templates/shared/docs/tutorial-basics/create-a-document.md +3 -3
- package/templates/shared/docs/tutorial-basics/markdown-features.mdx +3 -1
- package/templates/shared/docs/tutorial-extras/_category_.json +4 -1
- package/templates/shared/docs/tutorial-extras/img/docsVersionDropdown.png +0 -0
- package/templates/shared/docs/tutorial-extras/img/localeDropdown.png +0 -0
- package/templates/shared/docs/tutorial-extras/manage-docs-versions.md +1 -1
- package/templates/shared/docs/tutorial-extras/translate-your-site.md +1 -1
- package/templates/shared/static/img/tutorial/docsVersionDropdown.png +0 -0
- package/templates/shared/static/img/tutorial/localeDropdown.png +0 -0
package/bin/index.js
CHANGED
|
@@ -13,7 +13,6 @@ import semver from 'semver';
|
|
|
13
13
|
import path from 'path';
|
|
14
14
|
import {program} from 'commander';
|
|
15
15
|
import {createRequire} from 'module';
|
|
16
|
-
import init from '../lib/index.js';
|
|
17
16
|
|
|
18
17
|
const packageJson = createRequire(import.meta.url)('../package.json');
|
|
19
18
|
const requiredVersion = packageJson.engines.node;
|
|
@@ -24,14 +23,6 @@ if (!semver.satisfies(process.version, requiredVersion)) {
|
|
|
24
23
|
process.exit(1);
|
|
25
24
|
}
|
|
26
25
|
|
|
27
|
-
function wrapCommand(fn) {
|
|
28
|
-
return (...args) =>
|
|
29
|
-
fn(...args).catch((err) => {
|
|
30
|
-
logger.error(err.stack);
|
|
31
|
-
process.exitCode = 1;
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
|
|
35
26
|
program.version(packageJson.version);
|
|
36
27
|
|
|
37
28
|
program
|
|
@@ -61,11 +52,14 @@ program
|
|
|
61
52
|
rootDir = '.',
|
|
62
53
|
{packageManager, skipInstall, typescript, gitStrategy} = {},
|
|
63
54
|
) => {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
55
|
+
// See https://github.com/facebook/docusaurus/pull/6860
|
|
56
|
+
import('../lib/index.js').then(({default: init}) => {
|
|
57
|
+
init(path.resolve(rootDir), siteName, template, {
|
|
58
|
+
packageManager,
|
|
59
|
+
skipInstall,
|
|
60
|
+
typescript,
|
|
61
|
+
gitStrategy,
|
|
62
|
+
});
|
|
69
63
|
});
|
|
70
64
|
},
|
|
71
65
|
);
|
|
@@ -75,3 +69,8 @@ program.parse(process.argv);
|
|
|
75
69
|
if (!process.argv.slice(1).length) {
|
|
76
70
|
program.outputHelp();
|
|
77
71
|
}
|
|
72
|
+
|
|
73
|
+
process.on('unhandledRejection', (err) => {
|
|
74
|
+
logger.error(err);
|
|
75
|
+
process.exit(1);
|
|
76
|
+
});
|
package/lib/index.js
CHANGED
|
@@ -25,7 +25,7 @@ const SupportedPackageManagers = {
|
|
|
25
25
|
const PackageManagersList = Object.keys(SupportedPackageManagers);
|
|
26
26
|
async function findPackageManagerFromLockFile() {
|
|
27
27
|
for (const packageManager of PackageManagersList) {
|
|
28
|
-
const lockFilePath = path.resolve(
|
|
28
|
+
const lockFilePath = path.resolve(SupportedPackageManagers[packageManager]);
|
|
29
29
|
if (await fs.pathExists(lockFilePath)) {
|
|
30
30
|
return packageManager;
|
|
31
31
|
}
|
|
@@ -37,11 +37,11 @@ function findPackageManagerFromUserAgent() {
|
|
|
37
37
|
}
|
|
38
38
|
async function askForPackageManagerChoice() {
|
|
39
39
|
const hasYarn = shell.exec('yarn --version', { silent: true }).code === 0;
|
|
40
|
-
const
|
|
41
|
-
if (!hasYarn && !
|
|
40
|
+
const hasPnpm = shell.exec('pnpm --version', { silent: true }).code === 0;
|
|
41
|
+
if (!hasYarn && !hasPnpm) {
|
|
42
42
|
return 'npm';
|
|
43
43
|
}
|
|
44
|
-
const choices = ['npm', hasYarn && 'yarn',
|
|
44
|
+
const choices = ['npm', hasYarn && 'yarn', hasPnpm && 'pnpm']
|
|
45
45
|
.filter((p) => Boolean(p))
|
|
46
46
|
.map((p) => ({ title: p, value: p }));
|
|
47
47
|
return (await prompts({
|
|
@@ -66,8 +66,7 @@ function isValidGitRepoUrl(gitRepoUrl) {
|
|
|
66
66
|
return ['https://', 'git@'].some((item) => gitRepoUrl.startsWith(item));
|
|
67
67
|
}
|
|
68
68
|
async function updatePkg(pkgPath, obj) {
|
|
69
|
-
const
|
|
70
|
-
const pkg = JSON.parse(content);
|
|
69
|
+
const pkg = await fs.readJSON(pkgPath);
|
|
71
70
|
const newPkg = Object.assign(pkg, obj);
|
|
72
71
|
await fs.outputFile(pkgPath, `${JSON.stringify(newPkg, null, 2)}\n`);
|
|
73
72
|
}
|
|
@@ -97,7 +96,7 @@ function getTypeScriptBaseTemplate(template) {
|
|
|
97
96
|
return undefined;
|
|
98
97
|
}
|
|
99
98
|
async function copyTemplate(templatesDir, template, dest) {
|
|
100
|
-
await fs.copy(path.
|
|
99
|
+
await fs.copy(path.join(templatesDir, 'shared'), dest);
|
|
101
100
|
// TypeScript variants will copy duplicate resources like CSS & config from
|
|
102
101
|
// base template
|
|
103
102
|
const tsBaseTemplate = getTypeScriptBaseTemplate(template);
|
|
@@ -110,7 +109,7 @@ async function copyTemplate(templatesDir, template, dest) {
|
|
|
110
109
|
});
|
|
111
110
|
}
|
|
112
111
|
await fs.copy(path.resolve(templatesDir, template), dest, {
|
|
113
|
-
// Symlinks don't exist in published
|
|
112
|
+
// Symlinks don't exist in published npm packages anymore, so this is only
|
|
114
113
|
// to prevent errors during local testing
|
|
115
114
|
filter: async (filePath) => !(await fs.lstat(filePath)).isSymbolicLink(),
|
|
116
115
|
});
|
|
@@ -137,7 +136,7 @@ async function getGitCommand(gitStrategy) {
|
|
|
137
136
|
export default async function init(rootDir, siteName, reqTemplate, cliOptions = {}) {
|
|
138
137
|
const templatesDir = fileURLToPath(new URL('../templates', import.meta.url));
|
|
139
138
|
const templates = await readTemplates(templatesDir);
|
|
140
|
-
const hasTS = (templateName) => fs.pathExists(path.
|
|
139
|
+
const hasTS = (templateName) => fs.pathExists(path.join(templatesDir, `${templateName}${TypeScriptTemplateSuffix}`));
|
|
141
140
|
let name = siteName;
|
|
142
141
|
// Prompt if siteName is not passed from CLI.
|
|
143
142
|
if (!name) {
|
|
@@ -192,7 +191,7 @@ export default async function init(rootDir, siteName, reqTemplate, cliOptions =
|
|
|
192
191
|
return logger.red('Invalid repository URL');
|
|
193
192
|
},
|
|
194
193
|
message: logger.interpolate `Enter a repository URL from GitHub, Bitbucket, GitLab, or any other public repo.
|
|
195
|
-
(e.g:
|
|
194
|
+
(e.g: url=${'https://github.com/ownerName/repoName.git'})`,
|
|
196
195
|
});
|
|
197
196
|
({ gitStrategy } = await prompts({
|
|
198
197
|
type: 'select',
|
|
@@ -216,7 +215,7 @@ export default async function init(rootDir, siteName, reqTemplate, cliOptions =
|
|
|
216
215
|
name: 'templateDir',
|
|
217
216
|
validate: async (dir) => {
|
|
218
217
|
if (dir) {
|
|
219
|
-
const fullDir = path.resolve(
|
|
218
|
+
const fullDir = path.resolve(dir);
|
|
220
219
|
if (await fs.pathExists(fullDir)) {
|
|
221
220
|
return true;
|
|
222
221
|
}
|
|
@@ -234,7 +233,7 @@ export default async function init(rootDir, siteName, reqTemplate, cliOptions =
|
|
|
234
233
|
}
|
|
235
234
|
logger.info('Creating new Docusaurus project...');
|
|
236
235
|
if (isValidGitRepoUrl(template)) {
|
|
237
|
-
logger.info `Cloning Git template
|
|
236
|
+
logger.info `Cloning Git template url=${template}...`;
|
|
238
237
|
if (!gitStrategies.includes(gitStrategy)) {
|
|
239
238
|
logger.error `Invalid git strategy: name=${gitStrategy}. Value must be one of ${gitStrategies.join(', ')}.`;
|
|
240
239
|
process.exit(1);
|
|
@@ -252,7 +251,7 @@ export default async function init(rootDir, siteName, reqTemplate, cliOptions =
|
|
|
252
251
|
// Docusaurus templates.
|
|
253
252
|
if (useTS) {
|
|
254
253
|
if (!(await hasTS(template))) {
|
|
255
|
-
logger.error `Template name=${template} doesn't provide the
|
|
254
|
+
logger.error `Template name=${template} doesn't provide the TypeScript variant.`;
|
|
256
255
|
process.exit(1);
|
|
257
256
|
}
|
|
258
257
|
template = `${template}${TypeScriptTemplateSuffix}`;
|
|
@@ -265,8 +264,8 @@ export default async function init(rootDir, siteName, reqTemplate, cliOptions =
|
|
|
265
264
|
throw err;
|
|
266
265
|
}
|
|
267
266
|
}
|
|
268
|
-
else if (await fs.pathExists(path.resolve(
|
|
269
|
-
const templateDir = path.resolve(
|
|
267
|
+
else if (await fs.pathExists(path.resolve(template))) {
|
|
268
|
+
const templateDir = path.resolve(template);
|
|
270
269
|
try {
|
|
271
270
|
await fs.copy(templateDir, dest);
|
|
272
271
|
}
|
|
@@ -322,7 +321,7 @@ export default async function init(rootDir, siteName, reqTemplate, cliOptions =
|
|
|
322
321
|
}
|
|
323
322
|
}
|
|
324
323
|
const useNpm = pkgManager === 'npm';
|
|
325
|
-
logger.success `Created
|
|
324
|
+
logger.success `Created name=${cdpath}.`;
|
|
326
325
|
logger.info `Inside that directory, you can run several commands:
|
|
327
326
|
|
|
328
327
|
code=${`${pkgManager} start`}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-docusaurus",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.20",
|
|
4
4
|
"description": "Create Docusaurus apps easily.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
},
|
|
14
14
|
"scripts": {
|
|
15
15
|
"create-docusaurus": "create-docusaurus",
|
|
16
|
-
"build": "tsc",
|
|
17
|
-
"watch": "tsc --watch"
|
|
16
|
+
"build": "tsc -p tsconfig.build.json",
|
|
17
|
+
"watch": "tsc -p tsconfig.build.json --watch"
|
|
18
18
|
},
|
|
19
19
|
"bin": "bin/index.js",
|
|
20
20
|
"publishConfig": {
|
|
@@ -22,15 +22,15 @@
|
|
|
22
22
|
},
|
|
23
23
|
"license": "MIT",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@docusaurus/logger": "2.0.0-beta.
|
|
25
|
+
"@docusaurus/logger": "2.0.0-beta.20",
|
|
26
26
|
"commander": "^5.1.0",
|
|
27
|
-
"fs-extra": "^10.0
|
|
27
|
+
"fs-extra": "^10.1.0",
|
|
28
28
|
"lodash": "^4.17.21",
|
|
29
29
|
"prompts": "^2.4.2",
|
|
30
|
-
"semver": "^7.3.
|
|
30
|
+
"semver": "^7.3.7",
|
|
31
31
|
"shelljs": "^0.8.5",
|
|
32
|
-
"supports-color": "^9.2.
|
|
33
|
-
"tslib": "^2.
|
|
32
|
+
"supports-color": "^9.2.2",
|
|
33
|
+
"tslib": "^2.4.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@types/supports-color": "^8.1.1"
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"engines": {
|
|
39
39
|
"node": ">=14"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "ed5cdba401a5948e187e927039b142a0decc702d"
|
|
42
42
|
}
|
|
@@ -13,9 +13,20 @@ const config = {
|
|
|
13
13
|
onBrokenLinks: 'throw',
|
|
14
14
|
onBrokenMarkdownLinks: 'warn',
|
|
15
15
|
favicon: 'img/favicon.ico',
|
|
16
|
+
|
|
17
|
+
// GitHub pages deployment config.
|
|
18
|
+
// If you aren't using GitHub pages, you don't need these.
|
|
16
19
|
organizationName: 'facebook', // Usually your GitHub org/user name.
|
|
17
20
|
projectName: 'docusaurus', // Usually your repo name.
|
|
18
21
|
|
|
22
|
+
// Even if you don't use internalization, you can use this field to set useful
|
|
23
|
+
// metadata like html lang. For example, if your site is Chinese, you may want
|
|
24
|
+
// to replace "en" with "zh-Hans".
|
|
25
|
+
i18n: {
|
|
26
|
+
defaultLocale: 'en',
|
|
27
|
+
locales: ['en'],
|
|
28
|
+
},
|
|
29
|
+
|
|
19
30
|
presets: [
|
|
20
31
|
[
|
|
21
32
|
'classic',
|
|
@@ -24,11 +35,14 @@ const config = {
|
|
|
24
35
|
docs: {
|
|
25
36
|
sidebarPath: require.resolve('./sidebars.js'),
|
|
26
37
|
// Please change this to your repo.
|
|
27
|
-
|
|
38
|
+
// Remove this to remove the "edit this page" links.
|
|
39
|
+
editUrl:
|
|
40
|
+
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
|
|
28
41
|
},
|
|
29
42
|
blog: {
|
|
30
43
|
showReadingTime: true,
|
|
31
44
|
// Please change this to your repo.
|
|
45
|
+
// Remove this to remove the "edit this page" links.
|
|
32
46
|
editUrl:
|
|
33
47
|
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
|
|
34
48
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "docusaurus-2-classic-template",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.20",
|
|
4
4
|
"private": true,
|
|
5
5
|
"scripts": {
|
|
6
6
|
"docusaurus": "docusaurus",
|
|
@@ -14,13 +14,16 @@
|
|
|
14
14
|
"write-heading-ids": "docusaurus write-heading-ids"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@docusaurus/core": "2.0.0-beta.
|
|
18
|
-
"@docusaurus/preset-classic": "2.0.0-beta.
|
|
17
|
+
"@docusaurus/core": "2.0.0-beta.20",
|
|
18
|
+
"@docusaurus/preset-classic": "2.0.0-beta.20",
|
|
19
19
|
"@mdx-js/react": "^1.6.22",
|
|
20
20
|
"clsx": "^1.1.1",
|
|
21
|
-
"prism-react-renderer": "^1.
|
|
22
|
-
"react": "^17.0.
|
|
23
|
-
"react-dom": "^17.0.
|
|
21
|
+
"prism-react-renderer": "^1.3.1",
|
|
22
|
+
"react": "^17.0.2",
|
|
23
|
+
"react-dom": "^17.0.2"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@docusaurus/module-type-aliases": "2.0.0-beta.20"
|
|
24
27
|
},
|
|
25
28
|
"browserslist": {
|
|
26
29
|
"production": [
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
--ifm-color-primary-lighter: #359962;
|
|
15
15
|
--ifm-color-primary-lightest: #3cad6e;
|
|
16
16
|
--ifm-code-font-size: 95%;
|
|
17
|
+
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
/* For readability concerns, you should choose a lighter palette in dark mode. */
|
|
@@ -25,15 +26,5 @@
|
|
|
25
26
|
--ifm-color-primary-light: #29d5b0;
|
|
26
27
|
--ifm-color-primary-lighter: #32d8b4;
|
|
27
28
|
--ifm-color-primary-lightest: #4fddbf;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
.docusaurus-highlight-code-line {
|
|
31
|
-
background-color: rgba(0, 0, 0, 0.1);
|
|
32
|
-
display: block;
|
|
33
|
-
margin: 0 calc(-1 * var(--ifm-pre-padding));
|
|
34
|
-
padding: 0 var(--ifm-pre-padding);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
[data-theme='dark'] .docusaurus-highlight-code-line {
|
|
38
|
-
background-color: rgba(0, 0, 0, 0.3);
|
|
29
|
+
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
|
|
39
30
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "docusaurus-2-classic-typescript-template",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.20",
|
|
4
4
|
"private": true,
|
|
5
5
|
"scripts": {
|
|
6
6
|
"docusaurus": "docusaurus",
|
|
@@ -15,18 +15,18 @@
|
|
|
15
15
|
"typecheck": "tsc"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@docusaurus/core": "2.0.0-beta.
|
|
19
|
-
"@docusaurus/preset-classic": "2.0.0-beta.
|
|
18
|
+
"@docusaurus/core": "2.0.0-beta.20",
|
|
19
|
+
"@docusaurus/preset-classic": "2.0.0-beta.20",
|
|
20
20
|
"@mdx-js/react": "^1.6.22",
|
|
21
21
|
"clsx": "^1.1.1",
|
|
22
|
-
"prism-react-renderer": "^1.
|
|
23
|
-
"react": "^17.0.
|
|
24
|
-
"react-dom": "^17.0.
|
|
22
|
+
"prism-react-renderer": "^1.3.1",
|
|
23
|
+
"react": "^17.0.2",
|
|
24
|
+
"react-dom": "^17.0.2"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@docusaurus/module-type-aliases": "2.0.0-beta.
|
|
28
|
-
"@tsconfig/docusaurus": "^1.0.
|
|
29
|
-
"typescript": "^4.6.
|
|
27
|
+
"@docusaurus/module-type-aliases": "2.0.0-beta.20",
|
|
28
|
+
"@tsconfig/docusaurus": "^1.0.5",
|
|
29
|
+
"typescript": "^4.6.4"
|
|
30
30
|
},
|
|
31
31
|
"browserslist": {
|
|
32
32
|
"production": [
|
|
@@ -18,6 +18,9 @@ const config = {
|
|
|
18
18
|
onBrokenLinks: 'throw',
|
|
19
19
|
onBrokenMarkdownLinks: 'warn',
|
|
20
20
|
favicon: 'img/favicon.ico',
|
|
21
|
+
|
|
22
|
+
// GitHub pages deployment config.
|
|
23
|
+
// If you aren't using GitHub pages, you don't need these.
|
|
21
24
|
organizationName: 'facebook', // Usually your GitHub org/user name.
|
|
22
25
|
projectName: 'docusaurus', // Usually your repo name.
|
|
23
26
|
|
|
@@ -29,12 +32,14 @@ const config = {
|
|
|
29
32
|
docs: {
|
|
30
33
|
sidebarPath: require.resolve('./sidebars.js'),
|
|
31
34
|
// Please change this to your repo.
|
|
35
|
+
// Remove this to remove the "edit this page" links.
|
|
32
36
|
editUrl:
|
|
33
37
|
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
|
|
34
38
|
},
|
|
35
39
|
blog: {
|
|
36
40
|
showReadingTime: true,
|
|
37
41
|
// Please change this to your repo.
|
|
42
|
+
// Remove this to remove the "edit this page" links.
|
|
38
43
|
editUrl:
|
|
39
44
|
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
|
|
40
45
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "docusaurus-2-facebook-template",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.20",
|
|
4
4
|
"private": true,
|
|
5
5
|
"scripts": {
|
|
6
6
|
"docusaurus": "docusaurus",
|
|
@@ -18,25 +18,25 @@
|
|
|
18
18
|
"format:diff": "prettier --config .prettierrc --list-different \"**/*.{js,jsx,ts,tsx,md,mdx}\""
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@docusaurus/core": "2.0.0-beta.
|
|
22
|
-
"@docusaurus/preset-classic": "2.0.0-beta.
|
|
21
|
+
"@docusaurus/core": "2.0.0-beta.20",
|
|
22
|
+
"@docusaurus/preset-classic": "2.0.0-beta.20",
|
|
23
23
|
"@mdx-js/react": "^1.6.22",
|
|
24
24
|
"clsx": "^1.1.1",
|
|
25
|
-
"react": "^17.0.
|
|
26
|
-
"react-dom": "^17.0.
|
|
25
|
+
"react": "^17.0.2",
|
|
26
|
+
"react-dom": "^17.0.2"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@babel/eslint-parser": "^7.
|
|
30
|
-
"eslint": "^8.
|
|
31
|
-
"eslint-config-airbnb": "^19.0.
|
|
32
|
-
"eslint-config-prettier": "^8.
|
|
29
|
+
"@babel/eslint-parser": "^7.17.0",
|
|
30
|
+
"eslint": "^8.14.0",
|
|
31
|
+
"eslint-config-airbnb": "^19.0.4",
|
|
32
|
+
"eslint-config-prettier": "^8.5.0",
|
|
33
33
|
"eslint-plugin-header": "^3.1.1",
|
|
34
|
-
"eslint-plugin-import": "^2.
|
|
34
|
+
"eslint-plugin-import": "^2.26.0",
|
|
35
35
|
"eslint-plugin-jsx-a11y": "^6.5.1",
|
|
36
|
-
"eslint-plugin-react": "^7.29.
|
|
37
|
-
"eslint-plugin-react-hooks": "^4.
|
|
38
|
-
"prettier": "^2.
|
|
39
|
-
"stylelint": "^14.
|
|
36
|
+
"eslint-plugin-react": "^7.29.4",
|
|
37
|
+
"eslint-plugin-react-hooks": "^4.5.0",
|
|
38
|
+
"prettier": "^2.6.2",
|
|
39
|
+
"stylelint": "^14.8.1"
|
|
40
40
|
},
|
|
41
41
|
"browserslist": {
|
|
42
42
|
"production": [
|
|
@@ -35,10 +35,3 @@
|
|
|
35
35
|
--ifm-color-primary-lighter: #32d8b4;
|
|
36
36
|
--ifm-color-primary-lightest: #4fddbf;
|
|
37
37
|
}
|
|
38
|
-
|
|
39
|
-
.docusaurus-highlight-code-line {
|
|
40
|
-
background-color: rgb(72, 77, 91);
|
|
41
|
-
display: block;
|
|
42
|
-
margin: 0 calc(-1 * var(--ifm-pre-padding));
|
|
43
|
-
padding: 0 var(--ifm-pre-padding);
|
|
44
|
-
}
|
|
@@ -41,14 +41,14 @@ This is my **first Docusaurus document**!
|
|
|
41
41
|
|
|
42
42
|
It is also possible to create your sidebar explicitly in `sidebars.js`:
|
|
43
43
|
|
|
44
|
-
```
|
|
44
|
+
```js title="sidebars.js"
|
|
45
45
|
module.exports = {
|
|
46
46
|
tutorialSidebar: [
|
|
47
47
|
{
|
|
48
48
|
type: 'category',
|
|
49
49
|
label: 'Tutorial',
|
|
50
|
-
-
|
|
51
|
-
|
|
50
|
+
// highlight-next-line
|
|
51
|
+
items: ['hello'],
|
|
52
52
|
},
|
|
53
53
|
],
|
|
54
54
|
};
|
|
@@ -43,7 +43,7 @@ Let's see how to [Create a page](./create-a-page.md).
|
|
|
43
43
|
|
|
44
44
|
Regular Markdown images are supported.
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
You can use absolute paths to reference images in the static directory (`static/img/docusaurus.png`):
|
|
47
47
|
|
|
48
48
|
```md
|
|
49
49
|

|
|
@@ -51,6 +51,8 @@ Add an image at `static/img/docusaurus.png` and display it in Markdown:
|
|
|
51
51
|
|
|
52
52
|

|
|
53
53
|
|
|
54
|
+
You can reference images relative to the current file as well, as shown in [the extra guides](../tutorial-extras/manage-docs-versions.md).
|
|
55
|
+
|
|
54
56
|
## Code Blocks
|
|
55
57
|
|
|
56
58
|
Markdown code blocks are supported with Syntax highlighting.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|