Closed wolfiex closed 3 years ago
Basic usage is currently well covered both by the README and https://highlightjs.org/usage/. I'm not sure we need to repeat this in the docs (and then deal with having to keep even more places in sync).
Did you find the README insufficient or did you only read the docs and miss the README?
CC @highlightjs/core
Ok, Imagine you are a new user. And you wish to find highlighting for a language, in my case fortran2008.
I would search the documentation.
Neither the documentation nor the README contain a list of supported languages. It would not occur to me to locate a nested source folder to discover that there is a file for this.
Although it is losely mentioned in the website For the smallest footprint, load only the languages you need:
There is no README within the languages folder https://github.com/highlightjs/highlight.js/tree/main/src/languages
Or any entry on how to use it with the actual documentation:
It is not obvious that loading custom languages relate to the languages already contained within the library.
What is obvious to someone who wrote the library is far from clear to an end-user just wanting to highlight some code on a well used current language that has been around from the 50s.
Neither the documentation nor the README contain a list of supported languages.
The README does mention this, it's the second major bullet point in the table of contents:
https://github.com/highlightjs/highlight.js#supported-languages
I have added to read the docs:
Plus also restructured things a bit... Does this help?
on a well used current language that has been around from the 50s.
Our "common" build (of ~40 included languages) is based on popularity and usefulness to MOST users, not just age - Fortran just don't qualify in our opinion.
It is not obvious that loading custom languages relate to the languages already contained within the library.
This is also mentioned, with examples: https://github.com/highlightjs/highlight.js#nodejs--require
And: https://github.com/highlightjs/highlight.js#fetch-via-cdn
If you have any specific ideas on making this clearer, please submit a doc PR and we'd be happy to review it. This is not a common support issue though so I think most are users are finding the existing documentation working for them. That said, things can always be improved.
Closing this with the the recent additions/improvements to the docs site (now includes README, supported languages, etc) and https://github.com/highlightjs/highlight.js/commit/50a680877b2777ce2fe30f083037652f9decb5c9
A documentation page containing a list of languages not included by default and how to import them would be useful.
This would mean that when searching such a language in the README, a user will be shown how to incorporate it within their code rather than wondering if it is supported or not.