Skip to content

Commit 3fe0d9b

Browse files
authored
chore: update examples to Docusaurus 2.3.0 (#8590)
1 parent a66ad31 commit 3fe0d9b

5 files changed

Lines changed: 821 additions & 783 deletions

File tree

docs/tutorial-basics/markdown-features.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,11 @@ You can use absolute paths to reference images in the static directory (`static/
5151

5252
![Docusaurus logo](/img/docusaurus.png)
5353

54-
You can reference images relative to the current file as well, as shown in [the extra guides](../tutorial-extras/manage-docs-versions.md).
54+
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:
55+
56+
```md
57+
![Docusaurus logo](./img/docusaurus.png)
58+
```
5559

5660
## Code Blocks
5761

docusaurus.config.js

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,23 @@ const darkCodeTheme = require('prism-react-renderer/themes/dracula');
88
const config = {
99
title: 'My Site',
1010
tagline: 'Dinosaurs are cool',
11+
favicon: 'img/favicon.ico',
12+
13+
// Set the production url of your site here
1114
url: 'https://your-docusaurus-test-site.com',
15+
// Set the /<baseUrl>/ pathname under which your site is served
16+
// For GitHub pages deployment, it is often '/<projectName>/'
1217
baseUrl: '/',
13-
onBrokenLinks: 'throw',
14-
onBrokenMarkdownLinks: 'warn',
15-
favicon: 'img/favicon.ico',
1618

1719
// GitHub pages deployment config.
1820
// If you aren't using GitHub pages, you don't need these.
1921
organizationName: 'facebook', // Usually your GitHub org/user name.
2022
projectName: 'docusaurus', // Usually your repo name.
2123

22-
// Even if you don't use internationalization, you can use this field to set useful
24+
onBrokenLinks: 'throw',
25+
onBrokenMarkdownLinks: 'warn',
26+
27+
// Even if you don't use internalization, you can use this field to set useful
2328
// metadata like html lang. For example, if your site is Chinese, you may want
2429
// to replace "en" with "zh-Hans".
2530
i18n: {
@@ -56,6 +61,8 @@ const config = {
5661
themeConfig:
5762
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
5863
({
64+
// Replace with your project's social card
65+
image: 'img/docusaurus-social-card.jpg',
5966
navbar: {
6067
title: 'My Site',
6168
logo: {

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@
1515
"dev": "docusaurus start"
1616
},
1717
"dependencies": {
18-
"@docusaurus/core": "2.2.0",
19-
"@docusaurus/preset-classic": "2.2.0",
18+
"@docusaurus/core": "2.3.0",
19+
"@docusaurus/preset-classic": "2.3.0",
2020
"@mdx-js/react": "^1.6.22",
2121
"clsx": "^1.2.1",
2222
"prism-react-renderer": "^1.3.5",
2323
"react": "^17.0.2",
2424
"react-dom": "^17.0.2"
2525
},
2626
"devDependencies": {
27-
"@docusaurus/module-type-aliases": "2.2.0"
27+
"@docusaurus/module-type-aliases": "2.3.0"
2828
},
2929
"browserslist": {
3030
"production": [
54.4 KB
Loading

0 commit comments

Comments
 (0)