chore(v2): upgrade examples to beta.2 (#5057)

This commit is contained in:
Sébastien Lorber 2021-06-24 20:02:57 +02:00 committed by GitHub
parent ec2486d2c9
commit 8e386e0244
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 4514 additions and 4470 deletions

View file

@ -8,7 +8,7 @@ author_image_url: https://avatars1.githubusercontent.com/u/17883920?s=460&v=4
tags: [hello, docusaurus] tags: [hello, docusaurus]
--- ---
Welcome to this blog. This blog is created with [**Docusaurus 2 alpha**](https://docusaurus.io/). Welcome to this blog. This blog is created with [**Docusaurus 2**](https://docusaurus.io/).
<!--truncate--> <!--truncate-->

View file

@ -15,8 +15,8 @@
"dev": "docusaurus start" "dev": "docusaurus start"
}, },
"dependencies": { "dependencies": {
"@docusaurus/core": "2.0.0-beta.0", "@docusaurus/core": "2.0.0-beta.2",
"@docusaurus/preset-bootstrap": "2.0.0-beta.0", "@docusaurus/preset-bootstrap": "2.0.0-beta.2",
"@mdx-js/react": "^1.6.21", "@mdx-js/react": "^1.6.21",
"@svgr/webpack": "^5.5.0", "@svgr/webpack": "^5.5.0",
"clsx": "^1.1.1", "clsx": "^1.1.1",

File diff suppressed because it is too large Load diff

View file

@ -8,7 +8,7 @@ author_image_url: https://avatars1.githubusercontent.com/u/17883920?s=460&v=4
tags: [hello, docusaurus] tags: [hello, docusaurus]
--- ---
Welcome to this blog. This blog is created with [**Docusaurus 2 alpha**](https://docusaurus.io/). Welcome to this blog. This blog is created with [**Docusaurus 2**](https://docusaurus.io/).
<!--truncate--> <!--truncate-->

View file

@ -28,12 +28,11 @@ Docusaurus automatically **creates a sidebar** from the `docs` folder.
Add metadatas to customize the sidebar label and position: Add metadatas to customize the sidebar label and position:
```diff title="docs/hello.md" ```md title="docs/hello.md" {1-4}
+ --- ---
+ sidebar_label: "Hi!" sidebar_label: 'Hi!'
+ sidebar_position: 3 sidebar_position: 3
+ --- ---
# Hello # Hello

View file

@ -1,3 +1,6 @@
const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
/** @type {import('@docusaurus/types').DocusaurusConfig} */ /** @type {import('@docusaurus/types').DocusaurusConfig} */
module.exports = { module.exports = {
title: 'My Site', title: 'My Site',
@ -76,6 +79,10 @@ module.exports = {
], ],
copyright: `Copyright © ${new Date().getFullYear()} My Project, Inc. Built with Docusaurus.`, copyright: `Copyright © ${new Date().getFullYear()} My Project, Inc. Built with Docusaurus.`,
}, },
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
}, },
presets: [ presets: [
[ [

View file

@ -15,12 +15,13 @@
"dev": "docusaurus start" "dev": "docusaurus start"
}, },
"dependencies": { "dependencies": {
"@docusaurus/core": "2.0.0-beta.0", "@docusaurus/core": "2.0.0-beta.2",
"@docusaurus/preset-classic": "2.0.0-beta.0", "@docusaurus/preset-classic": "2.0.0-beta.2",
"@mdx-js/react": "^1.6.21", "@mdx-js/react": "^1.6.21",
"@svgr/webpack": "^5.5.0", "@svgr/webpack": "^5.5.0",
"clsx": "^1.1.1", "clsx": "^1.1.1",
"file-loader": "^6.2.0", "file-loader": "^6.2.0",
"prism-react-renderer": "^1.2.1",
"react": "^17.0.1", "react": "^17.0.1",
"react-dom": "^17.0.1", "react-dom": "^17.0.1",
"url-loader": "^4.1.1" "url-loader": "^4.1.1"

View file

@ -1,9 +1,3 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import React from 'react'; import React from 'react';
import clsx from 'clsx'; import clsx from 'clsx';
import styles from './HomepageFeatures.module.css'; import styles from './HomepageFeatures.module.css';

View file

@ -18,8 +18,12 @@
} }
.docusaurus-highlight-code-line { .docusaurus-highlight-code-line {
background-color: rgb(72, 77, 91); background-color: rgba(0, 0, 0, 0.1);
display: block; display: block;
margin: 0 calc(-1 * var(--ifm-pre-padding)); margin: 0 calc(-1 * var(--ifm-pre-padding));
padding: 0 var(--ifm-pre-padding); padding: 0 var(--ifm-pre-padding);
} }
html[data-theme='dark'] .docusaurus-highlight-code-line {
background-color: rgba(0, 0, 0, 0.3);
}

File diff suppressed because it is too large Load diff

View file

@ -8,7 +8,7 @@ author_image_url: https://avatars1.githubusercontent.com/u/17883920?s=460&v=4
tags: [hello, docusaurus] tags: [hello, docusaurus]
--- ---
Welcome to this blog. This blog is created with [**Docusaurus 2 alpha**](https://docusaurus.io/). Welcome to this blog. This blog is created with [**Docusaurus 2**](https://docusaurus.io/).
<!--truncate--> <!--truncate-->

View file

@ -19,8 +19,8 @@
"dev": "docusaurus start" "dev": "docusaurus start"
}, },
"dependencies": { "dependencies": {
"@docusaurus/core": "2.0.0-beta.0", "@docusaurus/core": "2.0.0-beta.2",
"@docusaurus/preset-classic": "2.0.0-beta.0", "@docusaurus/preset-classic": "2.0.0-beta.2",
"@mdx-js/react": "^1.6.21", "@mdx-js/react": "^1.6.21",
"@svgr/webpack": "^5.5.0", "@svgr/webpack": "^5.5.0",
"clsx": "^1.1.1", "clsx": "^1.1.1",

File diff suppressed because it is too large Load diff