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 🙏

© 2026 – Pkg Stats / Ryan Hefner

super-tips

v1.0.1

Published

A simple admonition plugin for Astro that converts !!!type content !!! syntax to beautiful tip boxes

Downloads

195

Readme

simple-tips

一个简单易用的 Astro 集成,用于在 Markdown 和 MDX 文件中创建精美的提示框。

功能特性

  • 🚀 零配置即用
  • 🎨 4 种内置提示框类型(note, tip, warning, caution)
  • 💎 完全内联样式,无需外部CSS文件
  • ✨ 简单直观的语法:!!!note 内容 !!!

安装

# 使用 npm
npm install simple-tips

# 使用 yarn
yarn add simple-tips

# 使用 pnpm
pnpm add simple-tips

配置

astro.config.mjs 文件中添加集成:

import { defineConfig } from 'astro/config';
import simpleTips from 'simple-tips';

export default defineConfig({
  integrations: [simpleTips()],
});

高级配置

import { defineConfig } from 'astro/config';
import simpleTips from 'simple-tips';

export default defineConfig({
  integrations: [
    simpleTips({
      // 是否压缩CSS(默认:true)
      minify: true,
      
      // 自定义提示框类型
      customTypes: {
        success: {
          title: 'Success',
          borderColor: 'rgba(54, 201, 120, 1)',
          backgroundColor: 'rgba(54, 201, 120, 0.1)',
          textColor: 'rgba(54, 201, 120, 1)',
        },
      },
    }),
  ],
});

使用

在 Markdown 或 MDX 文件中使用以下语法:

!!!note
这是一个 note 类型的提示框
!!!

!!!tip
这是一个 tip 类型的提示框
!!!

!!!warning
这是一个 warning 类型的提示框
!!!

!!!caution
这是一个 caution 类型的提示框
!!!

内置提示框类型

  • note - 蓝色提示框,用于重要信息
  • tip - 绿色提示框,用于实用技巧
  • warning - 红色提示框,用于警告信息
  • caution - 橙色提示框,用于谨慎提示

自定义提示框类型

你可以通过配置添加自定义提示框类型,每个类型需要定义:

  • title - 提示框标题
  • borderColor - 边框颜色
  • backgroundColor - 背景颜色
  • textColor - 文字颜色

输出示例

转换后的 HTML 结构:

<div style="border-left:5px solid rgb(44, 142, 255);background-color:rgba(44, 142, 255, 0.1);color:rgb(44, 142, 255);margin-top:1rem;margin-bottom:1rem;padding:1rem;">
  <div style="font-weight:700;margin-bottom:0.5rem;text-transform:uppercase;">Note</div>
  这是一个 note 类型的提示框
</div>