DEV Community

Discussion on: [Survey] Automatic Table of Contents in Dev.to Articles

Collapse
 
ranggakd profile image
Retiago Drago

I think not every post could fit under this umbrella. I see it more like how YouTube generate their timestamp section onto video which doesn't have one. It is suitable for longer videos but not so much for shorter ones. Do you know what I mean?

Also, I kind of addicted to collapsible table content that I learned from GitHub can be applied here too like this below. I've been using it ever since.





Outlines

## {% details Outlines %}
- [Introduction](#introduction)
  - [Steganography](#steganography)
- [Project Setup](#project-setup)
- [Core Concepts](#core-concepts)
  - [Mapping Techniques](#mapping-techniques)
  - [Bit Manipulation for Hiding Images](#bit-manipulation-for-hiding-images)
  - [Bit Manipulation for Revealing Images](#bit-manipulation-for-revealing-images)
  - [Bit Manipulation for Reconstructing Images](#bit-manipulation-for-reconstructing-images)
- [Implementation Details](#implementation-details)
- [Results and Visualization](#results-and-visualization)
- [Limitations and Future Work](#limitations-and-future-work)
- [Conclusion](#conclusion)
  - [Summing Up the Journey](#summing-up-the-journey)
  - [Technical Achievements](#technical-achievements)
  - [Key Takeaways](#key-takeaways)
{% enddetails %}
Enter fullscreen mode Exit fullscreen mode
Collapse
 
niklasrefnov profile image
Niklas

But how would you link to the anchors in the table of contents? I can't seem to find a way to assign my headers an id

Collapse
 
jacktt profile image
JackTT

Like GitHub, each heading has its ID that is normalized to a URI.
You can see this article: dev.to/jacktt/go-build-in-advance-...

Collapse
 
ruthmoog profile image
ruthmoog • Edited

Nice! I love details/summary in HTML, I didn't figure out how to do this in dev.to.

Collapse
 
jacktt profile image
JackTT

You can try generating table of content from markdown here:
luciopaiva.com/markdown-toc/