bitovi / academy

Everything we know about frontend, backend, UX, and Devops consulting and management.
https://www.bitovi.com/academy/
14 stars 3 forks source link

Fix HubSpot integration bugs #85

Open mikedane opened 5 years ago

mikedane commented 5 years ago

The HubSpot integration script has been written and the academy website is now hosted on bitovi.com/academy. However given that HubSpot is not designed to host a static site like this there are some bugs with the hosted website that we didn't foresee.

Academy uses the same header and footer as the rest of the pages on the website. While this is good, it means that the css for the rest of the website needs to be loaded into each page. Those styles are now conflicting with the custom ones for Academy.

Screen Shot 2019-04-10 at 9 17 07 AM

In the image above, you can see that the View More Courses button is receiving styles from Academy's custom.css file, but it also gets styles from Bitovi.com's css Bitovi_July_2016-style.css.

I have adblock enabled on Chrome and its blocking the js scripts from loading. I'm only seeing this on bitovi.com/academy, it's not happening on the github hosted site. This is preventing the code formatting/highlighting from loading.

Screen Shot 2019-04-10 at 9 20 46 AM

These are the two big bugs that I can see. It's also very possible and likely that there's more. HubSpot isn't designed for this use case so it's very prone to bugs.

justinbmeyer commented 5 years ago

If this is because steal is doing XHR for static.js ... we could probably turn bundle steal option to true.

https://stealjs.com/docs/StealJS.guides.progressive_loading.html#bundle-stealjs

We'd need to update bit-docs to support that here: https://github.com/bit-docs/bit-docs-generate-html/blob/3902eb9ac89442cb983a824894e16154192ad89e/site/default/static/build.js#L54

or just overwrite that entire file in academy. Then we'd need to change the template to load the bundle instead of steal.