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

myst-spec

v0.0.5

Published

MyST schema, testcases, and typescript types

Downloads

7,080

Readme

MyST Spec

:warning: The MyST AST specification is still in dev; any structures or features present in the JSON schema may change at any time without notice.

MyST (Markedly Structured Text) is designed to create publication-quality, computational documents written entirely in Markdown. The main use case driving the development and design of MyST is JupyterBook, which creates educational online textbooks and tutorials with Jupyter Notebooks and narrative content written in MyST.

MyST is a superset of CommonMark (a standard form of Markdown) and allows you to directly create “directives” and “roles” as extension points in the language. These extensions points are influenced by ReStructured Text (RST) and Sphinx -- pulling on the nomenclature and introducing additional standards where appropriate. directives are block-level extension points, like callout panels, tabs, figures or embedded charts; and roles are inline extension points, for components like references, citations, or inline math.

```{directive} Argument
The *content* of a directive can have {role}`with content`
```

Goals

myst-spec is designed to standardize implementations and extensions to MyST, with the goal of making the MyST ecosystem as rich and interoperable as possible. The spec formalizes three formats:

  1. the MyST markup syntax, to ensure MyST works as expected across languages and implementations;
  2. the MyST abstract syntax tree (AST), to promote an ecosystem of transformations and exports to diverse formats (e.g. latex/word/html/docutils/etc.); and
  3. suggested semantic HTML output and CSS class structure, to promote web-accessibility and interoperability of themes.

The myst-spec will be improved overtime through enhancement proposals which can be submitted by our multi-stakeholder community. [IN PROGRESS]

MyST Spec

This repository introduces tests to cover the MyST Spec. These tests cover three target formats: myst, mdast, and html. An simple example test case (in yaml) for a header looks like:

cases:
  - title: CommonMark headers
    myst: |-
      # Heading!
    mdast:
      type: root
      children:
        - type: heading
          depth: 1
          children:
            - type: text
              value: Heading!
    html: |-
      <h1>Heading!</h1>

[TBD: Do we include latex here, maybe?]

Markdown Abstract Syntax Tree, mdast

Markdown AST, or mdast, is an intermediate format that builds upon the existing mdast spec, which is used throughout the unifiedjs Javascript community with hundreds of existing transformations, utilities and serializers. mdast is simple, with a type defining the node optional properties on the node and optional children (a leaf node has a value).

Beyond CommonMark and GitHub Flavoured Markdown, MyST introduces new directives and roles (like admonitions, citations, equations) following existing standards where they are defined. mdast is serializable to JSON or YAML, and can be effectively shared between projects, languages and implementations. The output of this repository is a versioned JSON file that can be used in implementations of MyST.

Structure of the Repository

schema/
|- myst.schema.json          // root schema definition
|- myst.md                   // docs
|- schema.spec.ts            // test for validating all examples against the schema
|- unist/
|  |- unist.schema.json      // unist base types
|  |- unist.md               // docs
|  |- unist.yml              // example mdast structures
|- commonmark/
|  |- commonmark.schema.json // commonmark mdast types
|  |- commonmark.md          // docs
|  |- commonmark.yml         // simple commonmark examples
|  |- cmark_spec_0.30.yml    // commonmark spec examples
...
|- roles/                    // future myst features
|  |- roles.schema.json
|  ...
|- directives/
|  |- directives.schema.json
|  ...

Relation to other markup languages, frameworks

[TODO]

  • CommonMark
  • GitHub Flavored Markdown
  • Pandoc
  • Unified
  • Markdown-It