tlienart / Franklin.jl

(yet another) static site generator. Simple, customisable, fast, maths with KaTeX, code evaluation, optional pre-rendering, in Julia.
https://franklinjl.org
MIT License
966 stars 113 forks source link

Option to optimize selectively #963

Open gitcommitypos opened 2 years ago

gitcommitypos commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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