mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-03 12:17:20 +02:00
chore: update examples to Docusaurus 2.3.0 (#8590)
This commit is contained in:
parent
a66ad310db
commit
3fe0d9ba95
5 changed files with 814 additions and 776 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
|
||||||
|
|
||||||
|
|
|
@ -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: {
|
||||||
|
|
|
@ -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
static/img/docusaurus-social-card.jpg
Normal file
BIN
static/img/docusaurus-social-card.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 54 KiB |
Loading…
Add table
Reference in a new issue