mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-11 16:17:25 +02:00
chore: update examples to Docusaurus 2.3.0 (#8590)
This commit is contained in:
parent
de6ec3db18
commit
d184e84739
15 changed files with 2845 additions and 2524 deletions
|
@ -51,7 +51,11 @@ You can use absolute paths to reference images in the static directory (`static/
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
You can reference images relative to the current file as well, as shown in [the extra guides](../tutorial-extras/manage-docs-versions.md).
|
You can reference images relative to the current file as well. This is particularly useful to colocate images close to the Markdown files using them:
|
||||||
|
|
||||||
|
```md
|
||||||
|

|
||||||
|
```
|
||||||
|
|
||||||
## Code Blocks
|
## Code Blocks
|
||||||
|
|
||||||
|
|
17
examples/classic-typescript/docusaurus.config.js
generated
17
examples/classic-typescript/docusaurus.config.js
generated
|
@ -8,18 +8,23 @@ const darkCodeTheme = require('prism-react-renderer/themes/dracula');
|
||||||
const config = {
|
const config = {
|
||||||
title: 'My Site',
|
title: 'My Site',
|
||||||
tagline: 'Dinosaurs are cool',
|
tagline: 'Dinosaurs are cool',
|
||||||
url: 'https://your-docusaurus-test-site.com',
|
|
||||||
baseUrl: '/',
|
|
||||||
onBrokenLinks: 'throw',
|
|
||||||
onBrokenMarkdownLinks: 'warn',
|
|
||||||
favicon: 'img/favicon.ico',
|
favicon: 'img/favicon.ico',
|
||||||
|
|
||||||
|
// Set the production url of your site here
|
||||||
|
url: 'https://your-docusaurus-test-site.com',
|
||||||
|
// Set the /<baseUrl>/ pathname under which your site is served
|
||||||
|
// For GitHub pages deployment, it is often '/<projectName>/'
|
||||||
|
baseUrl: '/',
|
||||||
|
|
||||||
// GitHub pages deployment config.
|
// GitHub pages deployment config.
|
||||||
// If you aren't using GitHub pages, you don't need these.
|
// If you aren't using GitHub pages, you don't need these.
|
||||||
organizationName: 'facebook', // Usually your GitHub org/user name.
|
organizationName: 'facebook', // Usually your GitHub org/user name.
|
||||||
projectName: 'docusaurus', // Usually your repo name.
|
projectName: 'docusaurus', // Usually your repo name.
|
||||||
|
|
||||||
// Even if you don't use internationalization, you can use this field to set useful
|
onBrokenLinks: 'throw',
|
||||||
|
onBrokenMarkdownLinks: 'warn',
|
||||||
|
|
||||||
|
// Even if you don't use internalization, you can use this field to set useful
|
||||||
// metadata like html lang. For example, if your site is Chinese, you may want
|
// metadata like html lang. For example, if your site is Chinese, you may want
|
||||||
// to replace "en" with "zh-Hans".
|
// to replace "en" with "zh-Hans".
|
||||||
i18n: {
|
i18n: {
|
||||||
|
@ -56,6 +61,8 @@ const config = {
|
||||||
themeConfig:
|
themeConfig:
|
||||||
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
|
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
|
||||||
({
|
({
|
||||||
|
// Replace with your project's social card
|
||||||
|
image: 'img/docusaurus-social-card.jpg',
|
||||||
navbar: {
|
navbar: {
|
||||||
title: 'My Site',
|
title: 'My Site',
|
||||||
logo: {
|
logo: {
|
||||||
|
|
6
examples/classic-typescript/package.json
generated
6
examples/classic-typescript/package.json
generated
|
@ -16,8 +16,8 @@
|
||||||
"dev": "docusaurus start"
|
"dev": "docusaurus start"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@docusaurus/core": "2.2.0",
|
"@docusaurus/core": "2.3.0",
|
||||||
"@docusaurus/preset-classic": "2.2.0",
|
"@docusaurus/preset-classic": "2.3.0",
|
||||||
"@mdx-js/react": "^1.6.22",
|
"@mdx-js/react": "^1.6.22",
|
||||||
"clsx": "^1.2.1",
|
"clsx": "^1.2.1",
|
||||||
"prism-react-renderer": "^1.3.5",
|
"prism-react-renderer": "^1.3.5",
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
"react-dom": "^17.0.2"
|
"react-dom": "^17.0.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@docusaurus/module-type-aliases": "2.2.0",
|
"@docusaurus/module-type-aliases": "2.3.0",
|
||||||
"@tsconfig/docusaurus": "^1.0.5",
|
"@tsconfig/docusaurus": "^1.0.5",
|
||||||
"typescript": "^4.7.4"
|
"typescript": "^4.7.4"
|
||||||
},
|
},
|
||||||
|
|
BIN
examples/classic-typescript/static/img/docusaurus-social-card.jpg
generated
Normal file
BIN
examples/classic-typescript/static/img/docusaurus-social-card.jpg
generated
Normal file
Binary file not shown.
After Width: | Height: | Size: 54 KiB |
1567
examples/classic-typescript/yarn.lock
generated
1567
examples/classic-typescript/yarn.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -51,7 +51,11 @@ You can use absolute paths to reference images in the static directory (`static/
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
You can reference images relative to the current file as well, as shown in [the extra guides](../tutorial-extras/manage-docs-versions.md).
|
You can reference images relative to the current file as well. This is particularly useful to colocate images close to the Markdown files using them:
|
||||||
|
|
||||||
|
```md
|
||||||
|

|
||||||
|
```
|
||||||
|
|
||||||
## Code Blocks
|
## Code Blocks
|
||||||
|
|
||||||
|
|
17
examples/classic/docusaurus.config.js
generated
17
examples/classic/docusaurus.config.js
generated
|
@ -8,18 +8,23 @@ const darkCodeTheme = require('prism-react-renderer/themes/dracula');
|
||||||
const config = {
|
const config = {
|
||||||
title: 'My Site',
|
title: 'My Site',
|
||||||
tagline: 'Dinosaurs are cool',
|
tagline: 'Dinosaurs are cool',
|
||||||
url: 'https://your-docusaurus-test-site.com',
|
|
||||||
baseUrl: '/',
|
|
||||||
onBrokenLinks: 'throw',
|
|
||||||
onBrokenMarkdownLinks: 'warn',
|
|
||||||
favicon: 'img/favicon.ico',
|
favicon: 'img/favicon.ico',
|
||||||
|
|
||||||
|
// Set the production url of your site here
|
||||||
|
url: 'https://your-docusaurus-test-site.com',
|
||||||
|
// Set the /<baseUrl>/ pathname under which your site is served
|
||||||
|
// For GitHub pages deployment, it is often '/<projectName>/'
|
||||||
|
baseUrl: '/',
|
||||||
|
|
||||||
// GitHub pages deployment config.
|
// GitHub pages deployment config.
|
||||||
// If you aren't using GitHub pages, you don't need these.
|
// If you aren't using GitHub pages, you don't need these.
|
||||||
organizationName: 'facebook', // Usually your GitHub org/user name.
|
organizationName: 'facebook', // Usually your GitHub org/user name.
|
||||||
projectName: 'docusaurus', // Usually your repo name.
|
projectName: 'docusaurus', // Usually your repo name.
|
||||||
|
|
||||||
// Even if you don't use internationalization, you can use this field to set useful
|
onBrokenLinks: 'throw',
|
||||||
|
onBrokenMarkdownLinks: 'warn',
|
||||||
|
|
||||||
|
// Even if you don't use internalization, you can use this field to set useful
|
||||||
// metadata like html lang. For example, if your site is Chinese, you may want
|
// metadata like html lang. For example, if your site is Chinese, you may want
|
||||||
// to replace "en" with "zh-Hans".
|
// to replace "en" with "zh-Hans".
|
||||||
i18n: {
|
i18n: {
|
||||||
|
@ -56,6 +61,8 @@ const config = {
|
||||||
themeConfig:
|
themeConfig:
|
||||||
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
|
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
|
||||||
({
|
({
|
||||||
|
// Replace with your project's social card
|
||||||
|
image: 'img/docusaurus-social-card.jpg',
|
||||||
navbar: {
|
navbar: {
|
||||||
title: 'My Site',
|
title: 'My Site',
|
||||||
logo: {
|
logo: {
|
||||||
|
|
6
examples/classic/package.json
generated
6
examples/classic/package.json
generated
|
@ -15,8 +15,8 @@
|
||||||
"dev": "docusaurus start"
|
"dev": "docusaurus start"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@docusaurus/core": "2.2.0",
|
"@docusaurus/core": "2.3.0",
|
||||||
"@docusaurus/preset-classic": "2.2.0",
|
"@docusaurus/preset-classic": "2.3.0",
|
||||||
"@mdx-js/react": "^1.6.22",
|
"@mdx-js/react": "^1.6.22",
|
||||||
"clsx": "^1.2.1",
|
"clsx": "^1.2.1",
|
||||||
"prism-react-renderer": "^1.3.5",
|
"prism-react-renderer": "^1.3.5",
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
"react-dom": "^17.0.2"
|
"react-dom": "^17.0.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@docusaurus/module-type-aliases": "2.2.0"
|
"@docusaurus/module-type-aliases": "2.3.0"
|
||||||
},
|
},
|
||||||
"browserslist": {
|
"browserslist": {
|
||||||
"production": [
|
"production": [
|
||||||
|
|
BIN
examples/classic/static/img/docusaurus-social-card.jpg
generated
Normal file
BIN
examples/classic/static/img/docusaurus-social-card.jpg
generated
Normal file
Binary file not shown.
After Width: | Height: | Size: 54 KiB |
1561
examples/classic/yarn.lock
generated
1561
examples/classic/yarn.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -51,7 +51,11 @@ You can use absolute paths to reference images in the static directory (`static/
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
You can reference images relative to the current file as well, as shown in [the extra guides](../tutorial-extras/manage-docs-versions.md).
|
You can reference images relative to the current file as well. This is particularly useful to colocate images close to the Markdown files using them:
|
||||||
|
|
||||||
|
```md
|
||||||
|

|
||||||
|
```
|
||||||
|
|
||||||
## Code Blocks
|
## Code Blocks
|
||||||
|
|
||||||
|
|
14
examples/facebook/docusaurus.config.js
generated
14
examples/facebook/docusaurus.config.js
generated
|
@ -13,17 +13,22 @@
|
||||||
const config = {
|
const config = {
|
||||||
title: 'My Site',
|
title: 'My Site',
|
||||||
tagline: 'The tagline of my site',
|
tagline: 'The tagline of my site',
|
||||||
url: 'https://your-docusaurus-test-site.com',
|
|
||||||
baseUrl: '/',
|
|
||||||
onBrokenLinks: 'throw',
|
|
||||||
onBrokenMarkdownLinks: 'warn',
|
|
||||||
favicon: 'img/favicon.ico',
|
favicon: 'img/favicon.ico',
|
||||||
|
|
||||||
|
// Set the production url of your site here
|
||||||
|
url: 'https://your-docusaurus-test-site.com',
|
||||||
|
// Set the /<baseUrl>/ pathname under which your site is served
|
||||||
|
// For GitHub pages deployment, it is often '/<projectName>/'
|
||||||
|
baseUrl: '/',
|
||||||
|
|
||||||
// GitHub pages deployment config.
|
// GitHub pages deployment config.
|
||||||
// If you aren't using GitHub pages, you don't need these.
|
// If you aren't using GitHub pages, you don't need these.
|
||||||
organizationName: 'facebook', // Usually your GitHub org/user name.
|
organizationName: 'facebook', // Usually your GitHub org/user name.
|
||||||
projectName: 'docusaurus', // Usually your repo name.
|
projectName: 'docusaurus', // Usually your repo name.
|
||||||
|
|
||||||
|
onBrokenLinks: 'throw',
|
||||||
|
onBrokenMarkdownLinks: 'warn',
|
||||||
|
|
||||||
presets: [
|
presets: [
|
||||||
[
|
[
|
||||||
'classic',
|
'classic',
|
||||||
|
@ -53,6 +58,7 @@ const config = {
|
||||||
themeConfig:
|
themeConfig:
|
||||||
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
|
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
|
||||||
({
|
({
|
||||||
|
image: 'img/docusaurus-social-card.jpg',
|
||||||
navbar: {
|
navbar: {
|
||||||
title: 'My Meta Project',
|
title: 'My Meta Project',
|
||||||
logo: {
|
logo: {
|
||||||
|
|
4
examples/facebook/package.json
generated
4
examples/facebook/package.json
generated
|
@ -19,8 +19,8 @@
|
||||||
"dev": "docusaurus start"
|
"dev": "docusaurus start"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@docusaurus/core": "2.2.0",
|
"@docusaurus/core": "2.3.0",
|
||||||
"@docusaurus/preset-classic": "2.2.0",
|
"@docusaurus/preset-classic": "2.3.0",
|
||||||
"@mdx-js/react": "^1.6.22",
|
"@mdx-js/react": "^1.6.22",
|
||||||
"clsx": "^1.2.1",
|
"clsx": "^1.2.1",
|
||||||
"react": "^17.0.2",
|
"react": "^17.0.2",
|
||||||
|
|
BIN
examples/facebook/static/img/docusaurus-social-card.jpg
generated
Normal file
BIN
examples/facebook/static/img/docusaurus-social-card.jpg
generated
Normal file
Binary file not shown.
After Width: | Height: | Size: 54 KiB |
2159
examples/facebook/yarn.lock
generated
2159
examples/facebook/yarn.lock
generated
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue