GithubHelp home page GithubHelp logo

i066088 / markdown-toc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xavierguarch/markdown-toc

0.0 0.0 0.0 362 KB

MarkdownTOC(Table Of Contents) Plugin for Visual Studio Code.

License: MIT License

TypeScript 100.00%

markdown-toc's Introduction

Auto Markdown TOC

WARNING: This is just a temporal fork to fix a bug in the original huntertran.auto-markdown-toc extension when inserting the anchors for headers. This extension places the anchors before the header. The original extension places them after the header, making them unusable in Bitbucket.

Generate TOC (table of contents) of headlines from parsed markdown file.

1. Features

  • Insert header number sections.
  • Auto active plugin on markdown
  • Insert anchor for header <a id="markdown-header" name="header"></a>
  • Linking via anchor tags # A 1 โ†’ #a-1
  • Depth control[1-6] with depthFrom:1 and depthTo:6
  • Enable or disable links with withLinks:true
  • Refresh list on save with updateOnSave:true
  • Use ordered list (1. ..., 2. ...) with orderedList:true
  • Anchor support for (github.com|nodejs.org|bitbucket.org|ghost.org|gitlab.com).

2. Installation

ext install auto-markdown-toc

3. Usage

3.1. Insert TOC

Insert TOC

3.2. Insert Header Number Sections

Tips:Section of header is begin with depthFrom

Insert Header Number Sections

4. Configuration

attributes values defaults
depthFrom uint(1-6) 1
depthTo uint(1-6) 6
bulletCharacter string "-"
insertAnchor bool false
withLinks bool true
orderedList bool false
updateOnSave bool true
anchorMode github.com/bitbucket.org/ghost.org/gitlab.com github.com

4.1. Default Settings

To change the default configuration settings for the Auto Markdown TOC extension, edit the user or workspace settings as described here. The available settings are as follows:

attributes values defaults
markdown-toc.depthFrom number(1-6) 1
markdown-toc.depthTo number(1-6) 6
markdown-toc.bulletCharacter string "-"
markdown-toc.insertAnchor bool false
markdown-toc.withLinks bool true
markdown-toc.orderedList bool false
markdown-toc.updateOnSave bool true
markdown-toc.anchorMode enum github.com

4.2. Unique Settings

If you want to use a unique setting for a file, you can add attributes to <!-- TOC --> , just like:

<!-- TOC depthFrom:2 orderedList:true -->

<!-- /TOC -->

5. Contributors

  • sine sawtooth (Add: Header number section)
  • chriscamicas (Update: Anchor generation)
  • kevindaub (Add : Use workspace settings for tabs and eOL)
  • rovest (Feature: Insert anchor)
  • zhiguang Wang(Fix: Recognised code to header list)
  • jgroom33 (Fix: Codeblock error)
  • satokaz (Fix: Codeblock error)

6. What's New

CHANGELOG

7. Authors

This forked repository is maintained by me and anyone who would like to contribute. The EOL fixed was contributed by roborourke and any one open new pull request with the hope of fixing the problem.

The original code was created by Alan Walk, and later updated by Hunter Tran. If you have any questions, contact them at:

8. License

The package is Open Source Software released under the MIT License. It's developed by AlanWalk, maintained by Xavier Guarch

9. Links

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.