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

@synion/md-docs

v1.1.13

Published

Business driven living documentation static site generator.

Downloads

466

Readme

analyze release npm npm

Product

md-docs is a cli tool which generates a static website by resolving files recursivly from a source folder.

See the test set for more information.

This script copies every file and directory from the docs directory into the dist directory and transforms every *.md file into a html file while adding the following features:

  1. Every *.md is transformed in a static web page;
  2. Every *.email.md is transformed in a static document web page;
  3. Every *.message.md is transformed in a static document web page and PDF;
  4. Every index.md is added to the menu;
  5. Every heading is automatically converted into a container;
  6. Every *.model.yml anchor is automatically converted into a model viewer;
  7. Every *.bpmn anchor is automatically converted into a BPMN.io viewer;
  8. Every *openapi.yaml anchor is automatically converted into a HTML documentation page;
  9. Every *.feature anchor is automatically converted into a feature details list;
  10. Every *.dashboard.yaml anchor is automatically converted into a BDD dashboard;
  11. Every *.user-task.yaml anchor is automatically converted into a user-interface;
  12. Every *.puml filer is automatically converted into an SVG image file;
  13. Every *.drawio file is automatically into an SVG image file;
  14. Every *.java, *.cs, *.ts, *.js, *.json, *.py, *.yml, *.yml anchor is automatically converted in a code block;
  15. Every markdown anchor is automatically converted into an HTML link;
  16. Every markdown anchor which starts with a _ is automatically added to the markdown file;
  17. Every git branch is added to the git menu;
  18. Test executions are automatically parsed in feature files;
  19. Unsorted list with items which reference the files above are automatically converted in tab panels;
  20. Images are wrapped in figures;
  21. Images can be aligned by adding align=center or align=left or align=right to the URL;
  22. Markdown is transformed into HTML using markdow-it, the following plugins are installed:

All links are relative, so you do not need a web server.

Class diagram

Architecture

The application is written in node js and implements a plug in architecture. It uses Awilix under the hood for dependency resolving. Plugins can be used by extending App and adding or replacing service registrations.

There are several plugin strategies:

  1. add or change the file parsers;
  2. add or change the HTML parsers;
  3. add or change the anchor parsers;
  4. change components;
  5. change component render functions;
const App = require('md-docs-cli/app');

module.exports = class MyApp extends App {
  constructor(options) {
    super(options);
  }

  _getServices(options) {
    const services = super(options);

    //Option 1
    services['newFileParser'] = asClass(NewFileParser).singleton();
    services.fileParsers.push('newFileParser');

    //Option 2
    services['newHtmlParser'] = asClass(NewHtmlParser).singleton();
    services.htmlParsers.push('newHtmlParser');

    //Option 3
    services['newAnchorParser'] = asClass(NewAnchorParser).singleton();
    services.anchorParsers.push('newAnchorParser');

    //Option 4
    services.pageComponent = asClass(MyPageComponent).singleton();

    //Option 5
    services.pageComponentRenderFn = asValue((data) => '<html />');

    return services;
  }
}

To get started

npm install @biz-dev-ops/md-docs -g
mkdir ../documentation
cd documentation
mkdir docs
echo "# It works!" > docs/index.md
md-docs
google-chrome dist/index.html

Options

branches only

md-docs -b

Custom theme

You can override all assets files by adding the same files to docs folder: docs/assets/style/custom-theme.css can then be overwritten by a custom theme implementation.

Skip branches

md-docs -s branch1 branch2

To debug

Set the environment to development. All intermediate steps are saved as files in the dist directory.

export NODE_ENV=development