Hey, is it possible to make the ToC in an ordered list?
@aaro This is great thanks for putting this together., one question how can I go in to offset the Y-axis scroll?
Right now when I click on the ToC Items the site scrolls past the H2 for me.
Hey Sam Debugging stuff like this can get complicatedā¦ if itās not too late, I recommend cloning the project above and copying the required components into your site. If you test it each time you make a change, I guarantee youāll get to the finish line. Good luck!
Iāve had this same issue. Checkout these posts for solutionsā¦
@aaro Hey Aaro, love this tutorial! , but having a really weird issue with h2, h3, &h4 classes on a duplicate CMS template - an exact duplicateā¦
The first CMS collection works as expectedā¦
But the second CMS collection does thisā¦
It look like the observer is not adding/replacing the class?? Any suggestions or ideas?
Iām stumped, someone help please
@DuncanHamra Your solution is great! The only issue I have is that it doesnāt have the logic or classes to indent the ToC items based on Heading size like the Flowrite example. Is there a good reason you didnāt implement this? I ask because Iām having issues with the original implementation, but only on 1 pageā¦ I posted my issue
I went with the more simple implementation for the sake of speed/ease of use. For that reason, I think I left out some code that was required for the more complex setupā¦ although Iām sorry to say I donāt remember which code This week is pretty crazy, so I donāt be able to dedicate much time here
Hi and thanks for making it clonable
sorry for that question but how did you paste your code in webflow?
Is their a way to generate the same table twice on the sampage?
Is their a way to generate same table twice?
I have a question, first things first. Great implementation, this feature was a great added value to our website, thank you!
My question now, how can I increase the offset in the anchor when I click in a heading from the table of contents and the page is scrolled to that element? I ask that because I have a sticky header, and when I click in a heading from the blog, it is not showing because it is under the sticky header.
Cheers.
Great question! The easiest way that I have found is to:
- Select one of your blog headings that you want to be an anchor.
- Give that element some top padding equal to the height of your sticky nav. Letās say 100px for the sake of example.
- And also give it a negative margin of 100px.
This will move the top of the element 100px up the page while not disrupting your spacing.
Publish and youāre good to go!
Sorry I missed your question! Iām not sure how to generate the same table twice. I feel confident it can be done by a developer, but Iām not sure how to do it myself.
This tuto is just brillant ! A little complicated at first but the result is perfect.
I have a question about the links that are created with this table of contents, does Google index them and how to manage them from an SEO point of view?
Thanks a lot
@Melanie12 - Google does not index named anchor links since they are only relative to the page and are not internal nor external links. They are factored (the headings) in the on-page SEO and may at Googleās discretion show up in the SERP snippet when used in a table of contents scenario if it is relevant.
Thanks for your reply @webdev . Iāve waited a while and now Iāve got lots of urls of this type in my search console.
I donāt know how to deal with the problem.