Madcap Flare html and javascript as a page

Hi,

I’ve only dabbled in hubspot so far, primarily cms-react and hs cli. I’ve got a requirement to host our help pages produced in madcap flare in hubspot. I had initially hoped I could use some kind of KB api but it doesn’t exist.

Hopefully this is an obvious thing that I’m just not aware of yet.

So I’ve got my flare output, which is a html file and some other resources like js files.

I’ve added the required header/footer elements and ran `hs upload <path>` with success. however I’m having trouble getting my js files to load. I corrected the paths to use `get_asset_url` and I do get the expected 200 response in the network tab for my js files.

my require.js doesn’t seem to be loading as my require.config is throwing undefined against require.

here’s my html

<!--
 templateType: "page"
 isAvailableForNewContent: true
-->
<!DOCTYPE html>
<html data-mc-runtime-file-type="Default" class="_Skins_HTML5_TopNavigation_Revenue">
 <head>
 {{ standard_header_includes }}
 <meta charset="utf-8" />
 <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
 <meta name="viewport" content="width=device-width, initial-scale=1.0" /><title></title>
 <script type="text/javascript" src="{{ get_asset_url('cdi-help/Resources/Scripts/require.min.js') }}">
 </script>
 <script type="text/javascript" src="{{ get_asset_url('/cdi-help/Resources/Scripts/jquery.min.js') }}">
 </script>
 <script defer="defer" type="text/javascript" src="{{ get_asset_url('cdi-help/Resources/Scripts/plugins.min.js') }}">
 </script>
 <script defer="defer" type="text/javascript" src="{{ get_asset_url('cdi-help/Resources/Scripts/require.config.js') }}">
 </script>
 <script defer="defer" type="text/javascript" src="{{ get_asset_url('cdi-help/Resources/Scripts/MadCapAll.js') }}">
 </script>
 </head>
 <body>
 {{ standard_footer_includes }}
 </body>
</html>

Am I atleast heading in the right direction for this? Can anyone recommend alternative approaches this?

Hi @ABainbridge, I hope that you are well!
Thank you for reaching out to the Community!
I’d love to put you in touch with some of our Top Experts: Hi @stefen, @alyssamwilie and @jonchim do you have suggestions to help @ABainbridge, please?
Thanks a lot and have a great day!
Best,
Bérangère

Hi @ABainbridge,

To confirm, is your HTML file in the same path level as “cdi-help”?

You should try updating the paths to be more specific, starting with your theme.

For example:

get_asset_url('/theme-name/cdi-help/Resources/Scripts/require.min.js')

Hi Ernesto,

I’ve made some updates but still running into the same problems.

I created a child theme from sprocket rocket free (we use the pro version in production)

I uploaded my cdi-help directory to the theme via

hs upload .\cdi-help\ "/sr-theme-free child/cdi-help"

my folder structure now looks like this. I’ve updated the paths to by using the get public url context menu option. I’ve attempted to create a page via both the context menu and directly from the websites/create. I’ve also toyed around with different placements of the default.html file, being inside the templates directory, at the root of the theme and from within the cdi-help sub directory

Still running into the same issue where config is undefined

not sure how but I was uploading empty .min.js files, once I resolved that I no longer get these errors and instead get a bunch of other errors. But at least it’s now correctly running these scripts