© Alex Libby 2020
A. LibbyPractical Hexohttps://doi.org/10.1007/978-1-4842-6089-0_6

6. Building Plugins

Alex Libby1 
(1)
RUGBY, UK
 

Remember how at the end of the last chapter we created something that uses the Hexo renderer method to compile Sass styling code…?

Take a closer look at the code again – in particular, at the use of the statement npm init -y, plus the use of the line starting with module.exports = (ext) => near the start of the code. What if I said you’ve created a plugin, even though we had intended to create a renderer?

I’ll bet you’re a little confused by that, and with good reason: Hexo’s architecture is such that we can write the core part of a renderer as a script (similar to how we wrote the Google Fonts helper in the previous chapter). ...

Get Practical Hexo: A Hands-On Introduction to Building Blogs Using the Hexo Framework now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.