Skip to content

Commit 1b71f65

Browse files
committed
Upgrade docusaurus to v3 - Blog author definitions
1 parent 1844e62 commit 1b71f65

10 files changed

+9169
-28
lines changed

blog/2019-05-28-first-blog-post.md

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
---
22
slug: first-blog-post
33
title: First Blog Post
4-
authors:
5-
name: Gao Wei
6-
title: Docusaurus Core Team
7-
url: https://github.com/wgao19
8-
image_url: https://github.com/wgao19.png
4+
authors: [gwei]
95
tags: [hola, docusaurus]
106
---
117

8+
<!-- truncate -->
129
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

blog/2021-08-01-mdx-blog-post.mdx

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Blog posts support [Docusaurus Markdown features](https://docusaurus.io/docs/mar
99

1010
:::tip
1111

12+
<!-- truncate -->
1213
Use the power of React to create interactive blog posts.
1314

1415
```js

blog/2021-08-26-welcome/index.md

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ tags: [facebook, hello, docusaurus]
99

1010
Simply add Markdown files (or folders) to the `blog` directory.
1111

12+
<!-- truncate -->
1213
Regular blog authors can be added to `authors.yml`.
1314

1415
The blog post date can be extracted from filenames, such as:

blog/2023-04-19-testing-blog-post.md

+3-9
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
11
---
22
slug: testing-blog-post
33
title: adfsf!
4-
authors:
5-
- name: Joel Marcey
6-
title: Co-creator of Docusaurus 1
7-
url: https://github.com/JoelMarcey
8-
image_url: https://github.com/JoelMarcey.png
9-
- name: Sébastien Lorber
10-
title: Docusaurus maintainer
11-
url: https://sebastienlorber.com
12-
image_url: https://github.com/slorber.png
4+
author 1: [jmarcey]
5+
author 2: [slorber]
136
tags: [greetings]
147
---
158

169
Congratulations, you have made your first post!
1710

11+
<!-- truncate -->
1812
Feel free to play around and edit this post as much you like.

blog/authors.yml

+12
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,15 @@ slorber:
1515
title: Docusaurus maintainer
1616
url: https://sebastienlorber.com
1717
image_url: https://github.com/slorber.png
18+
19+
gwei:
20+
name: Gao Wei
21+
title: Docusaurus Core Team
22+
url: https://github.com/wgao19
23+
image_url: https://github.com/wgao19.png
24+
25+
jmarcey:
26+
name: Joel Marcey
27+
title: Co-creator of Docusaurus 1
28+
url: https://github.com/JoelMarcey
29+
image_url: https://github.com/JoelMarcey.png

docs/back-end/drupal/drupal-sitebuilding.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ If core views is used as a standalone, or with search API, be sure to crate the
521521
This shows a simple example of adding a created view to a page, after conditionally checking if it has results. Since views are already cached, there is no reason to add additional caching here. In this example,
522522
we pass along the NID of the node as an additional var to the view, which is set up as a conditional filter in the view.
523523
524-
This then makes the variable {{ MY_VARIABLE }} available in the node--bundle-name.html.twig template, or similar, which is the rendered view.
524+
This then makes the variable MY_VARIABLE available in the node--bundle-name.html.twig template, or similar, which is the rendered view.
525525
526526
```php
527527
// From within hook_preprocess of choice
@@ -634,7 +634,7 @@ function MY_MODULE_update_8001() {
634634
$entity_type = 'node';
635635
$entity_storage = \Drupal::entityTypeManager()->getStorage($entity_type);
636636
$nodes = $entity_storage->loadMultiple();
637-
637+
638638
foreach($nodes as $node) {
639639
if($node->bundle() == 'MY_BUNDLE') {
640640
$node->path->pathauto = PathautoState::CREATE;

docs/back-end/php/composer.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ composer require drupal/thing "^1.4.3"
9090

9191
Will also allow updates up to version 2, because all releases within one major release should be backwards compatible. When using the caret version range, the issue more often what is the minimum version required by the application, which may be more specific than a minor release.
9292

93-
Version ranges can also be scoped by comparison operators ( >, >=, <, <=, !=). More than one range can be combined, either with a space ( ) or a (,), which will be treated as an AND, or with a double pipe (||), which will be treated as an OR.
93+
Version ranges can also be scoped by comparison operators ( `>`, `>=`, `<`, `<=`, `!=`). More than one range can be combined, either with a space ( ) or a (,), which will be treated as an AND, or with a double pipe (||), which will be treated as an OR.
9494

9595
## Deploy
9696

docusaurus.config.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
// @ts-check
22
// Note: type annotations allow type checking and IDEs autocompletion
33

4-
const lightCodeTheme = require('prism-react-renderer/themes/github');
5-
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
4+
// const lightCodeTheme = require('prism-react-renderer/themes/github');
5+
// const darkCodeTheme = require('prism-react-renderer/themes/dracula');
6+
7+
const {themes} = require('prism-react-renderer');
8+
const lightCodeTheme = themes.github;
9+
const darkCodeTheme = themes.dracula;
610

711
/** @type {import('@docusaurus/types').Config} */
812
const config = {

package.json

+10-9
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,19 @@
1414
"write-heading-ids": "docusaurus write-heading-ids"
1515
},
1616
"dependencies": {
17-
"@docusaurus/core": "2.4.0",
18-
"@docusaurus/preset-classic": "2.4.0",
19-
"@mdx-js/react": "^1.6.22",
20-
"clsx": "^1.2.1",
17+
"@docusaurus/core": "^3.7.0",
18+
"@docusaurus/preset-classic": "^3.7.0",
19+
"@mdx-js/react": "^3.0.0",
20+
"clsx": "^2.0.0",
21+
"prism-react-renderer": "^2.3.0",
22+
"react": "^19.0.0",
23+
"react-dom": "^19.0.0",
2124
"docusaurus-plugin-sass": "^0.2.3",
22-
"prism-react-renderer": "^1.3.5",
23-
"react": "^17.0.2",
24-
"react-dom": "^17.0.2",
2525
"sass": "^1.62.0"
2626
},
2727
"devDependencies": {
28-
"@docusaurus/module-type-aliases": "2.4.0"
28+
"@docusaurus/module-type-aliases": "^3.7.0",
29+
"@docusaurus/types": "3.7.0"
2930
},
3031
"browserslist": {
3132
"production": [
@@ -40,6 +41,6 @@
4041
]
4142
},
4243
"engines": {
43-
"node": ">=16.14"
44+
"node": ">=18.0"
4445
}
4546
}

0 commit comments

Comments
 (0)