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
954 stars 112 forks source link

Disable minification, prerendering by default #836

Open tlienart opened 3 years ago

tlienart commented 3 years ago

There's too many corner cases:

  1. Franklin pings users about highlight.js while it's actually not needed at the start, also if users don't set it up properly they may get a different result locally and globally, further installing npm libraries seems to be about as hard as determining whether there's any evidence in favour of SUSY
  2. Minification subtly breaks a bunch of small things, latest occurrence of this is for tables as reported on slack (a tbody disappearing into the void)

In an ideal world both of these things are nice, but it'll be a better experience if users opt-in rather then the opposite (and then we can ping them about testing stuff before they deploy).

This is effectively a breaking change, this should be changed after users are encouraged to pin minor releases of Franklin to prevent issues.

rikhuijzer commented 3 years ago

I completely agree on disabling minification by default! :smile: Would make debugging problems (from Slack) much easier in many cases.

fonsp commented 2 years ago

I totally missed this issue! But see my discussion here: https://github.com/tlienart/Franklin.jl/discussions/927 TLDR I think the current minifier should not be used, since the performance gain is tiny (because of gzip) but the headache cost is large (partly because the project is not well-tested and no longer maintained).

My ideas are could remove it completely, or to use a modern bundler like parcel.

tlienart commented 2 years ago

Thanks @fonsp I'll answer to your careful suggestions in the thread, my current inclination is to just remove it and let users do their own minification if they want to (initially I had this naive idea that minification was useful + easy and now I know better...)

fonsp commented 2 years ago

Great! It would be good to leave the minify kwarg for backwards compatibility, and just ignore the value if false, and print a message when true.