Thanks so much, this made for a great tutorial! I really appreciate it. I hadn’t realised about the Plugin API.
One thing that wasn’t immediately obvious above was to wrap the theme JS changes in script tags and place it into the plugin’s common/head_tag.html:
<script type="text/discourse-plugin" version="0.2">
</script>
Just out of curiosity does the version number in the tag matter here? And is it always best to place these in the head_tag.html over the header.html or does it not really matter.
Thanks!