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-it-colors

v2.0.4

Published

对markdown-it的部分标签成行颜色设置,颜色值标志参考element的color项

Downloads

7

Readme

markdown-it-colors

markdown-it标签配色插件

  • 给文档添加配色

  • 颜色的配置采用Element的默认配色

安装

//安装插件
npm i markdown-it-colors

使用

var colors = require('markdown-it-colors');
var md = require('markdown-it')()
            .use(colors,{/*颜色配置*/});

/*
颜色配置默认值
{
    primary: '#409EFF',
    success: '#67C23A',
    error: '#F56C6C',
    warning: '#E6A23C',
    info: '#909399',
}
*/

默认颜色配置

| 标识 | 颜色值 | | ---- | ---- | |primary|#409EFF| |success|#67C23A| |error|#F56C6C| |warning|#E6A23C| |info|#909399|

书写规范

1.常规的行内段

[primary] 展示内容

[success] 展示内容

[error] 展示内容

[warning] 展示内容

[info] 展示内容

2.引用

>[primary] 引用内容

>[success] 引用内容

>[error] 引用内容

>[warning] 引用内容

>[info] 引用内容

3.表格

|[success]column1|[error]column2|[primary]column3|
|-|-|-|
|[success]content1|[error]content2|[primary]content3|

4.行内标签

行内标签(**[primary]加粗**、*[success]叙体*、++[error]下划线++、~~[warning]删除线~~、==[warning]标签==、^[info]上标^、~[info]下标~)

5.标题

# [primary] 一级标题

## [success] 二级标题

### [error] 三级标题

#### [warning] 四级标题

##### [info] 五级标题

###### [primary] 六级标题

6.有序列表、无序列表 

1. [primary] 有序列表内容

1. [success] 有序列表内容

1. [error] 有序列表内容

1. [warning] 有序列表内容

1. [info] 有序列表内容

- [primary] 有序列表内容

- [success] 有序列表内容

- [error] 有序列表内容

- [warning] 有序列表内容

1. [info] 有序列表内容

在这里插入图片描述

支持标签的范围

  • [x] 常规段落

  • [x] 引用

  • [x] 表格

  • [x] 行内标签(加粗、叙体、下划线、删除线、标签、上标、下标)

  • [x] 标题

  • [x] 有序列表、无序列表

更新日志

v1.0.0

更新时间:2019-08-02

更新内容:

  • 基本完成

v1.1.0

更新时间:2019-08-20

更新内容:

  • 添加style属性过滤检测,防止直接更换style导致影响其他的插件

v2.0.0

更新时间:2019-08-21

更新内容:

  • 添加对“加粗”属性的支持
  • 添加对“斜体”属性的支持
  • 添加对“下划线”属性的支持
  • 添加对“删除线”属性的支持
  • 添加对“标记”属性的支持
  • 添加对“上角标”属性的支持
  • 添加对“下角标”属性的支持
  • 添加对“有序列表”属性的支持 仅限1层
  • 添加对“无序列表”属性的支持 仅限1层
  • 添加对“标题”属性的支持

语法注意:

  • [bug] 行内标签前建议使用空格隔开,(如果行内标签为汉字或字母,则标签无效)