What is right way of relative directory in Hype please?


On wordpress, if Hype project is migrated or duplicated,, the project might not work, and I just guess it might be because of wrong directory of the Resources Library.

so, I am just thinking about the possiblity of managing relative directory, is it possible please?


Usually Hype itself manages all resources relative to its entry point: the Hype generated script. I think the WordPress plugin should in theory generate the correct URL when using the short code to the script entry point. So, this is most likely a scenario involving user copied script chunks. Meaning manually HTML inserted into a blogpost and not using the short code. I guess you will have to fix at only at that point to get it working again.

The plugin doesn't know your website url, it only knows 'wordpress site url' + 'wp-content/uploads/hypeanimations/##' -- so if you move your Wordpress site to a new host, you just need to make sure you also move your 'hypeanimations' folder as well.

When working in Hype, using ${resourcesFolderName} to access your Hype resources folder should work the same.

@MaxZieb @Daniel

Thanks and sorry for later response.

If so, it would be great if there is a place to input a custom website url as a presetting.

If the project is migrated, it will work with relative directory.

Is this feature possible?


You can set the base relative URL with this line in the 'head' of your document: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base / https://www.bitdegree.org/learn/html-base-tag

Does that help?