Including the Hype JS in a CMS template

Hello,

I work mainly with Drupal and am building a site in WordPress. If I were to have multiple Hype animations (via HTML5 export) on the website, would I need to include the JS specific to that animation? Or could I include the Hype JS globally?

Is the JS written specifically per project, or is it a full library that is exported?

Kevin

Hype includes only the document JavaScript and then while the loader runs it checks if the runtime is already in memory. Hence, you can have multiple Hype documents and I do it often. They also only load the runtime once automatically. If you want to take more control you can do an advanced export and host the runtime yourself or use it from a CDN.

One thing to watch out for is the Hype Runtime version. As you deploy multiple Hype documents down the line you might update one and the runtime version might have changed meanwhile. This creates a void when checking if the Hype Runtime is already loaded as the version number is part of the check. That leads to twice the load on the runtime. One runtime for your older documents and one runtime for the updated one. The solution would be to export all Hype documents when you update stuff or disregard the additional file load.

1 Like

Gotcha. That makes sense.

I see there is a WordPress import module - have you thought about a Drupal plugin for Hype? This might be something I could use on the daily at work. Wait - does licensing cover my pro Hype license for work?

Thanks again for all of the help,
Kevin

We don’t make any restrictions about what you do with Hype, it is suitable for work, play, and everything in between :sailboat:

The plugin for Drupal would probably be pretty similar to what we have for Wordpress, we just haven’t received many requests for it. Do you think you could make a new feature request thread for that so we could see how many folks would be interested ?