Skip to content

Commit 915730a

Browse files
committed
Tweak blue; Update readme
1 parent 025919e commit 915730a

File tree

2 files changed

+11
-14
lines changed

2 files changed

+11
-14
lines changed

README.md

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
# Devbook Docusaurus Video Plugin
2-
The Devbook Docusaurus plugin allows you to attach videos to code blocks in your [Docusaurus](https://docusaurus.io/) docs.
3-
4-
## Demo
5-
Check the [demo](./example/) here.
2+
The Devbook Docusaurus video plugin allows you to attach videos to code blocks in your [Docusaurus](https://docusaurus.io/) docs.
63

74
## Usage
85
Install plugin:
@@ -18,15 +15,15 @@ module.exports = {
1815
```
1916

2017
### Add video to a code snippet
21-
In the **Markdown** add `youtubeID` attribute to the code block:
18+
In **Markdown** add `youtubeID` attribute to the code block:
2219

2320
```js youtubeID=4HGNqFdaD34
2421
function main() {
2522

2623
}
2724
```
2825

29-
If you are using **MDX/JSX/TSX** `CodeBlock` add the `youtubeID` prop:
26+
If you are using **MDX/JSX/TSX** [`CodeBlock`](https://docusaurus.io/docs/markdown-features/code-blocks) add the `youtubeID` prop:
3027

3128
```jsx
3229
import CodeBlock from '@theme/CodeBlock';
@@ -35,21 +32,21 @@ import MyComponentSource from '!!raw-loader!./myComponent';
3532
<CodeBlock youtubeID="4HGNqFdaD34" language="jsx">{MyComponentSource}</CodeBlock>
3633
```
3734

38-
> You need to pass just the YouTube video ID, not the whole URL. You can get the ID from the normal URL - `https://www.youtube.com/watch?v=`**`[youtubeID]`**, or from the embed URL - `https://www.youtube.com/embed/`**`[youtubeID]`**.
35+
> You need to pass just the YouTube video ID, not the whole URL. You can get the ID from the normal video URL - `https://www.youtube.com/watch?v=`**`[youtubeID]`**, or from the embed URL - `https://www.youtube.com/embed/`**`[youtubeID]`**.
3936
40-
### Add code highlights at set video timestamps
41-
The highlight attribute is in the format `start-end=(range)`.
37+
### Add code highlights at video timestamps
38+
The video highlights are in the format `start-end=(range)`.
4239
The start and the end timestamps are in the `H:M:S` format and the hours are optional (`M:S`).
4340

44-
In the **Markdown** add highlight attributes to the code block:
41+
In **Markdown** add highlight attributes to the code block:
4542

4643
```js youtubeID=4HGNqFdaD34 0:10-1:00=(1) 1:10-1:20=(1,2-3)
4744
function main() {
4845

4946
}
5047
```
5148

52-
If you are using **MDX/JSX/TSX** `CodeBlock` add the attributes as props:
49+
If you are using **MDX/JSX/TSX** [`CodeBlock`](https://docusaurus.io/docs/markdown-features/code-blocks) add the highlight attributes as props:
5350

5451
```jsx
5552
import CodeBlock from '@theme/CodeBlock';
@@ -58,9 +55,9 @@ import MyComponentSource from '!!raw-loader!./myComponent';
5855
<CodeBlock youtubeID="4HGNqFdaD34" "0:10-1:00"="(1)" "1:10-1:20"="(1,2-3)" language="jsx">{MyComponentSource}</CodeBlock>
5956
```
6057

61-
> The highlight range format is the same as in the Docusaurus code blocks - https://docusaurus.io/docs/markdown-features/code-blocks#highlighting-with-metadata-string, just with the `()` parentheses instead of the `{}` parentheses.
58+
> The highlight range format is the same as in the [Docusaurus code blocks]( https://docusaurus.io/docs/markdown-features/code-blocks#highlighting-with-metadata-string), just with the `()` parentheses instead of the `{}` parentheses.
6259
63-
> You can change the video line highlight style by customizing the `docusaurus-highlight-code-line` class - the same way you would change the default Docusaurus highlight style.
60+
> You can change the video line highlight style by customizing the `docusaurus-highlight-code-line` class - the same way you would change the [default Docusaurus highlight style](https://docusaurus.io/docs/markdown-features/code-blocks#line-highlighting).
6461
6562
## Supported video sources
6663
- YouTube

src/theme/CodeBlock/VideoPlayer/styles.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
-ms-user-select: none;
4848

4949
height: 100%;
50-
filter: brightness(0.8) blur(3px);
50+
filter: brightness(0.9) blur(2px);
5151
}
5252

5353
.play {

0 commit comments

Comments
 (0)