Open LilithHafner opened 10 months ago
Other problems: https://validator.w3.org/nu/?doc=https%3A%2F%2Fjulialang.org%2F (maybe these are Franklin.jl bugs?)
cc @tlienart
the landing page is actually not really handled by Franklin that much, the source of that page is mostly plain HTML https://github.com/JuliaLang/www.julialang.org/blob/main/index.html
there are things that are off though, that </html>
is in the source and gets eaten up, I suspect it's the minifier that's not working well here (not a Franklin thing per se and can be disabled).
First thing that can be done would be to disable the minifier by changing
to
Franklin.optimize(prerender=true, minify=false);
this will have no impact other than un-garbling the HTML (which won't serve any slower as GH pages optimises things for us). https://github.com/JuliaLang/www.julialang.org/pull/2013
I'll take a look at the rest when I can, some of these errors are simple to handle like the meta
tag with name duplication (can be fixed https://github.com/JuliaLang/www.julialang.org/blob/main/_layout/meta.html)
Edit yeah so removing the minifier helps, the </html>
is now there: https://github.com/JuliaLang/www.julialang.org/blob/gh-preview/previews/PR2013/index.html
The closing html tag being removed is most likely on purpose since it is an optional tag, see https://www.w3.org/TR/2014/REC-html5-20141028/syntax.html#optional-tags
Yes. Dropping the closing tag is valid. However, also noting that the tag is present on other pages (e.g. https://www.julialang.org/downloads), that omitting the tag saves very little bandwidth, and that there are other issues that make the html invalid.
Also, I think it's nice to serve valid XML if it's not too much trouble (and xml requires matched tags).
I don't think we need a minifier, since the content is already being gzipped by fastly.
See https://github.com/tlienart/Franklin.jl/issues/836#issuecomment-975583141 and https://github.com/tlienart/Franklin.jl/discussions/927: the current minifier has correctness problems and causes more discussion time lost than loading times gained. You might benefit from a modern bundler but the unmaintained minifier that we use (last release 8 years ago) is not helping us 🙈
curl https://www.julialang.org | grep "</html>"
, for example, reveals that the html tag is never closed.