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

@jcmellado/markdown-template

v0.9.0

Published

Markdown template for the AsyncAPI Generator

Downloads

11

Readme

markdown-template

Markdown template for the AsyncAPI Generator.

The template converts an AsyncAPI document into a Markdown document.

The generated Markdown documents can be used to create static HTML documentation websites with Slate or shins.

Usage

Install the AsyncAPI Generator:

npm install -g @asyncapi/generator

Run the generator on your asyncapi.yml with the template:

ag ./asyncapi.yml @jcmellado/markdown-template -o ./docs

Check the AsyncAPI Generator Documentation to learn more about the available options.

Examples

AsyncAPI specification of fictional API service:

Server, channel, operation and message bindings for all the supported protocols:

Security schemes for all the supported protocols:

Simple and complex schemas:

Parameters

The AsyncAPI Generator allows to pass additional parameters to the template with the -p name=value option.

Example:

ag ./asyncapi.yml @jcmellado/markdown-template -o ./docs -p slate.enabled=true -p slate.languages="json: JSON,Rust"

The following sections describe the available parameters.

Markdown

Parameter | Description ----------|------------ output | File name for the output file.Default: asyncapi.mdThe -o parameter of the generator specifies the output directory, the -p output parameter of the template specifies the output filename.Example: -o ./docs -p output=api-1.0.0.md

Sections

Parameter | Description ----------|------------ sections | Comma-separated list of sections to be included in the Markdown document.Default: servers,channels,messages,security,tags,license,termsOfService,contactSections are included in the Markdown document in the same order that they appear in the list. Only the listed sections will be included.Example: -p sections=channels,messages,servers,license sections.server | Comma-separated list of subsections to be included in the servers section.Default: variables,security,bindingsExample: -p sections.server=variables sections.channels | Comma-separated list of subsections to be included in the channels section.Default: parameters,bindings,messages,publish,subscribe,operation.bindings,operation.tagsExample: -p sections.channels=parameters,subscribe,publish,messages sections.messages | Comma-separated list of subsections to be included in the messages section.Default: payload,headers,correlationId,bindings,tagsExample: -p sections.messages=headers,payload

Table of Contents

Parameter | Description ----------|------------ toc.headingLevel | Number of heading levels to show in the table of contents.Default: 0Allowed values: 0, 1, or 2.Example: -p toc.headingLevel=2

Slate/shins

Parameter | Description ----------|------------ slate.enabled | Enables the output of the Slate header in the Markdown document.Default: falseThe header contains some parameters used by Slate to build the HTML documentation.Example: -p slate.enabled=true slate.theme | Name of the syntax-highlighter theme to use.Default: darkulaExample: -p slate.theme=monokai slate.searchEnabled | Enables the search option in the table of contents.Default: trueExample: -p slate.searchEnabled=false slate.headingLevel | Number of heading levels to show in the table of contents.Default: 2Currently only supported by shins.Example: -p slate.headingLevel=3 slate.languages | Comma-separated list of languages to add as tabs.Default: nullExample: -p slate.languages="json: JSON" slate.includes | Comma-separated list of files to include at the bottom of the content.Default: nullExample: -p slate.includes=/extra/info slate.footers | Comma-separated list of texts to add at the bottom of the table of contents.Default: nullExample: -p slate.footers="Copyright (c) 2020 www.example.com"