Edent,
@Edent@mastodon.social avatar

Another lazy question.

I use to write my posts.

Code is written as:

print("hello")  

That's automatically converted to:

<pre><code class="language-python">…

I use HighlightJS to do syntax highlighting. But that pulls in lots of JS which I'd rather avoid.

Is there a decent plugin for doing sever-side rendering of code highlighting which doesn't require blocks / Gutenberg?

I know I can try a few out, but I'd like to hear people's personal experiences.

Edent,
@Edent@mastodon.social avatar

Does anyone have a good set of stylesheets?

I'm looking for some CSS which I can drop in as a replacement for the default styles.

faffyman,
@faffyman@mastodon.online avatar

@Edent
most popular option seems to be https://github.com/scrivo/highlight.php it's a PHP port of HighlightJS but I cant actually recommend it as I'ver never used it. I've always just used the JS options too.

Edent,
@Edent@mastodon.social avatar

@faffyman
Interesting, thanks. But I don't think that has WordPress plugin.

krinkle,
@krinkle@fosstodon.org avatar

deleted_by_author

  • Loading...
  • krinkle, (edited )
    @krinkle@fosstodon.org avatar

    deleted_by_author

  • Loading...
  • Edent,
    @Edent@mastodon.social avatar

    @krinkle sadly not. I just gave it a go.
    Thanks for the info though.
    I think I've found something which does work.

    mte90,
    @mte90@mastodon.uno avatar

    @Edent I prefer something js side so the html generated it is always updated and not filled in the post content that you maybe need to update after a year as example

    Edent,
    @Edent@mastodon.social avatar

    @mte90
    That may work for you. But I'd rather have the hard work done on my server and cached than waste my readers' time & energy.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • wordpress
  • DreamBathrooms
  • ethstaker
  • khanakhh
  • magazineikmin
  • InstantRegret
  • rosin
  • Youngstown
  • slotface
  • thenastyranch
  • everett
  • kavyap
  • tacticalgear
  • mdbf
  • Durango
  • provamag3
  • tester
  • cisconetworking
  • osvaldo12
  • ngwrru68w68
  • cubers
  • GTA5RPClips
  • modclub
  • anitta
  • megavids
  • normalnudes
  • Leos
  • JUstTest
  • lostlight
  • All magazines