CMS Reference

Table of contents
Close

Included CMS files

There are certain Javascript and CSS files that are automatically attached to all CMS templates. Some files can be removed, while others cannot. This article describes the purpose of each of these files. In addition to the files listed here, you can attach your own custom CSS files and Javascript files to your templates.

To learn more about the order in which stylesheets are attached to CMS content, check out this article.

jQuery

jQuery is automatically included in the head tag of every HubSpot template. It is rendered as part of the standard_header_includes  HubL variable. You have the ability to choose between the latest version of jQuery 1.11.x or version 1.7.1, in Settings > Website > Pages.  If you choose to use the latest version of jQuery, you can also choose to include a jQuery migrate script for backwards compatibility with older browsers. Additionally, you can choose to load this library from your footer. 

public_common.css

This file is no longer included by default as of October 2019. Instead a small amount of inline CSS is included in each page's head HTML, as well as within the combined CSS for a page.

public_common.css was a file that was included primarily for the HubSpot app navigation. It included various animations used throughout the app, as well as a few snippets of code that styled universal HubSpot elements such as blog featured images and bread crumb navigations. You can view the previously included file, here.

layout.css

Layout.css (fomerly known as required_base.css) is the file that is responsible for styling HubSpot's responsive grid. This file is always automatically included in any drag and drop template. It is not included by default in custom coded templates. 

In addition to the responsive grid CSS, the file includes some classes that can be used to show and hide elements at different viewports. You can view the file, here.

public_common.js

This file is no longer included by default as of April 2019. The files that were included in public_common.js are:
Every CMS page includes public_common.js in the footer of the template. This file renders as part of standard_footer_includes and cannot be removed. This Javascript file is used by many of the features of the app, as well as website features such as HubSpot's slider module.

HubSpot Tracking Code

The HubSpot tracking code is automatically added to any HubSpot template. It is included with the standard_footer_includes HubL variable. The tracking code loads a analytics Javascript file names your HubID.js (example 158015.js).