@arcblock/result-html-pages

中文文档
3.5.4发布于 2026/06/13Apache-2.0ESM + CJS零依赖近 30 天下载 1943

This package provide a function that generates html code for common error pages such as 404, 500, etc.

原始使用文档

result-html-pages

This package provide a function that generates html code for common error pages such as 404, 500, etc.

Usage

const { render } = require('@arcblock/result-html-pages');
// or import { render } from '@arcblock/result-html-pages'

render({ status: '404' }) // => 404 page
render({ status: '403' }) // => 403 page
render({ status: '500' }) // => 500 page
render({ status: 'error' }) // => error page
render({ status: 'maintenance' }) // => maintenance page
render({ status: 'comingSoon' }) // => comingSoon page
render({ status: 'info', title: 'Here is a info message' }) // => info page
render({ title: '...', description: '...', icon: '...' }) // => custom result page

版本与发布记录

@arcblock/result-html-pages 共发布 899 个版本,首次发布于 2022/01/24;过去 12 个月发布了 49 个版本。

版本发布日期距今
3.5.4latest2026/06/134 个月前
3.5.32026/04/246 个月前
3.5.22026/02/108 个月前
3.5.12026/02/098 个月前
3.5.02026/02/039 个月前
3.4.152026/02/039 个月前

关于 @arcblock/result-html-pages 的常见问题

@arcblock/result-html-pages 是什么?

This package provide a function that generates html code for common error pages such as 404, 500, etc.

如何安装 @arcblock/result-html-pages?

在项目目录运行 npm install @arcblock/result-html-pages,或使用 pnpm add / yarn add / bun add。

@arcblock/result-html-pages 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/arcblock__result-html-pages 是否存在。

@arcblock/result-html-pages 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@arcblock/result-html-pages 可以商用吗?

@arcblock/result-html-pages 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@arcblock/result-html-pages 的下载量有多少?

根据 npm 官方下载统计,@arcblock/result-html-pages 在 2026/10/07 – 2026/11/05 这 30 天内被下载 1,943 次,日均约 65 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@arcblock/result-html-pages 还在维护吗?

最新版本 3.5.4 发布于 2026/06/13(4 个月前);至今共发布 899 个版本,其中过去 12 个月发布了 49 个;首次发布于 2022/01/24。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。