# heti

> 赫蹏是专为中文内容展示设计的排版样式增强。它基于通行的中文排版规范而来，可以为网站的读者带来更好的文章阅读体验。

Latest version **0.9.6** (published 2025-08-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install heti
pnpm add heti
yarn add heti
bun add heti
```

## Health

**Score 25/100 (F)** — status: maintenance-mode.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.9.6 |
| Published | 2025-08-30 |
| First published | 2020-02-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 71 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6726 |
| Author | Sivan |
| Maintainers | sivan |
| Keywords | typography, clreq, css, sass, scss |

## Links

- npm: https://www.npmjs.com/package/heti
- Repository: https://github.com/sivan/heti
- Homepage: https://github.com/sivan/heti#readme
- Issues: https://github.com/sivan/heti/issues
- npm.io page: https://npm.io/package/heti

## Dependencies (1)

- [heti-findandreplacedomtext](https://npm.io/package/heti-findandreplacedomtext.md) ^0.5.0

## Alternatives

- [style-dictionary](https://npm.io/package/style-dictionary.md) — 2.0M weekly downloads
- [postcss-merge-idents](https://npm.io/package/postcss-merge-idents.md) — 1.7M weekly downloads
- [@fontsource/noto-sans](https://npm.io/package/@fontsource/noto-sans.md) — 93.0K weekly downloads
- [uglifycss](https://npm.io/package/uglifycss.md) — 71.6K weekly downloads
- [mat4-interpolate](https://npm.io/package/mat4-interpolate.md) — 23.3K weekly downloads

## Recent versions

- 0.9.6 (latest) — 2025-08-30
- 0.9.5 — 2024-12-21
- 0.9.4 — 2023-02-17
- 0.9.3 — 2023-01-11
- 0.9.2 — 2021-12-08
- 0.8.2 — 2021-08-12
- 0.8.1 — 2020-11-02
- 0.8.0 — 2020-05-17
- 0.7.0 — 2020-05-04
- 0.6.0 — 2020-03-15
- 0.5.0 — 2020-03-15
- 0.4.3 — 2020-03-04
- 0.4.0 — 2020-03-01
- 0.3.5 — 2020-02-21
- 0.3.4 — 2020-02-20

## README

# 赫蹏

赫蹏（hètí）是专为中文内容展示设计的排版样式增强。它基于通行的中文排版规范而来，可以为网站的读者带来更好的文章阅读体验。

预览：[https://sivan.github.io/heti/](https://sivan.github.io/heti/)

![Preview](https://raw.githubusercontent.com/sivan/heti/master/_site/assets/screenshot-grid.png)

主要特性：
- 贴合网格的排版；
- 全标签样式美化；
- 预置古文、诗词样式；
- 预置多种排版样式（行间注、多栏、竖排等）；
- 多种预设字体族（仅限桌面端）；
- 简/繁体中文支持；
- 自适应黑暗模式；
- 中西文混排美化，不再手敲空格👏（基于 JavaScript 脚本）；
- 全角标点挤压（基于 JavaScript 脚本）；
- 兼容 *normalize.css*、*CSS Reset* 等常见样式重置；
- 移动端支持；
- ……

总之，用上就会变好看。

## 使用方法

1. 在页面的 `<head>` 标签中引入 `heti.css` 文件：
    ```
    <link rel="stylesheet" href="//unpkg.com/heti/umd/heti.min.css">
    ```
1. 在要作用的容器元素上增加 `class="heti"` 的类名即可：
    ```
    <article class="entry heti">
      <h1>我的世界观</h1>
      <p>有钱人的生活就是这么朴实无华，且枯燥</p>
      ……
    </article>
    ```
1. 使用增强脚本（可选）：
    ```
    <script src="//unpkg.com/heti/umd/heti-addon.min.js"></script>
    <script>
      const heti = new Heti('.heti');
      heti.autoSpacing(); // 自动进行中西文混排美化和标点挤压
    </script>
    ```


## WIP

暂时没什么想做的了。

- [x] 自适应黑暗模式
- [x] 标点挤压
- [x] 中、西文混排
- [x] 繁体中文支持
- [x] 诗词版式
- [x] 行间注版式

## Star History

谢谢每一位加星的朋友，让这个疫情期间憋在家里无聊做的小项目有了更大的价值。

[![Star History Chart](https://api.star-history.com/svg?repos=sivan/heti&type=Date)](https://www.star-history.com/#sivan/heti&Date)

-- EOF --

---
_Source: https://npm.io/package/heti · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
