Skip to content
This repository has been archived by the owner on Aug 18, 2023. It is now read-only.

Can we add more syntax highlighting options? #251

Open
jstuckey opened this issue Jul 27, 2023 · 3 comments
Open

Can we add more syntax highlighting options? #251

jstuckey opened this issue Jul 27, 2023 · 3 comments

Comments

@jstuckey
Copy link

The portal is using highlight.js for syntax highlighting code blocks in markdown. highlight.js supports adding third-party languages, but are we able to use that feature in the portal? I was hoping to add syntax highlighting for curl code blocks.

@jstuckey
Copy link
Author

I experimented a bit using the scripts siteConfig option, but no luck. I need to run a script similar to this:

var hljs = require('highlight.js');
var hljsCurl = require('highlightjs-curl');

hljs.registerLanguage("curl", hljsCurl);

The issue is highlight.js is not available. I looked through the sources tab in dev tools, and it looks like highlight.js is not included.

@adamaltman
Copy link
Member

The portal is using prismjs for syntax highlighting code blocks in Markdown with these supported languages: https://prismjs.com/#supported-languages

@jstuckey
Copy link
Author

Ah, thank you @adamaltman. Should this documentation be updated? https://redocly.com/docs/developer-portal/guides/markdown/#built-with

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants