Skip to content

Commit 5914460

Browse files
kodster28KianNH
andauthored
Default code block title -- PCX-16857 (cloudflare#25044)
* [Chore] Add default language title if none set * update to be generic * Update src/plugins/expressive-code/default-titles.js Co-authored-by: Kian <[email protected]> --------- Co-authored-by: Kian <[email protected]>
1 parent 29e13a7 commit 5914460

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

src/content/docs/1.1.1.1/troubleshooting.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@ head:
88
- tag: title
99
content: Troubleshooting DNS Resolver
1010
slug: 1.1.1.1/troubleshooting
11-
1211
---
1312

14-
import { Render } from "~/components"
13+
import { Render } from "~/components";
1514

1615
This guide will help you diagnose and resolve common issues with Cloudflare's DNS Resolver. Before proceeding with manual troubleshooting steps, you can [verify your connection](/1.1.1.1/check/) to automatically gather relevant information.
1716

src/plugins/expressive-code/default-titles.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,21 @@ export default () => {
1010
context.codeBlock.props.title ??= "PowerShell";
1111
break;
1212
}
13+
case "javascript":
14+
case "js": {
15+
context.codeBlock.props.title ??= "JavaScript";
16+
break;
17+
}
18+
case "py":
19+
case "python": {
20+
context.codeBlock.props.title ??= "Python";
21+
break;
22+
}
23+
case "typescript":
24+
case "ts": {
25+
context.codeBlock.props.title ??= "TypeScript";
26+
break;
27+
}
1328
default: {
1429
return;
1530
}

0 commit comments

Comments
 (0)