Skip to content

Commit c84d779

Browse files
slorberstnorJosh-Cenadependabot[bot]Matija Sirk
authored
chore: backport retro compatible commits for the Docusaurus v2.3 release (#8585)
Co-authored-by: stnor <[email protected]> Co-authored-by: Joshua Chen <[email protected]> Co-authored-by: sebastienlorber <[email protected]> Co-authored-by: Sébastien Lorber <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Matija Sirk <[email protected]> Co-authored-by: AHMET BAYHAN BAYRAMOGLU <[email protected]> Co-authored-by: Stefan Norberg <[email protected]> Co-authored-by: Josh Goldberg <[email protected]> Co-authored-by: Muhammad Hammad <[email protected]> Co-authored-by: Denis Al-Khelali <[email protected]> Co-authored-by: Balthasar Hofer <[email protected]> Co-authored-by: Danny Kim <[email protected]> Co-authored-by: Frieder Bluemle <[email protected]> Co-authored-by: John Reilly <[email protected]> Co-authored-by: Robert Lawrence <[email protected]> Co-authored-by: Sadegh Karimi <[email protected]> Co-authored-by: Lachlan Heywood <[email protected]> Co-authored-by: mturoci <[email protected]> Co-authored-by: 宋锦丰 <[email protected]> Co-authored-by: Nguyễn Thành Nam <[email protected]> Co-authored-by: Dongjoon Lee <[email protected]> Co-authored-by: Thomas.CA <[email protected]> Co-authored-by: Riccardo <[email protected]> Co-authored-by: Lane Goolsby <[email protected]> Co-authored-by: Mariusz Krzaczkowski <[email protected]> Co-authored-by: Matija Sirk <[email protected]> Co-authored-by: Jiří <[email protected]>
1 parent de97214 commit c84d779

File tree

173 files changed

+2638
-1197
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

173 files changed

+2638
-1197
lines changed

admin/new.docusaurus.io/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "new.docusaurus.io",
3-
"version": "2.2.0",
3+
"version": "2.3.0",
44
"private": true,
55
"scripts": {
66
"start": "npx --package netlify-cli netlify dev"

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "2.2.0",
2+
"version": "2.3.0",
33
"npmClient": "yarn",
44
"useWorkspaces": true,
55
"changelog": {

packages/create-docusaurus/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "create-docusaurus",
3-
"version": "2.2.0",
3+
"version": "2.3.0",
44
"description": "Create Docusaurus apps easily.",
55
"type": "module",
66
"repository": {
@@ -22,8 +22,8 @@
2222
},
2323
"license": "MIT",
2424
"dependencies": {
25-
"@docusaurus/logger": "2.2.0",
26-
"@docusaurus/utils": "2.2.0",
25+
"@docusaurus/logger": "2.3.0",
26+
"@docusaurus/utils": "2.3.0",
2727
"commander": "^5.1.0",
2828
"fs-extra": "^10.1.0",
2929
"lodash": "^4.17.21",

packages/create-docusaurus/templates/classic-typescript/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "docusaurus-2-classic-typescript-template",
3-
"version": "2.2.0",
3+
"version": "2.3.0",
44
"private": true,
55
"scripts": {
66
"docusaurus": "docusaurus",
@@ -15,16 +15,16 @@
1515
"typecheck": "tsc"
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
"@tsconfig/docusaurus": "^1.0.5",
2929
"typescript": "^4.7.4"
3030
},

packages/create-docusaurus/templates/classic/docusaurus.config.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,22 @@ 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

24+
onBrokenLinks: 'throw',
25+
onBrokenMarkdownLinks: 'warn',
26+
2227
// 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".
@@ -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: {

packages/create-docusaurus/templates/classic/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "docusaurus-2-classic-template",
3-
"version": "2.2.0",
3+
"version": "2.3.0",
44
"private": true,
55
"scripts": {
66
"docusaurus": "docusaurus",
@@ -14,16 +14,16 @@
1414
"write-heading-ids": "docusaurus write-heading-ids"
1515
},
1616
"dependencies": {
17-
"@docusaurus/core": "2.2.0",
18-
"@docusaurus/preset-classic": "2.2.0",
17+
"@docusaurus/core": "2.3.0",
18+
"@docusaurus/preset-classic": "2.3.0",
1919
"@mdx-js/react": "^1.6.22",
2020
"clsx": "^1.2.1",
2121
"prism-react-renderer": "^1.3.5",
2222
"react": "^17.0.2",
2323
"react-dom": "^17.0.2"
2424
},
2525
"devDependencies": {
26-
"@docusaurus/module-type-aliases": "2.2.0"
26+
"@docusaurus/module-type-aliases": "2.3.0"
2727
},
2828
"browserslist": {
2929
"production": [

packages/create-docusaurus/templates/facebook/docusaurus.config.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,22 @@
1313
const config = {
1414
title: 'My Site',
1515
tagline: 'The tagline of my site',
16+
favicon: 'img/favicon.ico',
17+
18+
// Set the production url of your site here
1619
url: 'https://your-docusaurus-test-site.com',
20+
// Set the /<baseUrl>/ pathname under which your site is served
21+
// For GitHub pages deployment, it is often '/<projectName>/'
1722
baseUrl: '/',
18-
onBrokenLinks: 'throw',
19-
onBrokenMarkdownLinks: 'warn',
20-
favicon: 'img/favicon.ico',
2123

2224
// GitHub pages deployment config.
2325
// If you aren't using GitHub pages, you don't need these.
2426
organizationName: 'facebook', // Usually your GitHub org/user name.
2527
projectName: 'docusaurus', // Usually your repo name.
2628

29+
onBrokenLinks: 'throw',
30+
onBrokenMarkdownLinks: 'warn',
31+
2732
presets: [
2833
[
2934
'classic',
@@ -53,6 +58,7 @@ const config = {
5358
themeConfig:
5459
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
5560
({
61+
image: 'img/docusaurus-social-card.jpg',
5662
navbar: {
5763
title: 'My Meta Project',
5864
logo: {

packages/create-docusaurus/templates/facebook/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "docusaurus-2-facebook-template",
3-
"version": "2.2.0",
3+
"version": "2.3.0",
44
"private": true,
55
"scripts": {
66
"docusaurus": "docusaurus",
@@ -18,8 +18,8 @@
1818
"format:diff": "prettier --config .prettierrc --list-different \"**/*.{js,jsx,ts,tsx,md,mdx}\""
1919
},
2020
"dependencies": {
21-
"@docusaurus/core": "2.2.0",
22-
"@docusaurus/preset-classic": "2.2.0",
21+
"@docusaurus/core": "2.3.0",
22+
"@docusaurus/preset-classic": "2.3.0",
2323
"@mdx-js/react": "^1.6.22",
2424
"clsx": "^1.2.1",
2525
"react": "^17.0.2",

packages/create-docusaurus/templates/shared/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

Loading

0 commit comments

Comments
 (0)