Anchor CMSs custom CSS and javascript comes to Drupal through Code per Node

Anchor CMS is getting more attention as of late with one of its key features being able to add custom javascript and CSS per blog post. This allows a lot of custom design to take place which differs per page. An example of this can be found on the creators blog.

Drupal is lacking this feature, but as is the way with Drupal, "there's a module for that". Code per Node does this and more allowing you to add custom CSS and javascript to both blocks and content types as a whole rather than individual nodes.

Some people may query why this would be useless when you can add custom javascript and CSS through the theme or a custom module which can then be preprocessed. Yes you can but that requires development and this type of javascript and CSS is only likely to be used once a node. If you want certain CSS or javascript to appear for a whole content type or a certain block then I agree, doing this through a custom module or the theme is the best option.


Another positive of the Code per Node module is its use of CodeMirror which allows syntax highlighting within the text fields.

This node is using the Bree Serif font from Google by utilising Code per Node.