How To Create A Table Of Content In HubsPot – SEO & UX
Angelic Sanoy
Founder | Bookworm Head
[wpseo_breadcrumb]
Why You Should Implement Table Of Content In HubsPot?
Implementing table of content is just not focus on HubsPot platform but in every website you can think of. By integrating table of contents into your blogs can improve user experience which leads to better ranking in SEO. Remember, more click-through rate, high engagement rate and spend time is equal to high changes to be in the first page.
Editing the Blog Post Template In HubsPot
Go to the frontend of your inner blog post > Click the HubsPot icon > Edit Blog Post Template > Find the Blog Module > Click the Edit Post Template. Now, copy paste the code below.
Step 1: Create an 2 empty div elements with a corresponding IDs. Feel free to add a heading!
<div id=”console”> </div>
<div id=”toc” class=”toc1″>
<h3>Table Of Contents</h3>
</div>
Step 2: Wrap the content post body hubl with a condition HubL to exclude the editor view mode. If you check the reference below, I only added the ID element to is_in_editor false statement.