• Что бы вступить в ряды "Принятый кодер" Вам нужно:
    Написать 10 полезных сообщений или тем и Получить 10 симпатий.
    Для того кто не хочет терять время,может пожертвовать средства для поддержки сервеса, и вступить в ряды VIP на месяц, дополнительная информация в лс.

  • Пользаватели которые будут спамить, уходят в бан без предупреждения. Спам сообщения определяется администрацией и модератором.

  • Гость, Что бы Вы хотели увидеть на нашем Форуме? Изложить свои идеи и пожелания по улучшению форума Вы можете поделиться с нами здесь. ----> Перейдите сюда
  • Все пользователи не прошедшие проверку электронной почты будут заблокированы. Все вопросы с разблокировкой обращайтесь по адресу электронной почте : info@guardianelinks.com . Не пришло сообщение о проверке или о сбросе также сообщите нам.

New Project: Markdown TOC Generator ?

Lomanu4 Оффлайн

Lomanu4

Команда форума
Администратор
Регистрация
1 Мар 2015
Сообщения
1,481
Баллы
155
Check out the project on

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

to get started!


Hey everyone ?

Imagine you're working on a long Markdown document and need a table of contents to keep track of all the headings. Or you're writing a blog post and want an easy way to generate the TOC in Markdown. I’ve run into these problems too, which is why I created this Markdown TOC Generator.

What Does It Do?


This tool automatically generates a Table of Contents (TOC) for your Markdown files based on the headers. You can customize the TOC's title, numbering style, and format—whether HTML or Markdown. Plus, you can even add a "Back to Top" link to make navigation easier, especially in long documents.

Key Features:

  • Customizable TOC: Adjust the title, numbering style, and more.
  • Automatic Header Detection: The TOC is built from your document’s headers (#, ##, etc.).
  • Multiple Numbering Styles: Choose from numeric, roman, or alphabetical numbering (HTML format).
  • HTML & Markdown Outputs: You can output the TOC in either HTML or Markdown format.
  • Back-to-Top Link: Option to add a "Back to Top" link for easy navigation.
How to Use It:

Installation:


To get started, install the package via npm:


npm install @rrtechpro/markdown-toc-generator
Example: Generating an HTML TOC


import { generateTOC } from '@rrtechpro/markdown-toc-generator';

const markdownContent = `
# Introduction
## Getting Started
### Requirements
## Installation
# Usage
`;

const options = {
format: 'html',
tocTitle: { level: 2, title: 'Table of Contents' },
addBackToTop: true,
tocFooter: 'Generated by My Tool',
anchorPrefix: 'docs/'
};

console.log(generateTOC(markdownContent, options));
Example: Generating a Markdown TOC


const options = {
format: 'markdown',
tocTitle: { level: 2, title: 'Table of Contents' },
addBackToTop: true,
tocFooter: 'Generated by My Tool',
anchorPrefix: 'docs/'
};

console.log(generateTOC(markdownContent, options));
Why Use It?

  • Efficiency: Automatically create and maintain your TOC as your document grows.
  • Customization: Tweak the title, numbering, and format to fit your needs.
  • Simple: Generate a clean, professional TOC in just a few lines of code.

The project is still in its early stages, but I’m excited to keep working on it. Any contributions, or even just starring and sharing it, would motivate me to continue improving it!

Check out the project on

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

to get started. Feel free to contribute, report issues, or provide feedback!

Happy documenting! ?


Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

 
Вверх Снизу