Skip to content

Commit 0a72d2d

Browse files
authored
Fix website syntax highlighting (#1295)
* Attempt to fix syntax highlighting in website * Update docusaurus.config.js * Fix: json formats comments; jsonc is not supported
1 parent da64349 commit 0a72d2d

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

website/docs/configuration.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Configuration
44

55
You can set options by passing them before the script path, via programmatic usage, via `tsconfig.json`, or via environment variables.
66

7-
```sh
7+
```shell
88
ts-node --compiler ntypescript --project src/tsconfig.json hello-world.ts
99
```
1010

@@ -15,8 +15,7 @@ ts-node --compiler ntypescript --project src/tsconfig.json hello-world.ts
1515

1616
`ts-node` loads `tsconfig.json` automatically. Use this recommended configuration as a starting point.
1717

18-
```jsonc
19-
// tsconfig.json
18+
```json title="tsconfig.json"
2019
{
2120
"ts-node": {
2221
// Most ts-node options can be specified here using their programmatic, camel-case names.
@@ -94,12 +93,12 @@ _The name of the environment variable and the option's default value are denoted
9493

9594
We recommend using the `NODE_OPTIONS`](https://nodejs.org/api/cli.html#cli_node_options_options) environment variable to pass options to `node`.
9695

97-
```
96+
```shell
9897
NODE_OPTIONS='--trace-deprecation --abort-on-uncaught-exception' ts-node ./index.ts
9998
```
10099

101100
Alternatively, you can invoke `node` directly and install `ts-node` via `--require`/`-r`
102101

103-
```
102+
```shell
104103
node --trace-deprecation --abort-on-uncaught-exception -r ts-node/register ./index.ts
105104
```

website/docusaurus.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ module.exports = {
7171
],
7272
// copyright: `Copyright © ${new Date().getFullYear()} My Project, Inc. Built with Docusaurus.`,
7373
},
74+
prism: {
75+
// for syntax highlighting
76+
// additionalLanguages: ['powershell'],
77+
},
7478
},
7579
presets: [
7680
[

0 commit comments

Comments
 (0)