Socket
Book a DemoInstallSign in
Socket

github.com/poneding/mdi

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/poneding/mdi

v1.3.2
Source
Go
Version published
Created
Source

mdi

English | 中文

mdi(Markdown indexer) is a command line tool used to recursively generate markdown indexes in directories.

Installation

go install github.com/poneding/mdi@latest

Usage

Generate markdown index:

mdi gen
  • -d or --workdir: Specify the directory to generate markdown index.
  • -t or --index-title: Specify the title of markdown index, default is title of markdown index file or current directory name.
  • --home-title: Specify the title of home link in markdown index, if not specified, use index-title.
  • -f or --root-index-file: Specify the markdown root index file, default is zz_gneratered_mdi.md.
  • --sub-index-file: Specify the markdown sub index file, default is zz_gneratered_mdi.md.
  • --inherit-gitignore: Use .gitignore file as ignore file, default is true.
  • --override: Override markdown existing index file, default is false.
  • --no-header-link: Do not generate header link in index file, default is false.
  • -r or --recursive: Recursively generate markdown index in subdirectories, default is false.
  • --nav: Generate navigation in markdown file, default is false.
  • -v or --verbose: Show verbose log, default is false.

Use .mdiignore file as ignore file by default.

Other commands:

# Print version
mdi version

# Print help
mdi help

# Auto Complete
mdi completion
# Example:
# source <(mdi completion zsh)

Screenshots

Markdown folder:

20231124165206

Generate markdown index

mdi gen -f README.md -t "My Notes"

20231124170746

As the same time, the index file will be generated in the subdirectory recursively.

Generate nav in markdown file:

mdi gen -f README.md -t "My Notes" --nav

20231124170902

Customize sub index title:

You can customize the sub index title by modifying the first-level title of the sub markdown index file generated in the subdirectory.

FAQs

Package last updated on 24 Jan 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.