Add script to all articles?

I’m not expecting there to be, but I’ll ask anyways.
Is there any way to add a script tag to all articles, instead of having to click click click click and do it 100+ times?

API doesn’t seem to have anything for KB at all.
TIA

Hey @danny2327 thank you for posting in our Community!

There’s a more efficient way to add a script tag to all articles without the need for manual clicking. You can utilize JavaScript to automate this process.

Make sure to replace ‘path/to/your/script.js’ with the actual path to your script file.

This script will iterate through all the articles on your page and dynamically add the script tag to each one, saving you from doing it manually hundreds of times.

To our top experts, @Anton and @Josh do you have any recommendations for @danny2327 matter?

Hope this helps! Let me know if you have any questions or need further assistance.

Pam

Hi @danny2327,

there’s a very simple way to add a script to your knowledge base articles.

Simply navigate to your knowledge base settings(gear icon top right → content → Knowledge Base), open the Template area, scroll down to the “Knowledge base article page header HTML” or “Knowledge base article page footer HTML” area(depending where you want/need to put your script in), check the checkbox, paste your script into the area, save - done

best,

Anton

Hi Anton,
Thanks for this, but I must be missing something here, as when I go to the template, I do not have anywhere to put any script or HTML.
Is this the right area: Knowledge[our ID]/22693952082/customize-template/content/footer
I’ve gotten to that through the KB template as well as through the actual hubspot settings > Content > Knowledge Base and the template option there. But I do not have anywhere to add any code. Only options on the left aside from the size, logo and title is a Custom Text Link and Socials.
Thanks