Hype Add To Head (Helper)

Ever wanted to only copy and paste your Hype container with the JavaScript reference but couldn't do so because you had stuff in your document head that your file depended on?

Okay, I admit… this is a special case but this little helper has you covered. It loads the head dependencies from within you Hype document and then advances when done (addToHead.hype). There is even a little workaround in there that fires "HypeDocumentLoad" again to initialize any Hype Extensions you loaded this way (for that look at the example addToHeadNotify.hype).

The helper allows you to include most JavaScript and CSS dependencies without needing to modify the head tag. You therefore can only use the body part of your Hype document.

This approach works great for cases where you don't have access privileges to the page head like in Content Management Systems or some page builders or need your initial embed to be self contained.


Interesting, though what Im looking to do is to add the css from hype's head to the generated script when selecting a custom export script.

Update: After reading what you wrote a few times, I might just use this method after all.
Thank you!