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

@hutusi/amytis

v1.12.0

Published

A high-performance digital garden and blog engine with Next.js 16 and Tailwind CSS v4

Readme

Amytis

English | 简体中文

Amytis 是一个优雅的开源数字花园框架,用于构建个人知识空间。它基于 Next.js 16、React 19 和 Tailwind CSS v4,强调可读性、结构化表达与长期内容所有权。

在线演示

Amytis 截图

知识阶梯

Amytis 围绕一条从粗糙到精炼的知识路径构建:

  • Flow(随笔):记录每日想法与碎片。
  • Articles(文章):将单个想法打磨成清晰文章。
  • Series(系列):把相关文章串联为一条主题叙事。
  • Books(书籍):将成熟知识沉淀为章节化结构。

每个阶段都建立在上一阶段之上,花园会自然生长。

功能特性

  • 数字花园体验:通过标签、系列、作者、书籍、Flow 和归档进行非线性导航。
  • 互联知识网络
    • 双向链接:支持 [[Slug]] 跨内容类型关联。
    • 反向链接:在笔记页自动显示“Linked References”。
    • 知识图谱:以可视化方式展示内容连接关系。
  • 全文搜索:基于 Pagefind 的静态搜索,支持 Cmd/Ctrl+K 快捷键。
  • 结构化内容体系
    • Series:支持手动或自动排序的多篇集合。
    • Books:支持章节与分部的长篇阅读界面。
    • Notes:原子化常青笔记。
    • Flows:流式日记/微记录。
  • 富文本 MDX 能力
    • GitHub Flavored Markdown(表格、任务列表等)
    • 代码高亮
    • Mermaid 图表
    • KaTeX 数学公式
    • 原生 HTML 支持
  • 阅读体验与设计
    • 高可读排版与响应式布局
    • 自动系统主题检测(明/暗)
    • 四套配色主题:default、blue、rose、amber
    • 吸顶目录与阅读进度跟踪
  • 作者生态:每位作者有独立主页,包含简介、头像与社交链接。文章支持按作者筛选,并可在文末显示作者卡片。
  • 性能与 SEO
    • 全静态导出与 WebP 优化
    • 每种内容类型均有完整的 Open Graph 与 Twitter Card 元数据
    • JSON-LD 结构化数据(BlogPostingBookArticle),支持 Google 富媒体搜索结果
    • RSS/Atom 订阅源,格式(rss | atom | both)与内容深度(full | excerpt)可配置
    • <head> 自动注入 Feed 发现链接,原生 sitemap 生成
    • 支持 Latin/CJK 的多语言阅读时长估算
  • 集成能力
    • 统计:Umami / Plausible / Google Analytics
    • 评论:Giscus / Disqus
    • i18n:site.config.ts 中配置多语言(en / zh)

设计理念

  • 默认优雅:排版、间距、色彩开箱即用且有审美一致性。
  • 内容优先:通过文件化写作与发布流程完成创作,不依赖重型 CMS。
  • Markdown 优先但不受限:保持可迁移写作体验,同时支持数学、图表、代码和双向链接。
  • 按需启用site.config.ts 提供模块化开关,仅启用你需要的能力。
  • 纯文本长期所有权:内容存储于 Markdown/MDX,便于版本管理与长期迁移。

快速开始

新建项目(推荐)

一条命令创建新的 Amytis 站点:

bun create amytis my-garden
cd my-garden
bun dev

该脚手架会下载最新发布版 Amytis,自动安装依赖,并根据你的项目信息更新 site.config.tspackage.json

克隆运行

  1. 安装依赖

    bun install
  2. 启动开发环境

    bun dev

    打开 http://localhost:3000

    本地搜索说明: Pagefind 索引是在执行 bun run build:dev 时生成的。本地测试 Cmd/Ctrl+K 前先运行一次;内容更新后也需要重新生成。

  3. 生产构建(静态导出)

    bun run build

    产物位于 out/ 目录。

  4. 开发构建(更快,无图片优化)

    bun run build:dev

CLI 命令

## Core
bun dev
bun run lint
bun run build:graph
bun run validate

## Build & Deploy
bun run build
bun run build:dev
bun run clean
bun run deploy                 # 部署到 Linux/nginx 服务器(需要 .env.local 配置)

## Test
bun test
bun run test:unit
bun run test:int
bun run test:e2e
bun run test:mobile

## Create Content
bun run new "Post Title"
bun run new-weekly "Weekly Topic"
bun run new-series "Series Name"
bun run new-note "Concept"
bun run new-flow

## Import / Maintain
bun run new-from-pdf ./doc.pdf
bun run new-from-images ./photos
bun run new-flow-from-chat
bun run import-obsidian
bun run import-book
bun run sync-book
bun run series-draft "series-slug"
bun run add-series-redirects --dry-run

导入聊天记录到 Flows

.txt.log 文件放入 imports/chats/ 后执行:

bun run new-flow-from-chat

常用参数:--all--dry-run--author "Name"--append--timestamp
导入历史记录位于 imports/chats/.imported

配置

主要站点配置集中在 site.config.tssite.config.example.ts 则是更完整的参考模板,适合查看可选项和默认写法。

优先关注这些配置区块:

  • 站点信息:titledescriptionbaseUrlogImagelogo
  • 导航与页脚:navfootersubscribesocial
  • 内容路由:posts.basePathposts.includeDateInUrlseries.autoPathsseries.customPaths
  • 首页结构:herohomepage.sections
  • 集成能力:analyticscommentsfeedi18n

如果你部署到 nginx,可直接从 nginx.conf.example 开始调整。

静态导出路由规则

Amytis 基于 Next.js 静态导出,核心约束是 output: "export"trailingSlash: true

  • generateStaticParams() 中返回原始路径片段,不要手动用 encodeURIComponent
  • 链接必须指向真实路径,例如 /posts/中文测试文章,不要写 /posts/[slug]
  • 文章默认路径是 /<posts.basePath>/<slug>,其中 posts.basePath 默认值为 /posts
  • 启用 series.autoPaths 后,系列文章会切换到 /<series-slug>/<post-slug>
  • 配置了 series.customPaths 时,会优先使用自定义前缀覆盖 autoPaths
  • 如果准备把系列文章从默认 /posts/... 路径迁走,先执行 bun run add-series-redirects --dry-run,确认后再执行 bun run add-series-redirects

内容写作

  • Posts:写入 content/posts/,支持单文件、日期前缀和文件夹模式。文件夹模式可将图片放在同目录的 images/ 中。CLI:bun run new "Post Title"bun run new "Post Title" --folder
  • Flows:写入 content/flows/YYYY/MM/DD.md.mdx。CLI:bun run new-flow
  • Series:创建 content/series/<slug>/index.mdx,系列内文章可作为同级文件或子目录。CLI:bun run new-series "Series Name"
  • Books:写入 content/books/<slug>/,通常用 index.mdx 存元数据,其余章节文件与其并列
  • Notes:写入 content/notes/,支持 [[wiki-links]]。CLI:bun run new-note "Concept"
  • Unicode slug:文章和笔记支持有意使用 Unicode slug,修改动态路由时要一起验证 ASCII 和 Unicode 路径

项目结构

amytis/
  content/
    posts/
    series/
    books/
    notes/
    flows/
  docs/
  imports/
  public/
  scripts/
  src/
    app/
    components/
    lib/
  tests/
  packages/
    create-amytis/
  site.config.ts

文档

许可证

MIT