Hexo Toc

screenshot of Hexo Toc
hexo

Insert a markdown TOC before posts be rendered.

Overview

The hexo-toc plugin is a powerful tool for anyone using Hexo to manage their markdown posts. It simplifies the process of adding a Table Of Contents (TOC) by allowing users to place a simple placeholder in their raw markdown files. Unlike other TOC helpers, this plugin ensures that your content remains untouched, maintaining the integrity of your markdown while providing a seamless reading experience.

With the flexibility to customize settings through a configuration file, hexo-toc stands out as a reliable solution to enhance post organization. Whether you're writing blogs, tutorials, or technical documents, having an automatically generated TOC can significantly improve navigation and user engagement.

Features

  • Placeholder Injection: Only injects the TOC after the <!-- toc --> placeholder, ensuring precise placement in your content.
  • Customizable Depth: Set a maximum heading depth for the TOC with maxdepth, allowing for tailored organization of your content.
  • CSS Class Options: Specify custom CSS classes for the TOC, making it easy to integrate with your existing styles.
  • Dynamic Slugify Function: Choose from multiple slugify functions to customize the anchor generation for your headers.
  • Entity Decoding: Option to enable entity decoding to ensure special characters are rendered properly in the TOC.
  • Anchor Positioning: Decide whether to place anchors before or after the title of headings for better user navigation.
  • Symbol Selection: Customize the anchor symbol, giving you the freedom to choose how headings are linked.
  • Collaborative Development: Open to contributions and modifications, fostering a community-driven approach for continuous improvement.
hexo
Hexo

Hexo is a static site generator built with Node.js that enables developers to create fast and efficient websites using Markdown, EJS, and Stylus. It offers features such as server-side rendering, plugin support, and easy deployment to hosting services like GitHub Pages and Netlify.