-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't download. Broken .zip file returned #15
Comments
Initially, I had everything ticked. Because the project I wanted to use hljs for has no specific constraint which language will actually be used. (Being a knowledge base for issues and solutions, that I encountered in programming and system/server administration) My workaround was cloning the repo and for each file in the src/languages dir and download the .min.js from the CDN. Then I I am btw. very disappointed, that there is no "download with all languages" and you have to select every single language by individually on the download page ... No "select all in category" or similar... Quite a downgrade to the old website imho. (If didn't know hljs before, that would have immediately turned away, from even trying it. Even knowing it, my first response was searching for alternatives, of which I found a viable one) |
This is not recommended.
That's what the website's own build process does...
@allejo I agree this is a pretty big loss... I'd at least love a way to select "common" easily and just adding chekboxes per group should be pretty simple... |
Honestly, I completely forgot about this feature on the old website. Just added that in 22d1e8a. As for the large download size, when I run the website locally and download a ZIP (📄 highlight.zip) with all the languages, it comes out to ~9.6MB. Including full copies of everything in ESM and CJS (I think) adds up, that's more than 5MB of text already. |
After a bit of research, looks like this is a limit with severless functions; they have a response body limit of 6MB which means the structure of the download size needs to change.
My thinking right now is to allow users to opt-in to what they want because duplication is what leads to the giant file sizes. I'm thinking to let users pick the following:
I think with these limitations in selections, the sizing should be a lot smaller. Thoughts? |
I'm not sure how you are getting files so large. Our whole Node.js package (unpacked) is only 5.29mb... and that includes themes and everything... cdn_assets build is only 4.21mb... I'm building
I thought the website's main purpose was to build a combined |
I'm not doing anything special to bloat the file sizes, it seems like it's because I'm including both CJS and ES in one bundle that's doubling the size.
i.e. |
I'd say if someone wants a CDN build they should get it from If someone wants the "rest" of the CDN bundle, they can build + download a It doesn't bother me if this build service is ultra "minimal" since it's honestly trivial to build from source directly. |
Trying to download highlight.js using the website doesn't work properly.
I can download highlight.js without any languages, but as soon as I requesta few languages I instead receive a broken zip file highlight.zip
Opening it with a texteditor shows, that the server throws an error:
I'm sorry, but without any support for languages, highlight.js isn't really useful to me.
It appears to me, that the Server is misconfigured and doesn't allow responses large enough to include languages in the response.
The text was updated successfully, but these errors were encountered: