I’m in the process of looking into the migration of an existing website into hubspot. I have some questions;
- I’m having trouble figuring out how relative paths work, which cooincides with best practice of structure in HubSpot.
- Said project has a lot of javascript libs. Should these be uploaded with the File Manager, or should I create new javascript files in the templates folder using designer tools and copy / paste?
- For files uploaded using File Manager, it seems that the only way to reference them is using absolute URL’s.
- Can files here be referenced in a relative way, so as to avoid having to change file paths in code later? I’ve searched - and seen suggestions to prefix with hubfs etc, but when previewing a template the domain is generic. I see no API to help with this either.
- Is this the correct place to upload static assets a template might need? (Favicons, Background SVG’s, external libs etc?)
- Is there an existing HTML template that might help illustrate some of these questions instead?
- I found SOME training online, but it’s due to be removed - and seemsout of date. Are there any new training materials or courses I could run through that’d answer some of this?
- If we can’t use relative paths - what happens when we migrate to a new domain?
For reference, I’ve tried the following paths;
# Uploaded to: /public/site.css# In HTML, attempted to ref like;# previewing a template uses a generic domain, so I didn't expect these to work./hubfs/public/site.css/public/site.css# copying the public url via file manager, and then removing the domain./hubfs/1234567/public/site.css
Any help re: best practice and how to structure my HTML in regards to external references etc would be most helpful!
Thanks!