skip to content
afterblue.
Table of Contents

Overview

Text search currently uses Pagefind with the default postbuild command:

Terminal window
pagefind --site dist

Because the site declares lang="en-US", Pagefind builds an English-language index. This works for ordinary English searches, but it can behave unexpectedly with Chinese text embedded in English posts.

What Happens

In an English index, Pagefind may treat these as joined tokens after punctuation is removed. A query such as 底牌 may not match, while a joined form such as cards底牌 can match.

Chinese terms that appear with clearer spacing or as standalone text are more likely to work as expected.

Possible Fix

For better Chinese search behavior, rebuild Pagefind with a Chinese language override:

Terminal window
pagefind --site dist --force-language zh

That makes Pagefind use Chinese word segmentation, which improves searches for Chinese terms.

For now, the site keeps the existing English index. If Chinese search becomes more important, the postbuild script can be changed later.