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). ...