# Madcap Flare html and javascript as a page

**URL:** <https://community.hubspot.com/t/madcap-flare-html-and-javascript-as-a-page/121200>\
**Category:** CMS Development\
**Tags:** javascript\
**Created:** [November 22, 2024, 4:17pm UTC](https://community.hubspot.com/t/madcap-flare-html-and-javascript-as-a-page/121200 "2024-11-22T16:17:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ABainbridge](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/abainbridge/32/86690_2.png) [@ABainbridge](https://community.hubspot.com/u/ABainbridge)\
**Post date:** [November 22, 2024, 4:17pm UTC](https://community.hubspot.com/t/madcap-flare-html-and-javascript-as-a-page/121200/1 "2024-11-22T16:17:03Z")

</div>

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

```lia-code-sample
<!--
 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?

---

<div class="post-metadata">

**Author:** ![Berangere](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/berangere/32/220784_2.png) [@Berangere](https://community.hubspot.com/u/Berangere)\
**Post date:** [November 25, 2024, 8:05am UTC](https://community.hubspot.com/t/madcap-flare-html-and-javascript-as-a-page/121200/2 "2024-11-25T08:05:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![GiantFocal](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/giantfocal/32/41969_2.png) [@GiantFocal](https://community.hubspot.com/u/GiantFocal)\
**Post date:** [November 25, 2024, 8:05am UTC](https://community.hubspot.com/t/madcap-flare-html-and-javascript-as-a-page/121200/3 "2024-11-25T08:05:38Z")

</div>

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')`

---

<div class="post-metadata">

**Author:** ![ABainbridge](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/abainbridge/32/86690_2.png) [@ABainbridge](https://community.hubspot.com/u/ABainbridge)\
**Post date:** [November 25, 2024, 10:19am UTC](https://community.hubspot.com/t/madcap-flare-html-and-javascript-as-a-page/121200/4 "2024-11-25T10:19:55Z")

</div>

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

 ![ABainbridge_0-1732528503060.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/9/5/95b1be3fbc7a880596e214b2de42d7448bc75944.jpeg)

Still running into the same issue where config is undefined

 ![ABainbridge_1-1732528553973.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/6/6e034cea9477c9d7c560eff44d5c51758271d0f0.png)

---

<div class="post-metadata">

**Author:** ![ABainbridge](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/abainbridge/32/86690_2.png) [@ABainbridge](https://community.hubspot.com/u/ABainbridge)\
**Post date:** [November 25, 2024, 4:09pm UTC](https://community.hubspot.com/t/madcap-flare-html-and-javascript-as-a-page/121200/5 "2024-11-25T16:09:53Z")

</div>

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
