Monday, September 12, 2022
HomeWordPress DevelopmentDracula Theme for WordPress Blocks

Dracula Theme for WordPress Blocks


When engaged on the articles for the Backend Engineer Learns to Construct Block Editor Blocks collection, I wasn’t proud of how the code samples have been trying throughout the articles.

Beforehand, I’ve written – right here and right here – about my being a fan of the work performed by Zeno Rocha within the Dracula Theme. Ideally, I needed to have the ability to have the colour scheme of the code in my articles match the theme. One thing like a Dracula Theme for WordPress Blocks.

That’s when I discovered spotlight.js and a Dracula theme for it. So I wrote a small plugin for WordPress that works with the present Preformatted block and modifications the colour scheme to match that of Dracula.

I name it WP Dracula Spotlight.js or, extra merely, Dracula Spotlight.

Dracula Theme for WordPress Blocks

The outline of the plugin is so simple as you’d count on:

A WordPress plugin for including the Dracula colour scheme and Spotlight.js to the Block Editor.

Assuming you don’t have spotlight.js code operating in your weblog, the plugin is supposed to be as turnkey as attainable.

  1. Set up it,
  2. Activate it,
  3. All present Preformatted blocks and all future Preformatted blocks ought to be given the identical therapy.

All the directions for learn how to set up this in your web site (or to clone the repository and do your individual work with it) are included within the README.

I even have a brief record of issues that I’d finally love to do ought to time and demand necessitate it. In the end, although, this was constructed for my use case and I’m sharing it right here for others who’re .

In case you’re , please be at liberty to obtain it and provides it a strive. In case you have any issues, don’t hesitate to open an concern although, as is the case for many of my initiatives, I’ll get to points when and if and I’ve the time. In any other case, you might also open a PR for which I’m all the time completely happy to assessment.

Within the meantime, I hope the plugin serves these of you who’re a fan of the theme nicely.


🧱 For many who have an interest, I’m nonetheless engaged on the following article within the Studying to Construct Block Editor Blocks collection, however they take far longer to draft and publish than one thing like this. 🙂

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments