mojolicious / mojolicious.org

:cookie: Mojolicious Website
https://mojolicious.org
33 stars 19 forks source link

Replace prettify.js with highlight.js #22

Closed zakame closed 4 years ago

zakame commented 4 years ago

Summary

This replaces the old prettify.js highlighter with highlight.js.

Motivation

prettify.js has long been abandoned by Google so we need to replace it.

References

https://github.com/mojolicious/mojo/issues/1544 https://github.com/mojolicious/mojo/pull/1578

marcusramberg commented 4 years ago

Will this change how things look at all? Any chance of a screenshot? The markup looks cleaner to me.

zakame commented 4 years ago

Will this change how things look at all? Any chance of a screenshot? The markup looks cleaner to me.

There's a few here:

I can add a few more here, hold on.

zakame commented 4 years ago

From Mojo::Template:

image

From Mojolicious::Guides::Cookbook:

image

From Mojo::UserAgent:

image

kraih commented 4 years ago

So the diagrams are broken now, that's unfortunate.

zakame commented 4 years ago

Let me check on fixing those diagrams. Here's the (unstyled) current prettify version of https://docs.mojolicious.org/Mojolicious/Guides/Cookbook for reference:

image

zakame commented 4 years ago

Updated, this also bumps highlight.js to 10.3.2 per https://github.com/highlightjs/highlight.js/releases/tag/10.3.2 and also adding some plugins for Cookbook listings (e.g. Apache/Nginx/Systemd/YAML configs.)

zakame commented 4 years ago

Updated to rebundle highlight + plugins used here as one file and rebased to latest.

zakame commented 4 years ago

Thanks again everyone! :tada:

kraih commented 4 years ago

Thank you.