Skip to content

Commit dc6b259

Browse files
committed
fix: add missing syntax highlighting and use custom language order and labels
1 parent 9bfbcf7 commit dc6b259

File tree

5 files changed

+341
-13
lines changed

5 files changed

+341
-13
lines changed

apify-docs-theme/src/theme/custom.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1799,6 +1799,10 @@ iframe[src*="youtube"] {
17991799
margin-bottom: calc(var(--ifm-h1-vertical-rhythm-bottom)* var(--ifm-leading)) !important;
18001800
}
18011801

1802+
.theme-doc-markdown .openapi-tabs__code-container .openapi-tabs__code-item span {
1803+
text-transform: none;
1804+
}
1805+
18021806
@media (max-width: 996px) {
18031807
div[class^="navbarSearchContainer"] {
18041808
position: static;

docusaurus.config.js

Lines changed: 121 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,127 @@ module.exports = {
288288
return result;
289289
},
290290
},
291-
themeConfig: config.themeConfig,
291+
themeConfig: {
292+
...config.themeConfig,
293+
prism: {
294+
...config.themeConfig.prism,
295+
additionalLanguages: [
296+
...config.themeConfig.prism.additionalLanguages,
297+
'http', 'bash', 'ruby', 'java', 'go', 'csharp', 'powershell', 'dart', 'objectivec', 'ocaml', 'r',
298+
],
299+
},
300+
languageTabs: [
301+
{
302+
highlight: 'javascript',
303+
label: 'JavaScript',
304+
language: 'javascript',
305+
logoClass: 'javascript',
306+
},
307+
{
308+
highlight: 'python',
309+
label: 'Python',
310+
language: 'python',
311+
logoClass: 'python',
312+
},
313+
{
314+
highlight: 'bash',
315+
label: 'cURL',
316+
language: 'curl',
317+
logoClass: 'curl',
318+
},
319+
{
320+
highlight: 'php',
321+
label: 'PHP',
322+
language: 'php',
323+
logoClass: 'php',
324+
},
325+
{
326+
highlight: 'java',
327+
label: 'Java',
328+
language: 'java',
329+
logoClass: 'java',
330+
variant: 'unirest',
331+
},
332+
{
333+
highlight: 'c',
334+
label: 'C',
335+
language: 'c',
336+
logoClass: 'c',
337+
},
338+
{
339+
highlight: 'csharp',
340+
label: 'C#',
341+
language: 'csharp',
342+
logoClass: 'csharp',
343+
},
344+
{
345+
highlight: 'go',
346+
label: 'Go',
347+
language: 'go',
348+
logoClass: 'go',
349+
},
350+
{
351+
highlight: 'rust',
352+
label: 'Rust',
353+
language: 'rust',
354+
logoClass: 'rust',
355+
},
356+
{
357+
highlight: 'javascript',
358+
label: 'Node.js',
359+
language: 'nodejs',
360+
logoClass: 'nodejs',
361+
},
362+
{
363+
highlight: 'ruby',
364+
label: 'Ruby',
365+
language: 'ruby',
366+
logoClass: 'ruby',
367+
},
368+
{
369+
highlight: 'powershell',
370+
label: 'PowerShell',
371+
language: 'powershell',
372+
logoClass: 'powershell',
373+
},
374+
{
375+
highlight: 'dart',
376+
label: 'Dart',
377+
language: 'dart',
378+
logoClass: 'dart',
379+
},
380+
{
381+
highlight: 'objectivec',
382+
label: 'Objective-C',
383+
language: 'objective-c',
384+
logoClass: 'objective-c',
385+
},
386+
{
387+
highlight: 'ocaml',
388+
label: 'OCaml',
389+
language: 'ocaml',
390+
logoClass: 'ocaml',
391+
},
392+
{
393+
highlight: 'r',
394+
label: 'R',
395+
language: 'r',
396+
logoClass: 'r',
397+
},
398+
{
399+
highlight: 'swift',
400+
label: 'Swift',
401+
language: 'swift',
402+
logoClass: 'swift',
403+
},
404+
{
405+
highlight: 'kotlin',
406+
label: 'Kotlin',
407+
language: 'kotlin',
408+
logoClass: 'kotlin',
409+
},
410+
],
411+
},
292412
staticDirectories: ['apify-docs-theme/static', 'static'],
293413
customFields: {
294414
forbiddenGiscusDocRegExpStrings: [

0 commit comments

Comments
 (0)