Skip to content
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

Reintroduce Code Blocks to CLI prompt #46

Open
endigo9740 opened this issue Sep 29, 2023 · 0 comments
Open

Reintroduce Code Blocks to CLI prompt #46

endigo9740 opened this issue Sep 29, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request feature request Request a new feature or change

Comments

@endigo9740
Copy link
Contributor

endigo9740 commented Sep 29, 2023

I recently updated the Code Block documentation to cover how to install only select languages for Highlight.js. This is now the default recommendation. View it here:

https://www.skeleton.dev/utilities/codeblocks#configure-your-project

This includes the following changes:

  • The import statement now uses the "core" version: import hljs from 'highlight.js/lib/core';
  • A number of common web (or adjacent) languages are imported by default
  • Each imported language must be registered via hljs.registerLanguage()
  • Additionally if using the PurgeCSS plugin, addition configuration is need in vite.config.ts

It's a lot of boilerplate, but should reduce in a GREATLY reduced bundle size over the previous defaults. Given this, I think we're good to reintroduce this when you get a chance @niktek

Thanks!

@endigo9740 endigo9740 added enhancement New feature or request feature request Request a new feature or change labels Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature request Request a new feature or change
Projects
None yet
Development

No branches or pull requests

2 participants