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

@hindom-tech/strapi-shared

v1.1.2

Published

Hindom 系列 Strapi v5 站点共享的后台汉化与通用配置(admin / server)

Readme

@hindom-tech/strapi-shared

Hindom 系列 Strapi v5 站点共享的后台汉化通用配置,方便快速复用到新网站。

公开发布在 npm@hindom-tech/strapi-shared),安装零配置、无需 token。

提供的能力

  • 后台汉化:补齐 Strapi v5 自带 zh-Hans 语言包缺失的文案(首页、仪表盘小组件、引导教程、内容管理器、个人资料页等)。
  • 默认简体中文:首次访问即为 zh-Hans,启用语言 ['zh-Hans', 'en'],已手动切换语言的用户保留其选择。
  • 更干净的界面:关闭视频教程(tutorials: false)与新版本发布通知(notifications.releases: false)。
  • 隐藏「设置」菜单:对非超级管理员隐藏侧边栏「设置」入口。
  • 反代支持server 配置内置 urlPUBLIC_URL)与 proxyIS_PROXIED),适配 Cloudflare Tunnel / 反向代理。

安装

npm install @hindom-tech/strapi-shared

公共 npm 包,无需 .npmrc、无需 token。

用法

后台 src/admin/app.tsx

import { createAdminConfig } from '@hindom-tech/strapi-shared/admin';

export default createAdminConfig({
  brand: {
    title: '站点管理后台',
    workplace: '内容管理系统',
    welcomeTitle: '欢迎回来!',
    welcomeSubtitle: '请登录内容管理系统',
    homeSubtitle: '欢迎使用管理后台',
  },
  navRestrictionClassPrefix: 'somesite', // 多站点 CSS / 缓存键隔离,用站点名
});

可选参数(均有合理默认):

| 参数 | 默认 | 说明 | |------|------|------| | brand | — | 站点品牌文案 | | locales | ['zh-Hans','en'] | 启用的界面语言 | | defaultLocale | 'zh-Hans' | 首次访问默认语言 | | hideSettingsForNonSuperAdmin | true | 对非超管隐藏「设置」菜单 | | disableTutorials | true | 关闭视频教程 | | disableReleaseNotifications | true | 关闭版本发布通知 | | extraTranslations | {} | 站点特有 / 覆盖翻译(按 locale) | | navRestrictionClassPrefix | 'strapi-shared' | 多站点 CSS / 缓存键隔离前缀 |

服务端 config/server.ts

import type { Core } from '@strapi/strapi';
import { createServerConfig } from '@hindom-tech/strapi-shared/server';

export default ({ env }: Core.Config.Shared.ConfigParams): Core.Config.Server =>
  createServerConfig(env, { defaultPort: 1337 });

开发

npm install
npm run build   # tsc 编译到 dist/(ESM 产物)

发布到 npm

需要 @hindom-tech 组织的发布权限。两种方式任选其一:

A. 本地发布

npm login                 # 登录有 @hindom-tech 组织权限的账号
npm version patch         # 升版本号并打 tag
npm publish               # publishConfig.access=public,prepare 钩子自动 build
git push && git push --tags

B. GitHub Actions 自动发布(推荐)

在仓库 Settings → Secrets 添加 NPM_TOKEN(npm 自动化令牌,具备发布权限),然后:

git tag v1.1.0 && git push origin v1.1.0

工作流(.github/workflows/publish.yml)会自动 build 并发布到 npm。

升级(消费项目)

npm update @hindom-tech/strapi-shared