How to add a custom language to be used with mkdocs? #3482
-
I've tried to follow the steps at https://prismjs.com/extending.html#creating-a-new-language-definition for adding a new language definition to Prism. Everything works fine on the test.html page and I can see the keywords of my language colorized. However, how should I proceed from here to actually getting a prism.js file that contains my new language which I can include in my mkdocs site? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
To get the download page working locally, you have to run it with a local HTTP server (e.g. this one). Then the download page will work. Also, be sure to run
That's because we get the sizes from our GitHub repo. Since your languages isn't included, it will be displayed as 0KB. However, this doesn't affect the bundle. It's just user-facing information. |
Beta Was this translation helpful? Give feedback.
To get the download page working locally, you have to run it with a local HTTP server (e.g. this one). Then the download page will work.
Also, be sure to run
npm run build
before "downloading" the generated bundle. The download page loadcomponents.js
, so that file has to be rebuilt.That's because we get the sizes from our GitHub repo. Since your languages isn't included, it will be displayed as 0KB.
However, this doesn't affect the bundle. It's just user-facing information.