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

@kohaku/hexo-renderer-markdown-it

v0.0.3

Published

A faster and CommonMark compliant alternative for Hexo.

Downloads

5

Readme

Hexo Renderer Markdown-it

Modified from markdown-it-katex and hexo-renderer-markdown-it-plus. For better KaTeX writing experience. You can find the original README file in doc.

Local Git: lilyknight/hexo-related/hexo-renderer-markdown-it
Github: https://github.com/ymd45921/hexo-renderer-markdown-it-plus
NPM: @kohaku/hexo-renderer-markdown-it

Usage

Recommend use it with hexo-theme-ymd45921.

You should remove your previous Markdown renderer before install this.

yarn remove hexo-renderer-marked
yarn add @kohaku/hexo-renderer-markdown-it

Options

You can configure this renderer by adding a section to your hexo main _config.yml file like below. Of course, do-nothing is also recommend.

ymd45921:
  markdown_it:
    highlight: true
    html: true
    xhtmlOut: true
    breaks: true
    langPrefix:
    linkify: true
    typographer:
    quotes: “”‘’
    plugins:
      - plugin:
          name: markdown-it-mark
          enable: false
    katex:
      throwOnError: false
      errorColor: '#c00'
      strict: ignore          # ignore | warn | error
      output:                 # mathml | html | htmlAndMathml
      leqno: false
      fleqn: false
      macros: 
        "\\and": "\\mathbb{∧}"

The plugins object contains all plugins to markdown-it you want to add. If you want to add a plugin named as markdown-it-something, you should install it as a dependency first, and add it to the plugins object as provided format.

The katex object contains options that directly apply to KaTeX. Some options' meaning is as follows:

  • throwOnError: when error occurred in KaTeX parsing, renderer will return the TeX formula if it set to true, or try to continue the parse by ignoring the part of the parse that went wrong.
  • errorColor: while throwOnError set to false, renderer will set the ignored part to this color.
  • output: determines the markup language of the output. Valid choices includes MathML, HTML and both.

You can also check the KaTeX official doc to see what other key does in the example above.

Some notes

If you set katex output format to HTML, you should import KaTeX's stylesheet in your webpage to ensure rendered block displays correctly in browsers.

<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/katex.min.css">

Alternatively, if you set MathML as output, which will place rendered results to <math> blocks that have long been supported by Firefox long, and are supported by most modern browsers today.