npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

markdown-documentation-maker

v1.0.24

Published

![GitHub package.json version](https://img.shields.io/github/package-json/v/mzusin/markdown-documentation-maker) [![npm](https://img.shields.io/npm/dw/markdown-documentation-maker)](https://www.npmjs.com/package/markdown-documentation-maker) [![NPM](https

Downloads

464

Readme

Markdown Documentation Maker

GitHub package.json version npm NPM

This package is a markdown-based documentation generator that is especially suitable for monorepos. It uses Tailwind CSS framework for styling. The documentation is responsive and mobile-friendly. An example of documentation created with this package can be found here.

An example of documentation

Table of contents

Initialization

Install the package from npm:

npm i markdown-documentation-maker --save-dev

Add the following scripts to package.json:

"type": "module",
"scripts": {
    "docs:website": "http-server ./docs",
    "docs:build": "node ./src/docs/generator/index.js",
    "docs:watch": "nodemon ./src/docs/generator/index.js",
    "docs:install": "node node_modules/markdown-documentation-maker/run/install.js"
  },

Run install command:

npm run docs:install

This command will create a docs folder in the /src folder.

Configuration

  • First of all, edit the configuration file located in /src/docs/data/config.json. There you can define the website name, email address, etc.

  • By default, the documentation sidebar is automatically generated from the filenames. You can set other names in the following configuration file: /src/docs/data/pages/pages-config.json.

  • Layout files are located at /src/docs/data/layouts.

  • Homepage is located at /src/docs/data/special-pages/index.html.

Commands

The command below is used to compile the documentation website. It creates the documentation website located at /doc folder in the root.

npm run docs:build

The following command is used to compile the documentation website in watch mode. It will be recreated whenever the documentation source files are modified.

npm run docs:watch

To avoid an infinite loop, add the following nodemon configuration to your package.json file.

{
  "nodemonConfig": {
    "restartable": "rs",
    "ignore": [
      ".git",
      "node_modules/**/node_modules"
    ],
    "verbose": false,
    "watch": [
      "src/"
    ],
    "ext": "js,json,html,css,md,ts,tsx,glsl"
  }
}

Run the documentation website locally (for debugging purposes only). By default, it will be opened on localhost with port 8080 http://127.0.0.1:8080

npm run docs:website

How to edit website pages

To edit site pages, update the markdown files located in the /src/docs/data/pages folder. The website layout files are located in /src/docs/data/layouts folder.

It's also possible to create and use additional non-documentation pages. One such predefined page is a homepage. It's located at /special-pages/index.html.

All pages can use macros to print data from config file. For example, {% github %} or {% website-name %} will take values from the file /src/docs/data/config.json.


How to add new pages

To add a new page, simply create a page in the /src/docs/data/pages folder. If the page is created in a subfolder, it will appear in the corresponding subtitle in the left menu.

The page name format should be {number}-{page name}.md, for example 1-basic-usage.md.

  • {number} - is used to sort pages in the left menu.
  • the same format applies to the folders (1-main, 2-another, etc.)