create-docusaurus 2.0.0-beta.8 → 2.0.0
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 +43 -41
- package/lib/index.d.ts +16 -5
- package/lib/index.js +348 -156
- package/package.json +18 -18
- package/templates/classic/docusaurus.config.js +17 -3
- package/templates/classic/package.json +14 -11
- package/templates/classic/src/components/{HomepageFeatures.js → HomepageFeatures/index.js} +5 -5
- package/templates/classic/src/components/{HomepageFeatures.module.css → HomepageFeatures/styles.module.css} +0 -0
- package/templates/classic/src/css/custom.css +18 -16
- package/templates/classic/src/pages/index.js +3 -2
- package/templates/classic/src/pages/index.module.css +1 -1
- package/templates/classic-typescript/package.json +14 -14
- package/templates/classic-typescript/src/components/{HomepageFeatures.tsx → HomepageFeatures/index.tsx} +7 -13
- package/templates/classic-typescript/src/pages/index.tsx +3 -2
- package/templates/facebook/.eslintrc.js +10 -4
- package/templates/facebook/.prettierrc +1 -1
- package/templates/facebook/.stylelintrc.js +1 -1
- package/templates/facebook/README.md +9 -1
- package/templates/facebook/babel.config.js +1 -1
- package/templates/facebook/docusaurus.config.js +22 -14
- package/templates/facebook/package.json +24 -24
- package/templates/facebook/sidebars.js +1 -1
- package/templates/facebook/src/css/custom.css +17 -13
- package/templates/facebook/src/pages/index.js +1 -1
- package/templates/facebook/src/pages/styles.module.css +2 -2
- package/templates/facebook/static/img/meta_opensource_logo.svg +1 -0
- package/templates/facebook/static/img/meta_opensource_logo_negative.svg +1 -0
- package/templates/shared/README.md +9 -1
- package/templates/shared/docs/intro.md +19 -7
- package/templates/shared/docs/tutorial-basics/_category_.json +5 -1
- package/templates/shared/docs/tutorial-basics/create-a-blog-post.md +1 -1
- package/templates/shared/docs/tutorial-basics/create-a-document.md +6 -6
- package/templates/shared/docs/tutorial-basics/create-a-page.md +5 -5
- package/templates/shared/docs/tutorial-basics/deploy-your-site.md +1 -1
- 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 +2 -2
- package/templates/shared/static/img/undraw_docusaurus_mountain.svg +1 -0
- package/templates/shared/static/img/undraw_docusaurus_react.svg +1 -0
- package/templates/shared/static/img/undraw_docusaurus_tree.svg +40 -1
- package/lib/.tsbuildinfo +0 -1
- package/src/index.ts +0 -289
- package/templates/facebook/static/img/oss_logo.png +0 -0
- package/templates/shared/static/img/tutorial/docsVersionDropdown.png +0 -0
- package/templates/shared/static/img/tutorial/localeDropdown.png +0 -0
- package/tsconfig.json +0 -11
|
@@ -13,24 +13,38 @@ 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',
|
|
22
33
|
/** @type {import('@docusaurus/preset-classic').Options} */
|
|
23
34
|
({
|
|
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
|
-
'https://github.com/facebook/docusaurus/
|
|
47
|
+
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
|
|
34
48
|
},
|
|
35
49
|
theme: {
|
|
36
50
|
customCss: require.resolve('./src/css/custom.css'),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "docusaurus-2-classic-template",
|
|
3
|
-
"version": "2.0.0
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"private": true,
|
|
5
5
|
"scripts": {
|
|
6
6
|
"docusaurus": "docusaurus",
|
|
@@ -14,16 +14,16 @@
|
|
|
14
14
|
"write-heading-ids": "docusaurus write-heading-ids"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@docusaurus/core": "2.0.0
|
|
18
|
-
"@docusaurus/preset-classic": "2.0.0
|
|
19
|
-
"@mdx-js/react": "^1.6.
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"
|
|
17
|
+
"@docusaurus/core": "2.0.0",
|
|
18
|
+
"@docusaurus/preset-classic": "2.0.0",
|
|
19
|
+
"@mdx-js/react": "^1.6.22",
|
|
20
|
+
"clsx": "^1.2.1",
|
|
21
|
+
"prism-react-renderer": "^1.3.5",
|
|
22
|
+
"react": "^17.0.2",
|
|
23
|
+
"react-dom": "^17.0.2"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@docusaurus/module-type-aliases": "2.0.0"
|
|
27
27
|
},
|
|
28
28
|
"browserslist": {
|
|
29
29
|
"production": [
|
|
@@ -36,5 +36,8 @@
|
|
|
36
36
|
"last 1 firefox version",
|
|
37
37
|
"last 1 safari version"
|
|
38
38
|
]
|
|
39
|
+
},
|
|
40
|
+
"engines": {
|
|
41
|
+
"node": ">=16.14"
|
|
39
42
|
}
|
|
40
43
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
|
-
import styles from './
|
|
3
|
+
import styles from './styles.module.css';
|
|
4
4
|
|
|
5
5
|
const FeatureList = [
|
|
6
6
|
{
|
|
7
7
|
title: 'Easy to Use',
|
|
8
|
-
Svg: require('
|
|
8
|
+
Svg: require('@site/static/img/undraw_docusaurus_mountain.svg').default,
|
|
9
9
|
description: (
|
|
10
10
|
<>
|
|
11
11
|
Docusaurus was designed from the ground up to be easily installed and
|
|
@@ -15,7 +15,7 @@ const FeatureList = [
|
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
title: 'Focus on What Matters',
|
|
18
|
-
Svg: require('
|
|
18
|
+
Svg: require('@site/static/img/undraw_docusaurus_tree.svg').default,
|
|
19
19
|
description: (
|
|
20
20
|
<>
|
|
21
21
|
Docusaurus lets you focus on your docs, and we'll do the chores. Go
|
|
@@ -25,7 +25,7 @@ const FeatureList = [
|
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
title: 'Powered by React',
|
|
28
|
-
Svg: require('
|
|
28
|
+
Svg: require('@site/static/img/undraw_docusaurus_react.svg').default,
|
|
29
29
|
description: (
|
|
30
30
|
<>
|
|
31
31
|
Extend or customize your website layout by reusing React. Docusaurus can
|
|
@@ -39,7 +39,7 @@ function Feature({Svg, title, description}) {
|
|
|
39
39
|
return (
|
|
40
40
|
<div className={clsx('col col--4')}>
|
|
41
41
|
<div className="text--center">
|
|
42
|
-
<Svg className={styles.featureSvg}
|
|
42
|
+
<Svg className={styles.featureSvg} role="img" />
|
|
43
43
|
</div>
|
|
44
44
|
<div className="text--center padding-horiz--md">
|
|
45
45
|
<h3>{title}</h3>
|
|
File without changes
|
|
@@ -6,23 +6,25 @@
|
|
|
6
6
|
|
|
7
7
|
/* You can override the default Infima variables here. */
|
|
8
8
|
:root {
|
|
9
|
-
--ifm-color-primary: #
|
|
10
|
-
--ifm-color-primary-dark:
|
|
11
|
-
--ifm-color-primary-darker:
|
|
12
|
-
--ifm-color-primary-darkest:
|
|
13
|
-
--ifm-color-primary-light:
|
|
14
|
-
--ifm-color-primary-lighter:
|
|
15
|
-
--ifm-color-primary-lightest:
|
|
9
|
+
--ifm-color-primary: #2e8555;
|
|
10
|
+
--ifm-color-primary-dark: #29784c;
|
|
11
|
+
--ifm-color-primary-darker: #277148;
|
|
12
|
+
--ifm-color-primary-darkest: #205d3b;
|
|
13
|
+
--ifm-color-primary-light: #33925d;
|
|
14
|
+
--ifm-color-primary-lighter: #359962;
|
|
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
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
/* For readability concerns, you should choose a lighter palette in dark mode. */
|
|
21
|
+
[data-theme='dark'] {
|
|
22
|
+
--ifm-color-primary: #25c2a0;
|
|
23
|
+
--ifm-color-primary-dark: #21af90;
|
|
24
|
+
--ifm-color-primary-darker: #1fa588;
|
|
25
|
+
--ifm-color-primary-darkest: #1a8870;
|
|
26
|
+
--ifm-color-primary-light: #29d5b0;
|
|
27
|
+
--ifm-color-primary-lighter: #32d8b4;
|
|
28
|
+
--ifm-color-primary-lightest: #4fddbf;
|
|
29
|
+
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
|
|
28
30
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
|
-
import Layout from '@theme/Layout';
|
|
4
3
|
import Link from '@docusaurus/Link';
|
|
5
4
|
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
|
5
|
+
import Layout from '@theme/Layout';
|
|
6
|
+
import HomepageFeatures from '@site/src/components/HomepageFeatures';
|
|
7
|
+
|
|
6
8
|
import styles from './index.module.css';
|
|
7
|
-
import HomepageFeatures from '../components/HomepageFeatures';
|
|
8
9
|
|
|
9
10
|
function HomepageHeader() {
|
|
10
11
|
const {siteConfig} = useDocusaurusContext();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "docusaurus-2-classic-typescript-template",
|
|
3
|
-
"version": "2.0.0
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"private": true,
|
|
5
5
|
"scripts": {
|
|
6
6
|
"docusaurus": "docusaurus",
|
|
@@ -15,21 +15,18 @@
|
|
|
15
15
|
"typecheck": "tsc"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@docusaurus/core": "2.0.0
|
|
19
|
-
"@docusaurus/preset-classic": "2.0.0
|
|
20
|
-
"@mdx-js/react": "^1.6.
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"react": "^17.0.1",
|
|
26
|
-
"react-dom": "^17.0.1",
|
|
27
|
-
"url-loader": "^4.1.1"
|
|
18
|
+
"@docusaurus/core": "2.0.0",
|
|
19
|
+
"@docusaurus/preset-classic": "2.0.0",
|
|
20
|
+
"@mdx-js/react": "^1.6.22",
|
|
21
|
+
"clsx": "^1.2.1",
|
|
22
|
+
"prism-react-renderer": "^1.3.5",
|
|
23
|
+
"react": "^17.0.2",
|
|
24
|
+
"react-dom": "^17.0.2"
|
|
28
25
|
},
|
|
29
26
|
"devDependencies": {
|
|
30
|
-
"@docusaurus/module-type-aliases": "2.0.0
|
|
31
|
-
"@tsconfig/docusaurus": "^1.0.
|
|
32
|
-
"typescript": "^4.
|
|
27
|
+
"@docusaurus/module-type-aliases": "2.0.0",
|
|
28
|
+
"@tsconfig/docusaurus": "^1.0.5",
|
|
29
|
+
"typescript": "^4.7.4"
|
|
33
30
|
},
|
|
34
31
|
"browserslist": {
|
|
35
32
|
"production": [
|
|
@@ -42,5 +39,8 @@
|
|
|
42
39
|
"last 1 firefox version",
|
|
43
40
|
"last 1 safari version"
|
|
44
41
|
]
|
|
42
|
+
},
|
|
43
|
+
"engines": {
|
|
44
|
+
"node": ">=16.14"
|
|
45
45
|
}
|
|
46
46
|
}
|
|
@@ -1,23 +1,17 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
1
|
import React from 'react';
|
|
8
2
|
import clsx from 'clsx';
|
|
9
|
-
import styles from './
|
|
3
|
+
import styles from './styles.module.css';
|
|
10
4
|
|
|
11
5
|
type FeatureItem = {
|
|
12
6
|
title: string;
|
|
13
|
-
|
|
7
|
+
Svg: React.ComponentType<React.ComponentProps<'svg'>>;
|
|
14
8
|
description: JSX.Element;
|
|
15
9
|
};
|
|
16
10
|
|
|
17
11
|
const FeatureList: FeatureItem[] = [
|
|
18
12
|
{
|
|
19
13
|
title: 'Easy to Use',
|
|
20
|
-
|
|
14
|
+
Svg: require('@site/static/img/undraw_docusaurus_mountain.svg').default,
|
|
21
15
|
description: (
|
|
22
16
|
<>
|
|
23
17
|
Docusaurus was designed from the ground up to be easily installed and
|
|
@@ -27,7 +21,7 @@ const FeatureList: FeatureItem[] = [
|
|
|
27
21
|
},
|
|
28
22
|
{
|
|
29
23
|
title: 'Focus on What Matters',
|
|
30
|
-
|
|
24
|
+
Svg: require('@site/static/img/undraw_docusaurus_tree.svg').default,
|
|
31
25
|
description: (
|
|
32
26
|
<>
|
|
33
27
|
Docusaurus lets you focus on your docs, and we'll do the chores. Go
|
|
@@ -37,7 +31,7 @@ const FeatureList: FeatureItem[] = [
|
|
|
37
31
|
},
|
|
38
32
|
{
|
|
39
33
|
title: 'Powered by React',
|
|
40
|
-
|
|
34
|
+
Svg: require('@site/static/img/undraw_docusaurus_react.svg').default,
|
|
41
35
|
description: (
|
|
42
36
|
<>
|
|
43
37
|
Extend or customize your website layout by reusing React. Docusaurus can
|
|
@@ -47,11 +41,11 @@ const FeatureList: FeatureItem[] = [
|
|
|
47
41
|
},
|
|
48
42
|
];
|
|
49
43
|
|
|
50
|
-
function Feature({title,
|
|
44
|
+
function Feature({title, Svg, description}: FeatureItem) {
|
|
51
45
|
return (
|
|
52
46
|
<div className={clsx('col col--4')}>
|
|
53
47
|
<div className="text--center">
|
|
54
|
-
<
|
|
48
|
+
<Svg className={styles.featureSvg} role="img" />
|
|
55
49
|
</div>
|
|
56
50
|
<div className="text--center padding-horiz--md">
|
|
57
51
|
<h3>{title}</h3>
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
|
-
import Layout from '@theme/Layout';
|
|
4
3
|
import Link from '@docusaurus/Link';
|
|
5
4
|
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
|
5
|
+
import Layout from '@theme/Layout';
|
|
6
|
+
import HomepageFeatures from '@site/src/components/HomepageFeatures';
|
|
7
|
+
|
|
6
8
|
import styles from './index.module.css';
|
|
7
|
-
import HomepageFeatures from '../components/HomepageFeatures';
|
|
8
9
|
|
|
9
10
|
function HomepageHeader() {
|
|
10
11
|
const {siteConfig} = useDocusaurusContext();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -23,7 +23,7 @@ module.exports = {
|
|
|
23
23
|
parserOptions: {
|
|
24
24
|
allowImportExportEverywhere: true,
|
|
25
25
|
},
|
|
26
|
-
extends: ['airbnb', 'prettier'
|
|
26
|
+
extends: ['airbnb', 'prettier'],
|
|
27
27
|
plugins: ['react-hooks', 'header'],
|
|
28
28
|
rules: {
|
|
29
29
|
// Ignore certain webpack alias because it can't be resolved
|
|
@@ -38,7 +38,7 @@ module.exports = {
|
|
|
38
38
|
|
|
39
39
|
[
|
|
40
40
|
'*',
|
|
41
|
-
' * Copyright (c)
|
|
41
|
+
' * Copyright (c) Meta Platforms, Inc. and affiliates.',
|
|
42
42
|
' *',
|
|
43
43
|
' * This source code is licensed under the MIT license found in the',
|
|
44
44
|
' * LICENSE file in the root directory of this source tree.',
|
|
@@ -52,9 +52,15 @@ module.exports = {
|
|
|
52
52
|
' ',
|
|
53
53
|
],
|
|
54
54
|
],
|
|
55
|
-
'react/jsx-closing-bracket-location': OFF, // Conflicts with Prettier.
|
|
56
55
|
'react/jsx-filename-extension': OFF,
|
|
57
56
|
'react-hooks/rules-of-hooks': ERROR,
|
|
58
57
|
'react/prop-types': OFF, // PropTypes aren't used much these days.
|
|
58
|
+
'react/function-component-definition': [
|
|
59
|
+
WARNING,
|
|
60
|
+
{
|
|
61
|
+
namedComponents: 'function-declaration',
|
|
62
|
+
unnamedComponents: 'arrow-function',
|
|
63
|
+
},
|
|
64
|
+
],
|
|
59
65
|
},
|
|
60
66
|
};
|
|
@@ -26,8 +26,16 @@ This command generates static content into the `build` directory and can be serv
|
|
|
26
26
|
|
|
27
27
|
### Deployment
|
|
28
28
|
|
|
29
|
+
Using SSH:
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
$ USE_SSH=true yarn deploy
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Not using SSH:
|
|
36
|
+
|
|
29
37
|
```
|
|
30
|
-
$ GIT_USER=<Your GitHub username>
|
|
38
|
+
$ GIT_USER=<Your GitHub username> yarn deploy
|
|
31
39
|
```
|
|
32
40
|
|
|
33
41
|
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -18,24 +18,30 @@ 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
|
|
|
24
27
|
presets: [
|
|
25
28
|
[
|
|
26
|
-
'
|
|
29
|
+
'classic',
|
|
27
30
|
/** @type {import('@docusaurus/preset-classic').Options} */
|
|
28
31
|
({
|
|
29
32
|
docs: {
|
|
30
33
|
sidebarPath: require.resolve('./sidebars.js'),
|
|
31
34
|
// Please change this to your repo.
|
|
32
|
-
|
|
35
|
+
// Remove this to remove the "edit this page" links.
|
|
36
|
+
editUrl:
|
|
37
|
+
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
|
|
33
38
|
},
|
|
34
39
|
blog: {
|
|
35
40
|
showReadingTime: true,
|
|
36
41
|
// Please change this to your repo.
|
|
42
|
+
// Remove this to remove the "edit this page" links.
|
|
37
43
|
editUrl:
|
|
38
|
-
'https://github.com/facebook/docusaurus/
|
|
44
|
+
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
|
|
39
45
|
},
|
|
40
46
|
theme: {
|
|
41
47
|
customCss: require.resolve('./src/css/custom.css'),
|
|
@@ -48,9 +54,9 @@ const config = {
|
|
|
48
54
|
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
|
|
49
55
|
({
|
|
50
56
|
navbar: {
|
|
51
|
-
title: 'My
|
|
57
|
+
title: 'My Meta Project',
|
|
52
58
|
logo: {
|
|
53
|
-
alt: 'My
|
|
59
|
+
alt: 'My Meta Project Logo',
|
|
54
60
|
src: 'img/logo.svg',
|
|
55
61
|
},
|
|
56
62
|
items: [
|
|
@@ -121,30 +127,32 @@ const config = {
|
|
|
121
127
|
items: [
|
|
122
128
|
{
|
|
123
129
|
label: 'Privacy',
|
|
124
|
-
href: 'https://opensource.
|
|
130
|
+
href: 'https://opensource.fb.com/legal/privacy/',
|
|
125
131
|
},
|
|
126
132
|
{
|
|
127
133
|
label: 'Terms',
|
|
128
|
-
href: 'https://opensource.
|
|
134
|
+
href: 'https://opensource.fb.com/legal/terms/',
|
|
129
135
|
},
|
|
130
136
|
{
|
|
131
137
|
label: 'Data Policy',
|
|
132
|
-
href: 'https://opensource.
|
|
138
|
+
href: 'https://opensource.fb.com/legal/data-policy/',
|
|
133
139
|
},
|
|
134
140
|
{
|
|
135
141
|
label: 'Cookie Policy',
|
|
136
|
-
href: 'https://opensource.
|
|
142
|
+
href: 'https://opensource.fb.com/legal/cookie-policy/',
|
|
137
143
|
},
|
|
138
144
|
],
|
|
139
145
|
},
|
|
140
146
|
],
|
|
141
147
|
logo: {
|
|
142
|
-
alt: '
|
|
143
|
-
|
|
144
|
-
|
|
148
|
+
alt: 'Meta Open Source Logo',
|
|
149
|
+
// This default includes a positive & negative version, allowing for
|
|
150
|
+
// appropriate use depending on your site's style.
|
|
151
|
+
src: '/img/meta_opensource_logo_negative.svg',
|
|
152
|
+
href: 'https://opensource.fb.com',
|
|
145
153
|
},
|
|
146
154
|
// Please do not remove the credits, help to publicize Docusaurus :)
|
|
147
|
-
copyright: `Copyright © ${new Date().getFullYear()}
|
|
155
|
+
copyright: `Copyright © ${new Date().getFullYear()} Meta Platforms, Inc. Built with Docusaurus.`,
|
|
148
156
|
},
|
|
149
157
|
}),
|
|
150
158
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "docusaurus-2-facebook-template",
|
|
3
|
-
"version": "2.0.0
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"private": true,
|
|
5
5
|
"scripts": {
|
|
6
6
|
"docusaurus": "docusaurus",
|
|
@@ -12,34 +12,31 @@
|
|
|
12
12
|
"serve": "docusaurus serve",
|
|
13
13
|
"write-translations": "docusaurus write-translations",
|
|
14
14
|
"write-heading-ids": "docusaurus write-heading-ids",
|
|
15
|
-
"ci": "yarn lint && yarn
|
|
15
|
+
"ci": "yarn lint && yarn format:diff",
|
|
16
16
|
"lint": "eslint --cache \"**/*.js\" && stylelint \"**/*.css\"",
|
|
17
|
-
"
|
|
18
|
-
"
|
|
17
|
+
"format": "prettier --config .prettierrc --write \"**/*.{js,jsx,ts,tsx,md,mdx}\"",
|
|
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
|
|
22
|
-
"@docusaurus/preset-classic": "2.0.0
|
|
23
|
-
"@mdx-js/react": "^1.6.
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"react": "^17.0.1",
|
|
28
|
-
"react-dom": "^17.0.1",
|
|
29
|
-
"url-loader": "^4.1.1"
|
|
21
|
+
"@docusaurus/core": "2.0.0",
|
|
22
|
+
"@docusaurus/preset-classic": "2.0.0",
|
|
23
|
+
"@mdx-js/react": "^1.6.22",
|
|
24
|
+
"clsx": "^1.2.1",
|
|
25
|
+
"react": "^17.0.2",
|
|
26
|
+
"react-dom": "^17.0.2"
|
|
30
27
|
},
|
|
31
28
|
"devDependencies": {
|
|
32
|
-
"@babel/eslint-parser": "^7.
|
|
33
|
-
"eslint": "^
|
|
34
|
-
"eslint-config-airbnb": "^
|
|
35
|
-
"eslint-config-prettier": "^
|
|
36
|
-
"eslint-plugin-header": "^3.
|
|
37
|
-
"eslint-plugin-import": "^2.
|
|
38
|
-
"eslint-plugin-jsx-a11y": "^6.
|
|
39
|
-
"eslint-plugin-react": "^7.
|
|
40
|
-
"eslint-plugin-react-hooks": "^4.
|
|
41
|
-
"prettier": "^2.
|
|
42
|
-
"stylelint": "^
|
|
29
|
+
"@babel/eslint-parser": "^7.18.2",
|
|
30
|
+
"eslint": "^8.19.0",
|
|
31
|
+
"eslint-config-airbnb": "^19.0.4",
|
|
32
|
+
"eslint-config-prettier": "^8.5.0",
|
|
33
|
+
"eslint-plugin-header": "^3.1.1",
|
|
34
|
+
"eslint-plugin-import": "^2.26.0",
|
|
35
|
+
"eslint-plugin-jsx-a11y": "^6.6.0",
|
|
36
|
+
"eslint-plugin-react": "^7.30.1",
|
|
37
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
38
|
+
"prettier": "^2.7.1",
|
|
39
|
+
"stylelint": "^14.9.1"
|
|
43
40
|
},
|
|
44
41
|
"browserslist": {
|
|
45
42
|
"production": [
|
|
@@ -52,5 +49,8 @@
|
|
|
52
49
|
"last 1 firefox version",
|
|
53
50
|
"last 1 safari version"
|
|
54
51
|
]
|
|
52
|
+
},
|
|
53
|
+
"engines": {
|
|
54
|
+
"node": ">=16.14"
|
|
55
55
|
}
|
|
56
56
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -15,19 +15,23 @@
|
|
|
15
15
|
|
|
16
16
|
/* You can override the default Infima variables here. */
|
|
17
17
|
:root {
|
|
18
|
-
--ifm-color-primary: #
|
|
19
|
-
--ifm-color-primary-dark:
|
|
20
|
-
--ifm-color-primary-darker:
|
|
21
|
-
--ifm-color-primary-darkest:
|
|
22
|
-
--ifm-color-primary-light:
|
|
23
|
-
--ifm-color-primary-lighter:
|
|
24
|
-
--ifm-color-primary-lightest:
|
|
18
|
+
--ifm-color-primary: #2e8555;
|
|
19
|
+
--ifm-color-primary-dark: #29784c;
|
|
20
|
+
--ifm-color-primary-darker: #277148;
|
|
21
|
+
--ifm-color-primary-darkest: #205d3b;
|
|
22
|
+
--ifm-color-primary-light: #33925d;
|
|
23
|
+
--ifm-color-primary-lighter: #359962;
|
|
24
|
+
--ifm-color-primary-lightest: #3cad6e;
|
|
25
25
|
--ifm-code-font-size: 95%;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
.
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
/* For readability concerns, you should choose a lighter palette in dark mode. */
|
|
29
|
+
[data-theme='dark'] {
|
|
30
|
+
--ifm-color-primary: #25c2a0;
|
|
31
|
+
--ifm-color-primary-dark: #21af90;
|
|
32
|
+
--ifm-color-primary-darker: #1fa588;
|
|
33
|
+
--ifm-color-primary-darkest: #1a8870;
|
|
34
|
+
--ifm-color-primary-light: #29d5b0;
|
|
35
|
+
--ifm-color-primary-lighter: #32d8b4;
|
|
36
|
+
--ifm-color-primary-lightest: #4fddbf;
|
|
33
37
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
overflow: hidden;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
@media screen and (max-width:
|
|
22
|
+
@media screen and (max-width: 996px) {
|
|
23
23
|
.heroBanner {
|
|
24
24
|
padding: 2rem;
|
|
25
25
|
}
|