Skip to content

Commit 5e114d7

Browse files
authored
update Docusaurus and fixed vulnerabilities. (#89)
Updates the Docusaurus website dependencies and configuration to target Docusaurus 3.10 while improving compatibility with upcoming v4 changes, plus cleans up generated quiz artifacts and MDX syntax in docs. **Changes:** - Bump Docusaurus packages to `^3.10.0`, add `@docusaurus/faster`, raise Node engine requirement to `>=20`, and add security-related `overrides`. - Enable Docusaurus `future.v4` flag and remove large blocks of commented-out navbar/footer configuration. - Replace HTML comments in docs with MDX-compatible `{/* ... */}` comments and remove generated timestamps from quiz-generated files.
1 parent 920d155 commit 5e114d7

13 files changed

Lines changed: 4427 additions & 3733 deletions

File tree

.github/.workflows/pages.yml

Lines changed: 0 additions & 59 deletions
This file was deleted.

website/README.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,27 @@ This website is built using [Docusaurus](https://docusaurus.io/), a modern stati
55
### Installation
66

77
```
8-
$ yarn
8+
$ npm install
9+
```
10+
11+
For reproducible installs in CI, use:
12+
13+
```
14+
$ npm ci
915
```
1016

1117
### Local Development
1218

1319
```
14-
$ yarn start
20+
$ npm run start
1521
```
1622

1723
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
1824

1925
### Build
2026

2127
```
22-
$ yarn build
28+
$ npm run build
2329
```
2430

2531
This command generates static content into the `build` directory and can be served using any static contents hosting service.
@@ -29,13 +35,13 @@ This command generates static content into the `build` directory and can be serv
2935
Using SSH:
3036

3137
```
32-
$ USE_SSH=true yarn deploy
38+
$ USE_SSH=true npm run deploy
3339
```
3440

3541
Not using SSH:
3642

3743
```
38-
$ GIT_USER=<Your GitHub username> yarn deploy
44+
$ GIT_USER=<Your GitHub username> npm run deploy
3945
```
4046

4147
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.

website/docs/chapter-01/02_architecture.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ When executing or debugging tests|tasks, the editor supports the execution layer
3939
When writing keywords in e.g. Python for keyword libraries, the editor supports the adaptation layer.
4040
Therefore also other additional extensions of Robot Framework can be categorized into these layers.
4141

42-
<!-- TODO: add a graphic here -->
42+
{/* TODO: add a graphic here */}
4343

4444
## 1.2.2 What is Robot Framework & What It Is Not
4545

website/docs/chapter-02/01_suitefile.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ A suite file must contain either a `*** Test Cases ***` or a `*** Tasks ***` sec
194194

195195
See [2.6 Writing Test|Task and Calling Keywords](chapter-02/06_writing_test.md) for more information about the `*** Test Cases ***` or `*** Tasks ***` section.
196196

197-
<!-- TODO maybe more references to Test Setup/Teardown or Documentation? -->
197+
{/* TODO maybe more references to Test Setup/Teardown or Documentation? */}
198198

199199
### 2.1.2.4 Introduction to `*** Keywords ***` Section
200200

website/docs/chapter-02/02_suitefile_syntax.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11

22
# 2.2 Basic Suite File Syntax
33

4-
<!--
5-
TODO:
6-
I think this section needs a bit more structure and we should introduce the concept of "settings" like [Documentation] already here and reference to Chapter 4.
4+
{/* TODO: I think this section needs a bit more structure and we should introduce the concept of "settings" like [Documentation] already here and reference to Chapter 4.*/}
75

8-
-->
96

107
::::lo[Learning Objectives]
118

website/docs/chapter-02/04_keyword_imports.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11

22
# 2.4 Keyword Imports
33

4-
<!-- To use Keywords that are not part of BuiltIn, which is always imported invisibly, you must import keywords into the current scope. Basically Two different sources of keywords.
4+
{/* TODO: To use Keywords that are not part of BuiltIn, which is always imported invisibly, you must import keywords into the current scope. Basically Two different sources of keywords.
55
- Libraries, which contains low-level keywords actually implementing functionality, typically in Python.
6-
- Resource Files, which either again import libraries or other Resource Files or they specify User Keywords. -->
6+
- Resource Files, which either again import libraries or other Resource Files or they specify User Keywords. */}
7+
78
Robot Framework has a modular design that allows users to import keywords from external sources.
89
Without importing external keywords into a suite, only the keywords from Robot Framework's BuiltIn library are available for use, due to them being imported automatically.
910
Also the Robot Framework language statements themselves are available for use without importing them.
@@ -37,7 +38,7 @@ From a user perspective there are three different kinds of libraries:
3738
- **Custom Libraries**: These libraries are developed by the users themselves to solve specific problems or to encapsulate more complex functionality.
3839

3940
Further more detailed information about the different types of libraries and are described in later chapters.
40-
<!-- TODO: Do we fulfill this promise? -->
41+
{/* TODO: Do we fulfill this promise? */}
4142

4243
To import a library into a suite or resource file the `Library` setting is used in the `*** Settings ***` section followed by the name of the library as long as they are located in the Python module search path, which automatically happens if they are installed via `pip`.
4344
The name of the library is case-sensitive and should be taken from the library's keyword documentation.

website/docs/chapter-02/05_keyword_interface.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Basically all standard and external 3rd party libraries offer these Keyword Docu
2020

2121
Robot Framework offers the Keyword Documentation of its Standard Libraries at https://robotframework.org/robotframework .
2222

23-
<!-- Keywords from Libraries and Resources can be called and can be documented either as HTML or in IDEs with Robot Support. -->
23+
{/* TODO: Keywords from Libraries and Resources can be called and can be documented either as HTML or in IDEs with Robot Support. */}
2424

2525

2626

@@ -406,7 +406,7 @@ The error message would be: `ValueError: Argument 'y' got value 'Not_A_Number' t
406406

407407
The advantage of using type hints is that the user get more information about what kind of values are expected and the keyword implementation can be simpler, because it can rely on the arguments being of the expected type.
408408

409-
<!-- Just to understand that they are there and that they may document how values are handled or which are allowed. -->
409+
{/* TODO: Just to understand that they are there and that they may document how values are handled or which are allowed. */}
410410

411411

412412
### 2.5.2.9 Return Types
@@ -430,7 +430,7 @@ Similar to the argument types, return types are optional and a more recent featu
430430
It is important to know that keywords without a return type hint are often still returning values!
431431
This is typically documented in the *Documentation* part of the keyword documentation.
432432

433-
<!-- Keywords may gather information and return these to the caller of that keyword. A Documented Return Value may be present but often it is just written in the docs, due to new feature -->
433+
{/* TODO: Keywords may gather information and return these to the caller of that keyword. A Documented Return Value may be present but often it is just written in the docs, due to new feature */}
434434

435435

436436

website/docs/chapter-03/03_user_keyword.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -420,13 +420,14 @@ Get ISO Time
420420
## 3.3.7 Keyword Conventions
421421

422422

423-
<!--
424-
TODO:
423+
424+
{/* TODO:
425425

426426
Should we have that chapter???
427427
Opinions?
428428
And if, is this want we want to ask the participants to know?
429-
-->
429+
*/}
430+
430431

431432
::::lo[Learning Objectives]
432433

website/docusaurus.config.ts

Lines changed: 4 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ const config = {
2121
},
2222
},
2323
favicon: 'img/rf_favicon.png',
24+
// Future flags, see https://docusaurus.io/docs/api/docusaurus-config#future
25+
future: {
26+
v4: true, // Improve compatibility with the upcoming Docusaurus v4
27+
},
2428
organizationName: 'robotframework', // Usually your GitHub org/user name.
2529
projectName: 'robotframework-RFCP-syllabus', // Usually your repo name.
2630
trailingSlash: false,
@@ -103,67 +107,11 @@ const config = {
103107
to: '/docs/learning_objectives',
104108
position: 'left',
105109
},
106-
// {
107-
// href: 'https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html',
108-
// label: 'User Guide',
109-
// position: 'right',
110-
// },
111-
// {
112-
// href: 'https://robotframework.org/robotframework/#standard-libraries',
113-
// label: 'Standard Library',
114-
// position: 'right',
115-
// },
116-
// {
117-
// href: 'https://robot-framework.readthedocs.io/en/stable/',
118-
// label: 'API Documentation',
119-
// position: 'right',
120-
// },
121-
122-
// {
123-
// href: 'https://slack.robotframework.org/',
124-
// label: 'Slack',
125-
// position: 'right',
126-
// },
127-
// {
128-
// href: 'https://github.com/robotframework/robotframework-RFCP-syllabus',
129-
// label: 'GitHub',
130-
// position: 'right',
131-
// },
132110
],
133111
},
134112
footer: {
135113
style: 'dark',
136114
links: [
137-
// {
138-
// title: 'Docs',
139-
// items: [
140-
// {
141-
// label: 'Syllabus',
142-
// to: '/docs/overview',
143-
// },
144-
// // {
145-
// // href: 'https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html',
146-
// // label: 'User Guide',
147-
// // },
148-
// // {
149-
// // href: 'https://robotframework.org/robotframework/#standard-libraries',
150-
// // label: 'Standard Library',
151-
// // },
152-
// // {
153-
// // href: 'https://robot-framework.readthedocs.io/en/stable/',
154-
// // label: 'API Documentation',
155-
// // },
156-
// ],
157-
// },
158-
// {
159-
// title: 'More',
160-
// items: [
161-
// {
162-
// label: 'GitHub',
163-
// href: 'https://github.com/robotframework/robotframework-RFCP-syllabus',
164-
// },
165-
// ],
166-
// },
167115
],
168116
copyright: `Copyright © ${new Date().getFullYear()} Robot Framework® Foundation - Syllabus of Robot Framework® Certified Professional`,
169117
},

0 commit comments

Comments
 (0)