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

@mintfolio/theme-api

v1.0.1

Published

Public types, manifests and content contracts for Mintfolio themes.

Readme

Mintfolio Theme API

Mintfolio 的主题公共契约:主题能读取哪些资料、页面会收到什么参数,以及配置清单怎样声明。

普通站点作者不需要单独使用这个仓库。开发主题时,通常从 @mintfolio/core/theme 和 @mintfolio/core/astro 导入即可,它们会转出这里的契约。

一个最小清单

import { defineTheme } from '@mintfolio/theme-api';

export default defineTheme({
  manifest: {
    id: 'paper', name: 'Paper', version: '1.0.0',
    engine: '^1.0.0', author: 'Your name',
    description: '一个专注阅读的主题。',
  },
  pages: { home: './pages/home.astro', post: './pages/post.astro' },
  settings: {
    accent: { type: 'color', label: '链接颜色', default: '#2255aa' },
  },
});

engine 对应主题契约版本,不是 Core 的 0.x 包版本。defineTheme 保留类型信息,实际路径和配置值由 Core 在构建时校验。

入口

| 导入 | 用途 | | --- | --- | | @mintfolio/theme-api | 清单、公开内容类型、InferSettings | | @mintfolio/theme-api/astro | PageProps、页面数据、正文与 SEO 类型 | | @mintfolio/theme-api/search | 纯搜索与 URL 查询参数函数 | | @mintfolio/theme-api/client | 浏览器搜索与密码文章解锁 | | @mintfolio/theme-api/crypto | 内容适配器使用的底层 Web Crypto 契约 | | @mintfolio/theme-api/SeoHead.astro | 可选的 SEO 标签组件 |

主题获得公开 DTO,不接触站点原始配置、文章密码或内容集合。根入口和搜索函数不依赖 DOM,客户端入口面向浏览器。

开发与版本

npm ci
npm test
npm pack

当前契约系列为 1.x,与 Core 版本独立。接口变更需要同步类型、调用方与兼容说明。

完整定义见 Theme API 参考。从零开发可看 主题教程 和 Starter。

参与开发 · 安全问题 · GPL-3.0-only