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

Option to optimize selectively #963

Open
gitcommitypos opened this issue May 30, 2022 · 2 comments
Open

Option to optimize selectively #963

gitcommitypos opened this issue May 30, 2022 · 2 comments

Comments

@gitcommitypos
Copy link

gitcommitypos commented May 30, 2022

Is there any option to optimize either KateX, or code blocks (highlight.js) or both?

As of now, optimizing or setting prerender=true in serve() disables any custom js added to KateX or code blocks. Addeding the above option would be beneficial as custom JS scripts would be used mostly with code blocks (like code copy with clipboard.js) and prerendering only KateX may still provide some speedup in page loading.

Thanks!

@tlienart
Copy link
Owner

No though I would support a PR adding a keyword to optimise and doing only katex or Hl.

Side note: in the long term as mentioned elsewhere, pre-rendering will effectively be dropped from core Franklin in favour of plugins/ci scripts that users can choose to call if they wish to as part of their deployment process.

@gitcommitypos
Copy link
Author

Thanks for the quick response. I will submit a PR once I find some time.

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

No branches or pull requests

2 participants